diff options
author | Yorke Lee <yorkelee@google.com> | 2015-10-08 17:06:23 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-10-08 17:06:23 +0000 |
commit | 3bc0c96d2446a4415a09a84e027e54fa0be6c5c6 (patch) | |
tree | f6a6b75762fb7f0822eafb42bfd156ef8aa34b58 | |
parent | c6720cf6692cf64e1dfb9b99d96039ca87ce41bb (diff) | |
parent | c7f8899a3ea60fb2c1059b79c18d2b4bc2511c6b (diff) |
am c7f8899a: Don\'t assign invalid resource to imageView
* commit 'c7f8899a3ea60fb2c1059b79c18d2b4bc2511c6b':
Don't assign invalid resource to imageView
-rw-r--r-- | src/com/android/dialer/widget/EmptyContentView.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/dialer/widget/EmptyContentView.java b/src/com/android/dialer/widget/EmptyContentView.java index f248967de..719fd3ff8 100644 --- a/src/com/android/dialer/widget/EmptyContentView.java +++ b/src/com/android/dialer/widget/EmptyContentView.java @@ -80,10 +80,11 @@ public class EmptyContentView extends LinearLayout implements View.OnClickListen } public void setImage(int resourceId) { - mImageView.setImageResource(resourceId); if (resourceId == NO_LABEL) { + mImageView.setImageDrawable(null); mImageView.setVisibility(View.GONE); } else { + mImageView.setImageResource(resourceId); mImageView.setVisibility(View.VISIBLE); } } |