From 65d46d6ee4851e6f093556bcd232b58b9e37fd3e Mon Sep 17 00:00:00 2001 From: Super Liu Date: Mon, 15 Nov 2021 12:45:50 +0800 Subject: [PATCH] Set property based on gesture option changed. System software could do the runtime configuration based on this added property. Bug: 193467627 Test: manual test. Signed-off-by: Super Liu Change-Id: I1897320e1c5d5d446727899328363e6a714983f8 --- .../gestures/TapScreenGesturePreferenceController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/gestures/TapScreenGesturePreferenceController.java b/src/com/android/settings/gestures/TapScreenGesturePreferenceController.java index 179ed262a20..86ac713194f 100644 --- a/src/com/android/settings/gestures/TapScreenGesturePreferenceController.java +++ b/src/com/android/settings/gestures/TapScreenGesturePreferenceController.java @@ -21,6 +21,7 @@ import static android.provider.Settings.Secure.DOZE_TAP_SCREEN_GESTURE; import android.annotation.UserIdInt; import android.content.Context; import android.hardware.display.AmbientDisplayConfiguration; +import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings; @@ -74,8 +75,10 @@ public class TapScreenGesturePreferenceController extends GesturePreferenceContr @Override public boolean setChecked(boolean isChecked) { - return Settings.Secure.putInt(mContext.getContentResolver(), DOZE_TAP_SCREEN_GESTURE, - isChecked ? 1 : 0); + boolean success = Settings.Secure.putInt(mContext.getContentResolver(), + DOZE_TAP_SCREEN_GESTURE, isChecked ? 1 : 0); + SystemProperties.set("persist.sys.tap_gesture", isChecked ? "1" : "0"); + return success; } private AmbientDisplayConfiguration getAmbientConfig() {