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

Commit 1da5ab01 authored by Daniel Nishi's avatar Daniel Nishi Committed by Android (Google) Code Review
Browse files

Merge "Add a new setting for Bluetooth on while driving."

parents 41584b69 79764127
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7601,6 +7601,13 @@ public final class Settings {
         */
        public static final String BACKUP_MANAGER_CONSTANTS = "backup_manager_constants";

        /**
         * Flag to set if the system should predictively attempt to re-enable Bluetooth while
         * the user is driving.
         * @hide
         */
        public static final String BLUETOOTH_ON_WHILE_DRIVING = "bluetooth_on_while_driving";

        /**
         * This are the settings to be backed up.
         *
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ public class FeatureFlagUtils {
        DEFAULT_FLAGS.put("settings_zone_picker_v2", "true");
        DEFAULT_FLAGS.put("settings_suggestion_ui_v2", "false");
        DEFAULT_FLAGS.put("settings_about_phone_v2", "false");
        DEFAULT_FLAGS.put("settings_bluetooth_while_driving", "false");
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -598,8 +598,9 @@ message SecureSettingsProto {
    optional SettingProto lockdown_in_power_menu = 194;
    optional SettingProto backup_manager_constants = 169;
    optional SettingProto show_first_crash_dialog_dev_option = 195;
    optional SettingProto bluetooth_on_while_driving = 196;

    // Next tag = 196
    // Next tag = 197
}

message SystemSettingsProto {
+2 −1
Original line number Diff line number Diff line
@@ -540,7 +540,8 @@ public class SettingsBackupTest {
                 Settings.Secure.BACKUP_MANAGER_CONSTANTS,
                 Settings.Secure.KEYGUARD_SLICE_URI,
                 Settings.Secure.PARENTAL_CONTROL_ENABLED,
                 Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL);
                 Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL,
                 Settings.Secure.BLUETOOTH_ON_WHILE_DRIVING);

    @Test
    public void systemSettingsBackedUpOrBlacklisted() {
+3 −0
Original line number Diff line number Diff line
@@ -1761,6 +1761,9 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.BACKUP_MANAGER_CONSTANTS,
                SecureSettingsProto.BACKUP_MANAGER_CONSTANTS);
        dumpSetting(s, p,
                Settings.Secure.BLUETOOTH_ON_WHILE_DRIVING,
                SecureSettingsProto.BLUETOOTH_ON_WHILE_DRIVING);
    }

    private static void dumpProtoSystemSettingsLocked(