summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxwen <max.weninger@gmail.com>2019-11-18 00:29:15 +0100
committeralk3pInjection <webmaster@raspii.tech>2023-04-20 00:08:54 +0800
commit9c9e6d6cb09347ad52eaa99a99d288ceb4bd6ba9 (patch)
tree268b3681610ae3e1c6ef41cb03253332eedbaabd
parent700894222ef5c27947fba1d83e8717f1caad9673 (diff)
SystemUI: use DOUBLE_TAP_TO_WAKE setting also for wake from aod
Co-authored-by: Michael W <baddaemon87@gmail.com> Change-Id: Ib51fdeaaa9a1b18b79f4f311c65565352d909a72
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/PulsingGestureListener.kt9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/PulsingGestureListener.kt b/packages/SystemUI/src/com/android/systemui/shade/PulsingGestureListener.kt
index db700650e46c..41aeff9533a0 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/PulsingGestureListener.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/PulsingGestureListener.kt
@@ -59,10 +59,13 @@ class PulsingGestureListener @Inject constructor(
) : GestureDetector.SimpleOnGestureListener(), Dumpable {
private var doubleTapEnabled = false
private var singleTapEnabled = false
+ private var doubleTapEnabledNative = false
init {
- val tunable = Tunable { key: String?, _: String? ->
+ val tunable = Tunable { key: String?, value: String? ->
when (key) {
+ Settings.Secure.DOUBLE_TAP_TO_WAKE ->
+ doubleTapEnabledNative = TunerService.parseIntegerSwitch(value, false)
Settings.Secure.DOZE_DOUBLE_TAP_GESTURE ->
doubleTapEnabled = ambientDisplayConfiguration.doubleTapGestureEnabled(
UserHandle.USER_CURRENT)
@@ -72,6 +75,7 @@ class PulsingGestureListener @Inject constructor(
}
}
tunerService.addTunable(tunable,
+ Settings.Secure.DOUBLE_TAP_TO_WAKE,
Settings.Secure.DOZE_DOUBLE_TAP_GESTURE,
Settings.Secure.DOZE_TAP_SCREEN_GESTURE)
@@ -109,7 +113,7 @@ class PulsingGestureListener @Inject constructor(
// checks MUST be on the ACTION_UP event.
if (e.actionMasked == MotionEvent.ACTION_UP &&
statusBarStateController.isDozing &&
- (doubleTapEnabled || singleTapEnabled) &&
+ (doubleTapEnabled || singleTapEnabled || doubleTapEnabledNative) &&
!falsingManager.isProximityNear &&
!falsingManager.isFalseDoubleTap
) {
@@ -127,6 +131,7 @@ class PulsingGestureListener @Inject constructor(
override fun dump(pw: PrintWriter, args: Array<out String>) {
pw.println("singleTapEnabled=$singleTapEnabled")
pw.println("doubleTapEnabled=$doubleTapEnabled")
+ pw.println("doubleTapEnabledNative=$doubleTapEnabledNative")
pw.println("isDocked=${dockManager.isDocked}")
pw.println("isProxCovered=${falsingManager.isProximityNear}")
}