Decrease frequency of high temp warnings
Instead of showing any time the temp is above throttling temp, if the user has dismissed the notification (or clicked it), the notification will not reshow until the temperature has gone below the throttling temp and come back. Test: manual Change-Id: I4cef9144dfcff03a5e70ccd5b12efaab1e74d15b Fixes: 34346625
This commit is contained in:
@@ -215,8 +215,16 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
|
||||
return;
|
||||
}
|
||||
mTempWarning = false;
|
||||
mNoMan.cancelAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP,
|
||||
UserHandle.ALL);
|
||||
dismissTemperatureWarningInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal only version of {@link #dismissTemperatureWarning()} that simply dismisses
|
||||
* the notification. As such, the notification will not show again until
|
||||
* {@link #dismissTemperatureWarning()} is called.
|
||||
*/
|
||||
private void dismissTemperatureWarningInternal() {
|
||||
mNoMan.cancelAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP, UserHandle.ALL);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -388,10 +396,10 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
|
||||
} else if (action.equals(ACTION_DISMISSED_WARNING)) {
|
||||
dismissLowBatteryWarning();
|
||||
} else if (ACTION_CLICKED_TEMP_WARNING.equals(action)) {
|
||||
dismissTemperatureWarning();
|
||||
dismissTemperatureWarningInternal();
|
||||
showTemperatureDialog();
|
||||
} else if (ACTION_DISMISSED_TEMP_WARNING.equals(action)) {
|
||||
dismissTemperatureWarning();
|
||||
dismissTemperatureWarningInternal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user