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

Commit adcb2c4d authored by Mir Noshin Jahan's avatar Mir Noshin Jahan Committed by Android (Google) Code Review
Browse files

Merge "Add a SettingsProvider key for Adaptive wifi scorer and 5G PM switch...

Merge "Add a SettingsProvider key for Adaptive wifi scorer and 5G PM switch Bug: 393645580 Test: compile Flag: com.android.settings.flags.enable_nested_toggle_switches" into main
parents 4186f36e 97e6d306
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -12821,6 +12821,22 @@ public final class Settings {
         */
        public static final String ADAPTIVE_CONNECTIVITY_ENABLED = "adaptive_connectivity_enabled";
        /**
         * Whether the Adaptive wifi scorer switch is enabled.
         *
         * @hide
         */
        public static final String ADAPTIVE_CONNECTIVITY_WIFI_ENABLED =
                "adaptive_connectivity_wifi_enabled";
        /**
         * Whether the Adaptive 5G PM switch is enabled.
         *
         * @hide
         */
        public static final String ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED =
                "adaptive_connectivity_mobile_network_enabled";
        /**
         * Controls the 'Sunlight boost' toggle in wearable devices (high brightness mode).
         *
+5 −1
Original line number Diff line number Diff line
@@ -239,6 +239,10 @@ message SecureSettingsProto {
    repeated SettingProto completed_categories = 15;
    optional SettingProto connectivity_release_pending_intent_delay_ms = 16 [ (android.privacy).dest = DEST_AUTOMATIC ];
    optional SettingProto adaptive_connectivity_enabled = 84 [ (android.privacy).dest = DEST_AUTOMATIC ];
    optional SettingProto adaptive_connectivity_wifi_enabled = 105 [ (android.privacy).dest =
        DEST_AUTOMATIC ];
    optional SettingProto adaptive_connectivity_mobile_network_enabled = 106 [ (android.privacy)
        .dest = DEST_AUTOMATIC ];

    message Controls {
        option (android.msg_privacy).dest = DEST_EXPLICIT;
@@ -741,5 +745,5 @@ message SecureSettingsProto {

    // Please insert fields in alphabetical order and group them into messages
    // if possible (to avoid reaching the method limit).
    // Next tag = 105;
    // Next tag = 107;
}
+2 −0
Original line number Diff line number Diff line
@@ -221,6 +221,8 @@ public class SecureSettings {
        Settings.Secure.EMERGENCY_GESTURE_ENABLED,
        Settings.Secure.EMERGENCY_GESTURE_SOUND_ENABLED,
        Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED,
        Settings.Secure.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED,
        Settings.Secure.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED,
        Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS,
        Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT,
        Settings.Secure.ACCESSIBILITY_BUTTON_MODE,
+2 −0
Original line number Diff line number Diff line
@@ -358,6 +358,8 @@ public class SecureSettingsValidators {
        VALIDATORS.put(
                Secure.EMERGENCY_GESTURE_UI_LAST_STARTED_MILLIS, NONE_NEGATIVE_LONG_VALIDATOR);
        VALIDATORS.put(Secure.ADAPTIVE_CONNECTIVITY_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(
                Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS, NONE_NEGATIVE_LONG_VALIDATOR);
        VALIDATORS.put(Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
+6 −0
Original line number Diff line number Diff line
@@ -2111,6 +2111,12 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED,
                SecureSettingsProto.ADAPTIVE_CONNECTIVITY_ENABLED);
        dumpSetting(s, p,
                Settings.Secure.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED,
                SecureSettingsProto.ADAPTIVE_CONNECTIVITY_WIFI_ENABLED);
        dumpSetting(s, p,
                Settings.Secure.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED,
                SecureSettingsProto.ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED);

        final long controlsToken = p.start(SecureSettingsProto.CONTROLS);
        dumpSetting(s, p,