Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26b9e79f authored by Wenyi Wang's avatar Wenyi Wang Committed by android-build-merger
Browse files

Merge "Call forceLoad() when loader is not started to load hi-res photo"

am: 34dadc9c

* commit '34dadc9c':
  Call forceLoad() when loader is not started to load hi-res photo
parents dd107efe 34dadc9c
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1151,6 +1151,12 @@ public class QuickContactActivity extends ContactsActivity
            destroyInteractionLoaders();
            destroyInteractionLoaders();
            mContactLoader = (ContactLoader) getLoaderManager().restartLoader(
            mContactLoader = (ContactLoader) getLoaderManager().restartLoader(
                    LOADER_CONTACT_ID, null, mLoaderContactCallbacks);
                    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();
            }
            mCachedCp2DataCardModel = null;
            mCachedCp2DataCardModel = null;
        }
        }