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
This commit is contained in:
Tony Mantler 2014-05-14 11:32:20 -07:00
parent 2f97a7c658
commit e8a3c14f28

View File

@ -1754,10 +1754,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()));
}