Correct usage of forceLoad() to load hi-res photo after editing
Doc https://goto.google.com/fix-low-res
Bug 22010349
Bug 25204200
Change-Id: I4f17e62ff1c6113ee2d2bc6f7907d836677df8be
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 90cd350..8ebbb25 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -1147,18 +1147,13 @@
LOADER_CONTACT_ID, null, mLoaderContactCallbacks);
} else if (oldLookupUri != mLookupUri) {
// After copying a directory contact, the contact URI changes. Therefore,
- // we need to restart the loader and reload the new contact.
+ // we need to reload the new contact.
destroyInteractionLoaders();
- mContactLoader = (ContactLoader) getLoaderManager().restartLoader(
- LOADER_CONTACT_ID, null, mLoaderContactCallbacks);
- // mContactLoader may not be in the state of "started". If not, onContentChanged() will
- // not call forceLoad(), so QuickContact will not get the newly updated hi-res
- // photo. If this is the case, we call forceLoad explicitly. See b/25204200.
- if (!mContactLoader.isStarted()) {
- mContactLoader.forceLoad();
- }
+ mContactLoader = (ContactLoader) (Loader<?>) getLoaderManager().getLoader(
+ LOADER_CONTACT_ID);
mCachedCp2DataCardModel = null;
}
+ mContactLoader.forceLoad();
NfcHandler.register(this, mLookupUri);
}