From 99710c194a433eef9d912d2d59ad162e6e803ec3 Mon Sep 17 00:00:00 2001 From: d34d Date: Mon, 25 Jul 2016 09:21:26 -0700 Subject: SysUI: Define config for showing screen on hints If you want it, enable the config otherwise stay calm and carry on. Change-Id: I057443dc289098dad21775f941e13903881c6832 --- packages/SystemUI/res/values/config.xml | 3 +++ .../com/android/systemui/statusbar/phone/NotificationPanelView.java | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'packages/SystemUI') diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index cdbe2fd..8ca58ba 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -300,5 +300,8 @@ false + + false + diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index 736fd7d..ef4aedb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -290,6 +290,8 @@ public class NotificationPanelView extends PanelView implements private boolean mUserInteractedWithLiveLockScreen; private boolean mUserReturnedFromLiveLockScreen; + private boolean mScreenOnHintsEnabled; + private enum SwipeLockedDirection { UNKNOWN, HORIZONTAL, @@ -425,6 +427,7 @@ public class NotificationPanelView extends PanelView implements mScreenHeight = point.y; mUnlockMethodCache = UnlockMethodCache.getInstance(context); + mScreenOnHintsEnabled = res.getBoolean(R.bool.config_showScreenOnLockScreenHints); mUserUnlocked = getUserUnlocked(); mUserExpandedNotifications = getUserExpandedNotificationsInKeyguard(); mUserInteractedWithLiveLockScreen = getUserInteractedWithLls(); @@ -3069,6 +3072,7 @@ public class NotificationPanelView extends PanelView implements } private boolean shouldShowScreenOnHints() { - return mStatusBar.isDeviceProvisioned() && mStatusBarState == StatusBarState.KEYGUARD; + return mScreenOnHintsEnabled && mStatusBar.isDeviceProvisioned() && + mStatusBarState == StatusBarState.KEYGUARD; } } -- cgit v1.1