DozeService: Seperate double tap and pickup
Adds handling for a separate double tap gesture
and allows enabling double tap and pickup
individually.
Test: Turn screen off, toggle gestures with `adb shell settings put secure doze_pulse_on_pick_up 0/1` and `adb shell settings put secure doze_pulse_on_double_tap 0/1`
Bug: 30595437
Change-Id: Id7b79f90b28429cf321544a3e425cf33c575d1c3
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
index efceed1..d5bf499 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
@@ -84,8 +84,8 @@
return getPulseInDuration(pickup) + getPulseVisibleDuration() + getPulseOutDuration();
}
- public int getPulseInDuration(boolean pickup) {
- return pickup
+ public int getPulseInDuration(boolean pickupOrDoubleTap) {
+ return pickupOrDoubleTap
? getInt("doze.pulse.duration.in.pickup", R.integer.doze_pulse_duration_in_pickup)
: getInt("doze.pulse.duration.in", R.integer.doze_pulse_duration_in);
}
@@ -114,6 +114,10 @@
return SystemProperties.getBoolean("doze.vibrate.pickup", false);
}
+ public String getDoubleTapSensorType() {
+ return mContext.getString(R.string.doze_double_tap_sensor_type);
+ }
+
public boolean getProxCheckBeforePulse() {
return getBoolean("doze.pulse.proxcheck", R.bool.doze_proximity_check_before_pulse);
}