From 9dff23b5110dd9f3ad5e4d16f5e8786eab02cb1d Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 14 Nov 2017 10:14:32 -0800 Subject: Dissallow Heads up when redacted Change-Id: Ie5069f3fa6b6811da352c60239f48224d106a04f Fixes: 69137468 Test: phonecall while occluded and with redacted notifications --- .../src/com/android/systemui/statusbar/phone/StatusBar.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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 fa34d4a62d1b..3e391bb8a65c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -7250,6 +7250,15 @@ public class StatusBar extends SystemUI implements DemoMode, return false; } + if (mIsOccluded && !isDozing()) { + boolean devicePublic = isLockscreenPublicMode(mCurrentUserId); + boolean userPublic = devicePublic || isLockscreenPublicMode(sbn.getUserId()); + boolean needsRedaction = needsRedaction(entry); + if (userPublic && needsRedaction) { + return false; + } + } + if (sbn.getNotification().fullScreenIntent != null) { if (mAccessibilityManager.isTouchExplorationEnabled()) { if (DEBUG) Log.d(TAG, "No peeking: accessible fullscreen: " + sbn.getKey()); -- cgit v1.2.3-59-g8ed1b