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

Commit bf9b213e authored by Daisuke Miyakawa's avatar Daisuke Miyakawa
Browse files

Fix possible NPE in ContactPhotoManager.

It may put null to LRUCache when input has some problem.

Reported via public issue tracker (issue 18369)

Bug: 5447001
Change-Id: Icee410d2a999af3aae828b5a0eb61fb9b5c7db99
parent ca5108d0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -359,8 +359,10 @@ class ContactPhotoManagerImpl extends ContactPhotoManager implements Callback {

        view.setImageBitmap(holder.bitmap);

        if (holder.bitmap != null) {
            // Put the bitmap in the LRU cache
            mBitmapCache.put(request, holder.bitmap);
        }

        // Soften the reference
        holder.bitmap = null;