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:
parent
2f97a7c658
commit
e8a3c14f28
@ -1754,10 +1754,10 @@ public class EmailProvider extends ContentProvider {
|
|||||||
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
|
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
|
||||||
LogUtils.d(TAG, "Update: " + uri);
|
LogUtils.d(TAG, "Update: " + uri);
|
||||||
// Handle this special case the fastest possible way
|
// Handle this special case the fastest possible way
|
||||||
if (uri == INTEGRITY_CHECK_URI) {
|
if (INTEGRITY_CHECK_URI.equals(uri)) {
|
||||||
checkDatabases();
|
checkDatabases();
|
||||||
return 0;
|
return 0;
|
||||||
} else if (uri == ACCOUNT_BACKUP_URI) {
|
} else if (ACCOUNT_BACKUP_URI.equals(uri)) {
|
||||||
return backupAccounts(getContext(), getDatabase(getContext()));
|
return backupAccounts(getContext(), getDatabase(getContext()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user