Correctly handle BITMAP_UNAVAILABLE in ContactPhotoManager
Don't enter MESSAGE_PHOTO_LOADED loop if an entry in
mBitmapHolderCache == BITMAP_UNAVAILABLE
Bug: 21560755
Change-Id: Icbfdba8b83c0980daa9abb40a36b6e89f44aa0de
diff --git a/src/com/android/contacts/common/ContactPhotoManager.java b/src/com/android/contacts/common/ContactPhotoManager.java
index fbdac5d..d1c0021 100644
--- a/src/com/android/contacts/common/ContactPhotoManager.java
+++ b/src/com/android/contacts/common/ContactPhotoManager.java
@@ -1252,6 +1252,9 @@
while (iterator.hasNext()) {
Request request = iterator.next();
final BitmapHolder holder = mBitmapHolderCache.get(request.getKey());
+ if (holder == BITMAP_UNAVAILABLE) {
+ continue;
+ }
if (holder != null && holder.bytes != null && holder.fresh &&
(holder.bitmapRef == null || holder.bitmapRef.get() == null)) {
// This was previously loaded but we don't currently have the inflated Bitmap