Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99710c19 authored by d34d's avatar d34d Committed by Gerrit Code Review
Browse files

SysUI: Define config for showing screen on hints

If you want it, enable the config otherwise stay calm and carry on.

Change-Id: I057443dc289098dad21775f941e13903881c6832
parent 0af85965
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -300,5 +300,8 @@
    <!-- Allow Flashlight service to use wakelock -->
    <bool name="flashlight_use_wakelock">false</bool>

    <!-- Allow device to be configured to show screen on hints on the lock screen -->
    <bool name="config_showScreenOnLockScreenHints">false</bool>

</resources>
+5 −1
Original line number Diff line number Diff line
@@ -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;
    }
}