summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxwen <max.weninger@gmail.com>2020-10-18 17:33:26 +0200
committeralk3pInjection <webmaster@raspii.tech>2022-05-07 00:20:58 +0800
commit613b6be4e17b52da8c9991cb8ec92b1b22c90438 (patch)
tree2078b37ec9b915cc8114ac1385dbe85174c0a3b8
parent36163dc21490d8cf1dd02bf82f72a8e0f47720b9 (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.java13
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 55f14500f8fc..fed840445be9 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(
NotificationWakeUpCoordinator coordinator,
@@ -193,11 +196,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() {
@@ -213,7 +222,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;