summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dan Sandler <dsandler@android.com> 2015-05-14 15:10:01 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-05-14 15:10:03 +0000
commit5bcbf857d129f4513e562801a4e88077b2655ade (patch)
tree4218424d6001a3df39e94829815af9461b2d862f
parent9e2d14beb32bde5c5093f6fb0f1a5c8e14e41029 (diff)
parent98b0290bbe4205f774cd09360637af25d880add0 (diff)
Merge "Fix icon-related crash." into mnc-dev
-rw-r--r--core/java/android/app/Notification.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 3ffeea7e3bd5..cb6f7d59f592 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -3191,8 +3191,9 @@ public class Notification implements Parcelable
0xFFFFFFFF,
PorterDuff.Mode.SRC_ATOP, -1);
}
- final boolean gray = (smallIcon.getType() == Icon.TYPE_RESOURCE
- && mColorUtil.isGrayscaleIcon(mContext, smallIcon.getResId()));
+ final boolean gray = isLegacy()
+ && smallIcon.getType() == Icon.TYPE_RESOURCE
+ && mColorUtil.isGrayscaleIcon(mContext, smallIcon.getResId());
if (!isLegacy() || gray) {
contentView.setInt(R.id.right_icon,
"setBackgroundResource",