diff options
author | Wenyi Wang <wenyiw@google.com> | 2016-02-17 11:46:23 -0800 |
---|---|---|
committer | Wenyi Wang <wenyiw@google.com> | 2016-02-17 11:46:23 -0800 |
commit | 144a4d16daf88dded258063bc33810b20c57f81d (patch) | |
tree | 73d1b525d24dcadb71f955eea79f336bb9a635e0 | |
parent | a420c409f48bd3171dc90ff77bc110fb70650a14 (diff) | |
download | android_packages_apps_Contacts-144a4d16daf88dded258063bc33810b20c57f81d.tar.gz android_packages_apps_Contacts-144a4d16daf88dded258063bc33810b20c57f81d.tar.bz2 android_packages_apps_Contacts-144a4d16daf88dded258063bc33810b20c57f81d.zip |
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
-rw-r--r-- | src/com/android/contacts/quickcontact/QuickContactActivity.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index 90cd35027..8ebbb25dd 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -1147,18 +1147,13 @@ public class QuickContactActivity extends ContactsActivity 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); } |