Add motion sense tap gesture + touch counts
AWARE_TAP_PAUSE_GESTURE_COUNT is the number of times the user has used the Motion Sense tap gesture to pause media. This number is used to determine whether to show the "Tap to pause media" contextual tooltip. AWARE_TAP_PAUSE_TOUCH_COUNT is the number of times the user has touched the device to pause media instead of using the Motion Sense tap gesture (Motion Sense and tap gesture must be active for this value to increment). This number is also used to determine whether to show the "Tap to pause media" contextual tip. We back up these counts so that users moving to new devices with Motion Sense will not be given these contextual tips again if they already know how to use the feature. Test: manual Bug: 138296598 Change-Id: I702719fb7cec8b6be9dff91d212a00fb26129957
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user