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

Commit 27727010 authored by maxwen's avatar maxwen Committed by Bruno Martins
Browse files

SystemUI: use DOUBLE_TAP_TO_WAKE setting also for wake from aod

Includes the fix from commit 31355d74.

Change-Id: I0f70f13ae03dc1d15c58e9ccd7eebb50ba2de7cc
parent 15971e89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4246,7 +4246,7 @@ public class NotificationPanelViewController extends PanelViewController {
                    return false;
                }

                if (mDoubleTapToSleepEnabled && mBarState == StatusBarState.KEYGUARD) {
                if (mDoubleTapToSleepEnabled && !mPulsing && !mDozing) {
                    mDoubleTapGesture.onTouchEvent(event);
                }

+7 −1
Original line number Diff line number Diff line
@@ -105,6 +105,8 @@ public class NotificationShadeWindowViewController {
    private boolean mDoubleTapToSleepEnabled;
    private int mQuickQsOffsetHeight;

    private boolean mDoubleTapEnabledNative;

    @Inject
    public NotificationShadeWindowViewController(
            LockscreenShadeTransitionController transitionController,
@@ -165,6 +167,9 @@ public class NotificationShadeWindowViewController {
            AmbientDisplayConfiguration configuration =
                    new AmbientDisplayConfiguration(mView.getContext());
            switch (key) {
                case Settings.Secure.DOUBLE_TAP_TO_WAKE:
                    mDoubleTapEnabledNative = TunerService.parseIntegerSwitch(newValue, false);
                    break;
                case Settings.Secure.DOZE_DOUBLE_TAP_GESTURE:
                    mDoubleTapEnabled = configuration.doubleTapGestureEnabled(
                            UserHandle.USER_CURRENT);
@@ -178,6 +183,7 @@ public class NotificationShadeWindowViewController {
            }
        };
        mTunerService.addTunable(tunable,
                Settings.Secure.DOUBLE_TAP_TO_WAKE,
                Settings.Secure.DOZE_DOUBLE_TAP_GESTURE,
                Settings.Secure.DOZE_TAP_SCREEN_GESTURE,
                DOUBLE_TAP_SLEEP_GESTURE);
@@ -203,7 +209,7 @@ public class NotificationShadeWindowViewController {
                            mPowerManager.goToSleep(e.getEventTime());
                            return true;
                        }
                        if (mDoubleTapEnabled || mSingleTapEnabled) {
                        if (mDoubleTapEnabled || mSingleTapEnabled || mDoubleTapEnabledNative) {
                            mService.wakeUpIfDozing(
                                    SystemClock.uptimeMillis(), mView, "DOUBLE_TAP");
                            return true;