Loading packages/SystemUI/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -290,6 +290,11 @@ <bool name="quick_settings_show_full_alarm">false</bool> <!-- Whether to show a warning notification when the device reaches a certain temperature. --> <bool name="config_showTemperatureWarning">false</bool> <!-- Temp at which to show a warning notification if config_showTemperatureWarning is true. If < 0, uses the value from HardwarePropertiesManager#getDeviceTemperatures. --> <integer name="config_warningTemperature">-1</integer> </resources> packages/SystemUI/src/com/android/systemui/power/PowerUI.java +13 −9 Original line number Diff line number Diff line Loading @@ -225,6 +225,9 @@ public class PowerUI extends SystemUI { return; } mThrottlingTemp = mContext.getResources().getInteger(R.integer.config_warningTemperature); if (mThrottlingTemp < 0f) { // Get the throttling temperature. No need to check if we're not throttling. float[] throttlingTemps = mHardwarePropertiesManager.getDeviceTemperatures( HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN, Loading @@ -235,6 +238,7 @@ public class PowerUI extends SystemUI { return; } mThrottlingTemp = throttlingTemps[0]; } // We have passed all of the checks, start checking the temp updateTemperatureWarning(); Loading Loading
packages/SystemUI/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -290,6 +290,11 @@ <bool name="quick_settings_show_full_alarm">false</bool> <!-- Whether to show a warning notification when the device reaches a certain temperature. --> <bool name="config_showTemperatureWarning">false</bool> <!-- Temp at which to show a warning notification if config_showTemperatureWarning is true. If < 0, uses the value from HardwarePropertiesManager#getDeviceTemperatures. --> <integer name="config_warningTemperature">-1</integer> </resources>
packages/SystemUI/src/com/android/systemui/power/PowerUI.java +13 −9 Original line number Diff line number Diff line Loading @@ -225,6 +225,9 @@ public class PowerUI extends SystemUI { return; } mThrottlingTemp = mContext.getResources().getInteger(R.integer.config_warningTemperature); if (mThrottlingTemp < 0f) { // Get the throttling temperature. No need to check if we're not throttling. float[] throttlingTemps = mHardwarePropertiesManager.getDeviceTemperatures( HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN, Loading @@ -235,6 +238,7 @@ public class PowerUI extends SystemUI { return; } mThrottlingTemp = throttlingTemps[0]; } // We have passed all of the checks, start checking the temp updateTemperatureWarning(); Loading