commit | 408c8710a269f095066f2ade0dd04e9bafd5c887 | [log] [tgz] |
---|---|---|
author | Gus Prevas <kprevas@google.com> | Tue Dec 04 11:23:05 2018 -0500 |
committer | Gus Prevas <kprevas@google.com> | Tue Dec 04 14:53:52 2018 -0500 |
tree | b166a542a3b81c10a1be7ebdff5ee901cda4c58f | |
parent | afafd66da28a3bf48ce63df5c8309600572ea2cc [diff] |
Fixes NPE when a notification has no snooze menu item. Fixes: 120492561 Test: manual - swiped left on a foreground service notification Change-Id: I96ac8fad250d60d739193fb70508cdd6fb4b34da
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationMenuRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationMenuRow.java index 948d2a5..50564e3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationMenuRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationMenuRow.java
@@ -267,7 +267,9 @@ } else { mRightMenuItems.add(mInfoItem); mRightMenuItems.add(mAppOpsItem); - mRightMenuItems.add(mSnoozeItem); + if (!isForeground) { + mRightMenuItems.add(mSnoozeItem); + } } populateMenuViews();