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

Commit 24283fe1 authored by dianlujitao's avatar dianlujitao Committed by Łukasz Patron
Browse files

SystemUI: Don't sleep on double tap below status bar

Change-Id: Ic64c29eae63e96f34dc37cda355401b7e2cd2d39
parent 5ba607b6
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ public class NotificationShadeWindowViewController {
    private static final String DOUBLE_TAP_SLEEP_GESTURE =
            "lineagesystem:" + LineageSettings.System.DOUBLE_TAP_SLEEP_GESTURE;
    private boolean mDoubleTapToSleepEnabled;
    private int mQuickQsTotalHeight;
    private int mQuickQsOffsetHeight;

    @Inject
    public NotificationShadeWindowViewController(
@@ -190,8 +190,8 @@ public class NotificationShadeWindowViewController {
                Settings.Secure.DOZE_DOUBLE_TAP_GESTURE,
                Settings.Secure.DOZE_TAP_SCREEN_GESTURE,
                DOUBLE_TAP_SLEEP_GESTURE);
        mQuickQsTotalHeight = mView.getResources().getDimensionPixelSize(
                com.android.internal.R.dimen.quick_qs_total_height);
        mQuickQsOffsetHeight = mView.getResources().getDimensionPixelSize(
                com.android.internal.R.dimen.quick_qs_offset_height);

        GestureDetector.SimpleOnGestureListener gestureListener =
                new GestureDetector.SimpleOnGestureListener() {
@@ -208,7 +208,7 @@ public class NotificationShadeWindowViewController {
                    @Override
                    public boolean onDoubleTap(MotionEvent e) {
                        if (!mStatusBarStateController.isDozing() && mDoubleTapToSleepEnabled
                                && e.getY() < mQuickQsTotalHeight) {
                                && e.getY() < mQuickQsOffsetHeight) {
                            mPowerManager.goToSleep(e.getEventTime());
                            return true;
                        }