From 0cb5fd3f7fa13b15d61cf7cc75711596da72a333 Mon Sep 17 00:00:00 2001 From: Tony Mantler Date: Wed, 14 May 2014 11:32:20 -0700 Subject: [PATCH] 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 e8a3c14f28bac4912842761b04c96272caf52810) --- src/com/android/email/provider/EmailProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index cfdfb26c3..b56f9984d 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -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())); }