commit | b52d29b484349763720908f5528b1617516d494e | [log] [tgz] |
---|---|---|
author | Scott Kennedy <skennedy@google.com> | Mon Jul 29 19:59:06 2013 -0700 |
committer | Scott Kennedy <skennedy@google.com> | Mon Jul 29 20:02:40 2013 -0700 |
tree | 59e9be0842cb88be0d5c5fb6ba573fe37b4ffed5 | |
parent | da5932fdbfbfdc03e2fa2417f3492dbf21ba7e8f [diff] |
Don't bother storing a null value in the cache It serves very little purpose, and it causes an NPE. Bug: 9286049 Change-Id: I8c95d8ded2bebdc9b904ef788cbc70865144213e
diff --git a/src/com/android/ex/chips/BaseRecipientAdapter.java b/src/com/android/ex/chips/BaseRecipientAdapter.java index 71b610e..a9aee46 100644 --- a/src/com/android/ex/chips/BaseRecipientAdapter.java +++ b/src/com/android/ex/chips/BaseRecipientAdapter.java
@@ -765,8 +765,10 @@ mHandler.post(new Runnable() { @Override public void run() { - mPhotoCacheMap.put(photoThumbnailUri, photoBytes); - notifyDataSetChanged(); + if (photoBytes != null) { + mPhotoCacheMap.put(photoThumbnailUri, photoBytes); + notifyDataSetChanged(); + } } }); }