diff options
author | maxwen <max.weninger@gmail.com> | 2020-10-18 17:33:26 +0200 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-01-27 18:50:18 +0800 |
commit | 562349e0b60186ab1b6fc97c4cedac8c53a75c84 (patch) | |
tree | ff20a361f00e5f60bfb962b01cee471c945b812a | |
parent | 0b93c883d69230b896179193ea75dbc27efb9bfe (diff) |
SystemUI: Use DT2W setting also to wake from AOD
Change-Id: I844e36469b0e3b0168eecb62f6e8b0e9b2bff40e
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java index 3807b4647fe1..705cb5455829 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java @@ -115,6 +115,9 @@ public class NotificationShadeWindowViewController { private RectF mTempRect = new RectF(); private boolean mIsTrackingBarGesture = false; + // custom additions start + private boolean mDoubleTapEnabledNative; + @Inject public NotificationShadeWindowViewController( InjectionInflationController injectionInflationController, @@ -186,11 +189,17 @@ public class NotificationShadeWindowViewController { break; case Settings.Secure.DOZE_TAP_SCREEN_GESTURE: mSingleTapEnabled = configuration.tapGestureEnabled(UserHandle.USER_CURRENT); + break; + case Settings.Secure.DOUBLE_TAP_TO_WAKE: + mDoubleTapEnabledNative = Settings.Secure.getIntForUser(mView.getContext().getContentResolver(), + Settings.Secure.DOUBLE_TAP_TO_WAKE, 0, UserHandle.USER_CURRENT) == 1; + break; } }; mTunerService.addTunable(tunable, Settings.Secure.DOZE_DOUBLE_TAP_GESTURE, - Settings.Secure.DOZE_TAP_SCREEN_GESTURE); + Settings.Secure.DOZE_TAP_SCREEN_GESTURE, + Settings.Secure.DOUBLE_TAP_TO_WAKE); GestureDetector.SimpleOnGestureListener gestureListener = new GestureDetector.SimpleOnGestureListener() { @@ -206,7 +215,7 @@ public class NotificationShadeWindowViewController { @Override public boolean onDoubleTap(MotionEvent e) { - if (mDoubleTapEnabled || mSingleTapEnabled) { + if (mDoubleTapEnabled || mSingleTapEnabled || mDoubleTapEnabledNative) { mService.wakeUpIfDozing( SystemClock.uptimeMillis(), mView, "DOUBLE_TAP"); return true; |