DO NOT MERGE Fix URI comparison

b/14914981

The framework may make copies of the URI objects before they're passed in,
so we should use .equals() instead of pointer equality.

Change-Id: Ia443e96c81d53829ac6cfce70cebc098861f1c78
(cherry picked from commit e8a3c14f28)
This commit is contained in:
Tony Mantler 2014-05-14 11:32:20 -07:00 committed by Martin Hibdon
parent 1cf672eafd
commit 0cb5fd3f7f

View File

@ -1703,10 +1703,10 @@ public class EmailProvider extends ContentProvider {
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
LogUtils.d(TAG, "Update: " + uri);
// Handle this special case the fastest possible way
if (uri == INTEGRITY_CHECK_URI) {
if (INTEGRITY_CHECK_URI.equals(uri)) {
checkDatabases();
return 0;
} else if (uri == ACCOUNT_BACKUP_URI) {
} else if (ACCOUNT_BACKUP_URI.equals(uri)) {
return backupAccounts(getContext(), getDatabase(getContext()));
}