Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f9d941b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 6996c01e f9a9fcf7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -8297,6 +8297,13 @@ public final class Settings {
         */
        public static final String CAMERA_GESTURE_DISABLED = "camera_gesture_disabled";
        /**
         * Whether the panic button (emergency sos) gesture should be enabled.
         *
         * @hide
         */
        public static final String PANIC_GESTURE_ENABLED = "panic_gesture_enabled";
        /**
         * Whether the camera launch gesture to double tap the power button when the screen is off
         * should be disabled.
+8 −1
Original line number Diff line number Diff line
@@ -208,6 +208,13 @@ message SecureSettingsProto {
    optional Doze doze = 21;

    optional SettingProto emergency_assistance_application = 22 [ (android.privacy).dest = DEST_AUTOMATIC ];

    message EmergencyResponse {
        optional SettingProto panic_gesture_enabled = 1  [ (android.privacy).dest = DEST_AUTOMATIC ];
    }

    optional EmergencyResponse emergency_response = 83;

    optional SettingProto enhanced_voice_privacy_enabled = 23 [ (android.privacy).dest = DEST_AUTOMATIC ];

    message Gesture {
@@ -606,5 +613,5 @@ message SecureSettingsProto {

    // Please insert fields in alphabetical order and group them into messages
    // if possible (to avoid reaching the method limit).
    // Next tag = 83;
    // Next tag = 84;
}
+1 −0
Original line number Diff line number Diff line
@@ -173,5 +173,6 @@ public class SecureSettings {
        Settings.Secure.ONE_HANDED_MODE_TIMEOUT,
        Settings.Secure.TAPS_APP_TO_EXIT,
        Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED,
        Settings.Secure.PANIC_GESTURE_ENABLED,
    };
}
+1 −0
Original line number Diff line number Diff line
@@ -260,5 +260,6 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.ONE_HANDED_MODE_TIMEOUT, ANY_INTEGER_VALIDATOR);
        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);
    }
}
+7 −0
Original line number Diff line number Diff line
@@ -2026,6 +2026,13 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.EMERGENCY_ASSISTANCE_APPLICATION,
                SecureSettingsProto.EMERGENCY_ASSISTANCE_APPLICATION);

        final long emergencyResponseToken = p.start(SecureSettingsProto.EMERGENCY_RESPONSE);
        dumpSetting(s, p,
                Settings.Secure.PANIC_GESTURE_ENABLED,
                SecureSettingsProto.EmergencyResponse.PANIC_GESTURE_ENABLED);
        p.end(emergencyResponseToken);

        dumpSetting(s, p,
                Settings.Secure.ENHANCED_VOICE_PRIVACY_ENABLED,
                SecureSettingsProto.ENHANCED_VOICE_PRIVACY_ENABLED);