From 3ca223a8ce3d43cd6411adecd393538150dd6d77 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Mon, 17 Apr 2017 14:16:20 -0700 Subject: [PATCH] AOD: Do not show guts nor snooze Fixes: 37179751 Test: receive notification while phone is off, try longpress or accessing the gear icon through swiping, ensure neither works Change-Id: If18ac166eac28cd7ad05a12f670b2ddbad9e29b8 --- .../com/android/systemui/statusbar/NotificationMenuRow.java | 1 + .../src/com/android/systemui/statusbar/phone/StatusBar.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java index fee24b7b76455..802925a315eb4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java @@ -227,6 +227,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl if (mShouldShowMenu && !NotificationStackScrollLayout.isPinnedHeadsUp(view) && !mParent.areGutsExposed() + && !mParent.isDark() && (mCheckForDrag == null || !mHandler.hasCallbacks(mCheckForDrag))) { // Only show the menu if we're not a heads up view and guts aren't exposed. mCheckForDrag = new CheckForDrag(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index f0d38b2e3d3c8..b88aa153394d1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -5855,6 +5855,9 @@ public class StatusBar extends SystemUI implements DemoMode, } final ExpandableNotificationRow row = (ExpandableNotificationRow) v; + if (row.isDark()) { + return false; + } bindGuts(row, item); NotificationGuts guts = row.getGuts();