diff options
| author | 2019-01-15 22:11:24 +0000 | |
|---|---|---|
| committer | 2019-01-15 22:11:24 +0000 | |
| commit | d526cb9019aba38bb98571a5d9dafd825f1fb82c (patch) | |
| tree | 7463363c9ed7f7e1c9df8175c1c5c5ddc65a8a1d | |
| parent | b594e3e6e2e96659d1c9cb6dfe56f05b3392a543 (diff) | |
| parent | 5015ac872e9cb85c05a8082bf8d41a00323a9ad8 (diff) | |
Merge "Add skip and silence gestures"
| -rw-r--r-- | core/java/android/provider/Settings.java | 20 | ||||
| -rw-r--r-- | core/proto/android/app/settings_enums.proto | 6 | ||||
| -rw-r--r-- | core/proto/android/providers/settings/secure.proto | 5 | ||||
| -rw-r--r-- | core/res/res/values/config.xml | 6 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 3 | ||||
| -rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java | 8 | ||||
| -rw-r--r-- | proto/src/metrics_constants/metrics_constants.proto | 9 |
7 files changed, 56 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 64aa062a3c49..84825484c36d 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -7407,6 +7407,22 @@ public final class Settings { private static final Validator DOZE_WAKE_SCREEN_GESTURE_VALIDATOR = BOOLEAN_VALIDATOR; /** + * Gesture that skips media. + * @hide + */ + public static final String SKIP_GESTURE = "skip_gesture"; + + private static final Validator SKIP_GESTURE_VALIDATOR = BOOLEAN_VALIDATOR; + + /** + * Gesture that silences sound (alarms, notification, calls). + * @hide + */ + public static final String SILENCE_GESTURE = "silence_gesture"; + + private static final Validator SILENCE_GESTURE_VALIDATOR = BOOLEAN_VALIDATOR; + + /** * The current night mode that has been selected by the user. Owned * and controlled by UiModeManagerService. Constants are as per * UiModeManager. @@ -8483,6 +8499,8 @@ public final class Settings { NOTIFICATION_NEW_INTERRUPTION_MODEL, TRUST_AGENTS_EXTEND_UNLOCK, LOCK_SCREEN_WHEN_TRUST_LOST, + SKIP_GESTURE, + SILENCE_GESTURE, }; /** @@ -8650,6 +8668,8 @@ public final class Settings { VALIDATORS.put(TRUST_AGENTS_EXTEND_UNLOCK, TRUST_AGENTS_EXTEND_UNLOCK_VALIDATOR); VALIDATORS.put(LOCK_SCREEN_CUSTOM_CLOCK_FACE, LOCK_SCREEN_CUSTOM_CLOCK_FACE_VALIDATOR); VALIDATORS.put(LOCK_SCREEN_WHEN_TRUST_LOST, LOCK_SCREEN_WHEN_TRUST_LOST_VALIDATOR); + VALIDATORS.put(SKIP_GESTURE, SKIP_GESTURE_VALIDATOR); + VALIDATORS.put(SILENCE_GESTURE, SILENCE_GESTURE_VALIDATOR); } /** diff --git a/core/proto/android/app/settings_enums.proto b/core/proto/android/app/settings_enums.proto index 2f2f62392157..49ca378ef0e2 100644 --- a/core/proto/android/app/settings_enums.proto +++ b/core/proto/android/app/settings_enums.proto @@ -91,4 +91,10 @@ enum PageId { // OPEN: Settings > Apps & Notifications -> Special app access -> Financial Apps Sms Access SETTINGS_FINANCIAL_APPS_SMS_ACCESS = 1597; + + // OPEN: Settings > System > Input & Gesture > Skip songs + SETTINGS_GESTURE_SKIP = 1624; + + // OPEN: Settings > System > Input & Gesture > Silence alerts + SETTINGS_GESTURE_SILENCE = 1625; } diff --git a/core/proto/android/providers/settings/secure.proto b/core/proto/android/providers/settings/secure.proto index 0e052fe8d4b1..9f4345d4668f 100644 --- a/core/proto/android/providers/settings/secure.proto +++ b/core/proto/android/providers/settings/secure.proto @@ -525,7 +525,10 @@ message SecureSettingsProto { } optional Zen zen = 71; + optional SettingProto skip_gesture_enabled = 74 [ (android.privacy).dest = DEST_AUTOMATIC ]; + optional SettingProto silence_gesture_enabled = 75 [ (android.privacy).dest = DEST_AUTOMATIC ]; + // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). - // Next tag = 74; + // Next tag = 76; } diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index d40f01c7c960..2e3bd7cfded5 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -3708,4 +3708,10 @@ <!-- If device supports corner radius on windows. This should be turned off on low-end devices to improve animation performance. --> <bool name="config_supportsRoundedCornersOnWindows">true</bool> + + <!-- If the sensor that skips media is available or not. --> + <bool name="config_skipSensorAvailable">false</bool> + + <!-- If the sensor that silences alerts is available or not. --> + <bool name="config_silenceSensorAvailable">false</bool> </resources> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index a1ef0d5cc93b..daf8b446c7bb 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3536,4 +3536,7 @@ <java-symbol type="string" name="dynamic_mode_notification_title" /> <java-symbol type="string" name="dynamic_mode_notification_summary" /> <java-symbol type="drawable" name="ic_battery" /> + + <java-symbol type="bool" name="config_skipSensorAvailable" /> + <java-symbol type="bool" name="config_silenceSensorAvailable" /> </resources> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java index bcf37ffef262..18bdb20ad0a6 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java @@ -2363,6 +2363,14 @@ class SettingsProtoDumpUtil { SecureSettingsProto.Zen.SETTINGS_SUGGESTION_VIEWED); p.end(zenToken); + dumpSetting(s, p, + Settings.Secure.SKIP_GESTURE, + SecureSettingsProto.SKIP_GESTURE_ENABLED); + + dumpSetting(s, p, + Settings.Secure.SILENCE_GESTURE, + SecureSettingsProto.SILENCE_GESTURE_ENABLED); + // Please insert new settings using the same order as in SecureSettingsProto. p.end(token); diff --git a/proto/src/metrics_constants/metrics_constants.proto b/proto/src/metrics_constants/metrics_constants.proto index 44edb568573c..bb5d288f11e7 100644 --- a/proto/src/metrics_constants/metrics_constants.proto +++ b/proto/src/metrics_constants/metrics_constants.proto @@ -6803,6 +6803,15 @@ message MetricsEvent { ACTION_NFC_PAYMENT_ALWAYS_SETTING = 1623; // ---- End Q Constants, all Q constants go above this line ---- + // OPEN: Settings > System > Input & Gesture > Skip song gesture + // OS: Q + SETTINGS_GESTURE_SKIP_SONG = 1624; + + // OPEN: Settings > System > Input & Gesture > Silence gesture + // OS: Q + SETTINGS_GESTURE_SILENCE = 1625; + + // ---- End Q Constants, all Q constants go above this line ---- // Add new aosp constants above this line. // END OF AOSP CONSTANTS } |