37544704 PduPersister is not doing a safe Uri comparison

* The PduPersister had some code where it checked uris for
equality, but didn't use the safe .equals method.

Test: manual test of sending and receiving mms's.

Bug: 37544704

Change-Id: I6dfd037068b4eff04c34cd9d41760e36e11915d6
This commit is contained in:
Tom Taylor
2017-05-01 09:21:52 -07:00
parent 7424571ac4
commit db45a19fe5
@@ -918,7 +918,7 @@ public class PduPersister {
}
if (data == null) {
dataUri = part.getDataUri();
if ((dataUri == null) || (dataUri == uri)) {
if ((dataUri == null) || (dataUri.equals(uri))) {
Log.w(TAG, "Can't find data for this part.");
return;
}
@@ -1202,7 +1202,7 @@ public class PduPersister {
// 1. New binary data supplied or
// 2. The Uri of the part is different from the current one.
if ((part.getData() != null)
|| (uri != part.getDataUri())) {
|| (!uri.equals(part.getDataUri()))) {
persistData(part, uri, contentType, preOpenedFiles);
}
}