Merge "Add motion sense tap gesture + touch counts"

This commit is contained in:
Beverly Tai
2019-10-21 17:27:02 +00:00
committed by Android (Google) Code Review
5 changed files with 29 additions and 1 deletions

View File

@@ -7318,6 +7318,19 @@ public final class Settings {
*/
public static final String SILENCE_CALL_TOUCH_COUNT = "silence_call_touch_count";
/**
* Number of successful "Motion Sense" tap gestures to pause media.
* @hide
*/
public static final String AWARE_TAP_PAUSE_GESTURE_COUNT = "aware_tap_pause_gesture_count";
/**
* Number of touch interactions to pause media when a "Motion Sense" gesture could
* have been used.
* @hide
*/
public static final String AWARE_TAP_PAUSE_TOUCH_COUNT = "aware_tap_pause_touch_count";
/**
* The current night mode that has been selected by the user. Owned
* and controlled by UiModeManagerService. Constants are as per

View File

@@ -211,6 +211,11 @@ message SecureSettingsProto {
optional SettingProto silence_timer_touch_count = 11 [ (android.privacy).dest =
DEST_AUTOMATIC ];
optional SettingProto skip_touch_count = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto aware_tap_pause_gesture_count = 13 [
(android.privacy).dest =
DEST_AUTOMATIC ];
optional SettingProto aware_tap_pause_touch_count = 14 [ (android.privacy).dest =
DEST_AUTOMATIC ];
}
optional Gesture gesture = 74;

View File

@@ -152,6 +152,8 @@ public class SecureSettings {
Settings.Secure.SILENCE_TIMER_TOUCH_COUNT,
Settings.Secure.DARK_MODE_DIALOG_SEEN,
Settings.Secure.GLOBAL_ACTIONS_PANEL_ENABLED,
Settings.Secure.AWARE_LOCK_ENABLED
Settings.Secure.AWARE_LOCK_ENABLED,
Settings.Secure.AWARE_TAP_PAUSE_GESTURE_COUNT,
Settings.Secure.AWARE_TAP_PAUSE_TOUCH_COUNT
};
}

View File

@@ -220,6 +220,8 @@ public class SecureSettingsValidators {
VALIDATORS.put(Secure.SILENCE_ALARMS_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
VALIDATORS.put(Secure.SILENCE_TIMER_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
VALIDATORS.put(Secure.SILENCE_CALL_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
VALIDATORS.put(Secure.AWARE_TAP_PAUSE_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
VALIDATORS.put(Secure.AWARE_TAP_PAUSE_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
VALIDATORS.put(Secure.ODI_CAPTIONS_ENABLED, BOOLEAN_VALIDATOR);
VALIDATORS.put(Secure.DARK_MODE_DIALOG_SEEN, BOOLEAN_VALIDATOR);
VALIDATORS.put(Secure.UI_NIGHT_MODE, new InclusiveIntegerRangeValidator(0, 2));

View File

@@ -2047,6 +2047,12 @@ class SettingsProtoDumpUtil {
dumpSetting(s, p,
Settings.Secure.SKIP_TOUCH_COUNT,
SecureSettingsProto.Gesture.SKIP_TOUCH_COUNT);
dumpSetting(s, p,
Settings.Secure.AWARE_TAP_PAUSE_GESTURE_COUNT,
SecureSettingsProto.Gesture.AWARE_TAP_PAUSE_GESTURE_COUNT);
dumpSetting(s, p,
Settings.Secure.AWARE_TAP_PAUSE_TOUCH_COUNT,
SecureSettingsProto.Gesture.AWARE_TAP_PAUSE_TOUCH_COUNT);
p.end(gestureToken);
dumpSetting(s, p,