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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user