Merge "Create settings key for panic button (emergency sos) sound."

This commit is contained in:
TreeHugger Robot
2020-08-14 21:06:17 +00:00
committed by Android (Google) Code Review
5 changed files with 13 additions and 0 deletions

View File

@@ -8315,6 +8315,13 @@ public final class Settings {
*/
public static final String PANIC_GESTURE_ENABLED = "panic_gesture_enabled";
/**
* Whether the panic button (emergency sos) sound should be enabled.
*
* @hide
*/
public static final String PANIC_SOUND_ENABLED = "panic_sound_enabled";
/**
* Whether the camera launch gesture to double tap the power button when the screen is off
* should be disabled.

View File

@@ -211,6 +211,7 @@ message SecureSettingsProto {
message EmergencyResponse {
optional SettingProto panic_gesture_enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto panic_sound_enabled = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
}
optional EmergencyResponse emergency_response = 83;

View File

@@ -174,5 +174,6 @@ public class SecureSettings {
Settings.Secure.TAPS_APP_TO_EXIT,
Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED,
Settings.Secure.PANIC_GESTURE_ENABLED,
Settings.Secure.PANIC_SOUND_ENABLED,
};
}

View File

@@ -262,5 +262,6 @@ public class SecureSettingsValidators {
VALIDATORS.put(Secure.TAPS_APP_TO_EXIT, BOOLEAN_VALIDATOR);
VALIDATORS.put(Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, BOOLEAN_VALIDATOR);
VALIDATORS.put(Secure.PANIC_GESTURE_ENABLED, BOOLEAN_VALIDATOR);
VALIDATORS.put(Secure.PANIC_SOUND_ENABLED, BOOLEAN_VALIDATOR);
}
}

View File

@@ -2028,6 +2028,9 @@ class SettingsProtoDumpUtil {
dumpSetting(s, p,
Settings.Secure.PANIC_GESTURE_ENABLED,
SecureSettingsProto.EmergencyResponse.PANIC_GESTURE_ENABLED);
dumpSetting(s, p,
Settings.Secure.PANIC_SOUND_ENABLED,
SecureSettingsProto.EmergencyResponse.PANIC_SOUND_ENABLED);
p.end(emergencyResponseToken);
dumpSetting(s, p,