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 <supercjliu@google.com> Change-Id: I1897320e1c5d5d446727899328363e6a714983f8
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user