Merge "Switch the setting for Off Body Radios Off to User Absent Radios Off" into pi-dev

This commit is contained in:
Damien Bargiacchi
2018-05-15 20:58:31 +00:00
committed by Android (Google) Code Review
4 changed files with 12 additions and 26 deletions

View File

@@ -10922,21 +10922,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.

View File

@@ -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 ];

View File

@@ -339,8 +339,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,

View File

@@ -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,