From 6e54b889d0952b9db1699bf49e6599a686169da3 Mon Sep 17 00:00:00 2001 From: Dan Sandler Date: Thu, 10 Nov 2016 11:42:34 -0500 Subject: [PATCH] Avoid NPE in notification inline controls. Specifically, notifications that come from essential parts of the system that cannot be blocked or silenced. Fixes: 32384422 Test: manual: longpress Clock notification, press DONE Change-Id: Ic43cf90d4d7940b1cbfcedb6934567b799efd12b --- .../src/com/android/systemui/statusbar/NotificationGuts.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java index c850a25672d29..63d2891039302 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java @@ -242,9 +242,9 @@ public class NotificationGuts extends LinearLayout implements TunerService.Tunab return Ranking.IMPORTANCE_UNSPECIFIED; } } else { - if (mBlock.isChecked()) { + if (mBlock != null && mBlock.isChecked()) { return Ranking.IMPORTANCE_NONE; - } else if (mSilent.isChecked()) { + } else if (mSilent != null && mSilent.isChecked()) { return Ranking.IMPORTANCE_LOW; } else { return Ranking.IMPORTANCE_UNSPECIFIED;