Add USB_ALARM_TEMPERATURE in SettingsProvider

In terms of the feature of USB overheat warning, SettingsProvider needs the implementation for the integration.

Bug: 118794842
Test: Build, flash and boot, verify
Change-Id: I41aacd5a7ed7ab1ce0212e7d2520e3c51d7d3bc1
This commit is contained in:
Edgar Wang
2018-11-21 17:56:00 +08:00
parent fb27c2c702
commit 495b657b97
4 changed files with 13 additions and 0 deletions

View File

@@ -13510,6 +13510,13 @@ public final class Settings {
*/
public static final String WARNING_TEMPERATURE = "warning_temperature";
/**
* USB Temperature at which the high temperature alarm notification should be shown.
* @hide
*/
public static final String USB_ALARM_TEMPERATURE = "usb_alarm_temperature";
/**
* Whether the diskstats logging task is enabled/disabled.
* @hide

View File

@@ -869,6 +869,8 @@ message GlobalSettingsProto {
// Temperature at which the high temperature warning notification should
// be shown.
optional SettingProto warning_temperature_level = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
// USB temperature at which the high temperature alarm notification should be shown.
optional SettingProto usb_alarm_temperature_level = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
}
optional TemperatureWarning temperature_warning = 119;

View File

@@ -477,6 +477,7 @@ public class SettingsBackupTest {
Settings.Global.USER_SWITCHER_ENABLED,
Settings.Global.NETWORK_ACCESS_TIMEOUT_MS,
Settings.Global.WARNING_TEMPERATURE,
Settings.Global.USB_ALARM_TEMPERATURE,
Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY,
Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED,
Settings.Global.WEBVIEW_MULTIPROCESS,

View File

@@ -1306,6 +1306,9 @@ class SettingsProtoDumpUtil {
dumpSetting(s, p,
Settings.Global.WARNING_TEMPERATURE,
GlobalSettingsProto.TemperatureWarning.WARNING_TEMPERATURE_LEVEL);
dumpSetting(s, p,
Settings.Global.USB_ALARM_TEMPERATURE,
GlobalSettingsProto.TemperatureWarning.USB_ALARM_TEMPERATURE_LEVEL);
p.end(tempWarningToken);
final long tetherToken = p.start(GlobalSettingsProto.TETHER);