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

Commit 68bbaade authored by Damien Bargiacchi's avatar Damien Bargiacchi
Browse files

Switch the setting for Off Body Radios Off to User Absent Radios Off

Bug: 79491395
Change-Id: I82f8742398da503bdddc420399de444e3314998e
parent 9743fae2
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -10882,21 +10882,13 @@ public final class Settings {
                = "forced_app_standby_for_small_battery_enabled";
        /**
         * Whether or not to enable the Off Body, Radios Off feature on small battery devices.
         * Whether or not to enable the User Absent, Radios Off feature on small battery devices.
         * Type: int (0 for false, 1 for true)
         * Default: 0
         * @hide
         */
        public static final String OFF_BODY_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED
                = "off_body_radios_off_for_small_battery_enabled";
        /**
         * How long after the device goes off body to disable radios, in milliseconds.
         * Type: long
         * Default: 10 minutes
         * @hide
         */
        public static final String OFF_BODY_RADIOS_OFF_DELAY_MS = "off_body_radios_off_delay_ms";
        public static final String USER_ABSENT_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED
                = "user_absent_radios_off_for_small_battery_enabled";
        /**
         * Whether or not to turn on Wifi when proxy is disconnected.
+4 −6
Original line number Diff line number Diff line
@@ -600,16 +600,14 @@ message GlobalSettingsProto {
    }
    optional Ntp ntp = 84;

    // Details about the Off Body, Radios Off feature.
    message OffBodyRadiosOff {
    // Details about the User Absent, Radios Off feature.
    message UserAbsentRadiosOff {
        option (android.msg_privacy).dest = DEST_EXPLICIT;

        // Whether or not to enable the Off Body, Radios Off feature on small battery devices.
        // Whether or not to enable the User Absent, Radios Off feature on small battery devices.
        optional SettingProto enabled_for_small_battery = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
        // How long after the device goes off body to disable radios, in milliseconds.
        optional SettingProto delay_ms = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional OffBodyRadiosOff off_body_radios_off = 85;
    optional UserAbsentRadiosOff user_absent_radios_off = 85;

    // Whether to disable the automatic scheduling of system updates.
    optional SettingProto ota_disable_automatic_update = 86 [ (android.privacy).dest = DEST_AUTOMATIC ];
+1 −2
Original line number Diff line number Diff line
@@ -338,8 +338,7 @@ public class SettingsBackupTest {
                    Settings.Global.NTP_SERVER,
                    Settings.Global.NTP_TIMEOUT,
                    Settings.Global.OTA_DISABLE_AUTOMATIC_UPDATE,
                    Settings.Global.OFF_BODY_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED,
                    Settings.Global.OFF_BODY_RADIOS_OFF_DELAY_MS,
                    Settings.Global.USER_ABSENT_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED,
                    Settings.Global.OVERLAY_DISPLAY_DEVICES,
                    Settings.Global.PAC_CHANGE_DELAY,
                    Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE,
+4 −7
Original line number Diff line number Diff line
@@ -963,14 +963,11 @@ class SettingsProtoDumpUtil {
                GlobalSettingsProto.Ntp.TIMEOUT_MS);
        p.end(ntpToken);

        final long obroToken = p.start(GlobalSettingsProto.OFF_BODY_RADIOS_OFF);
        final long uaroToken = p.start(GlobalSettingsProto.USER_ABSENT_RADIOS_OFF);
        dumpSetting(s, p,
                Settings.Global.OFF_BODY_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED,
                GlobalSettingsProto.OffBodyRadiosOff.ENABLED_FOR_SMALL_BATTERY);
        dumpSetting(s, p,
                Settings.Global.OFF_BODY_RADIOS_OFF_DELAY_MS,
                GlobalSettingsProto.OffBodyRadiosOff.DELAY_MS);
        p.end(obroToken);
                Settings.Global.USER_ABSENT_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED,
                GlobalSettingsProto.UserAbsentRadiosOff.ENABLED_FOR_SMALL_BATTERY);
        p.end(uaroToken);

        dumpSetting(s, p,
                Settings.Global.OTA_DISABLE_AUTOMATIC_UPDATE,