Merge "Decrease frequency of high temp warnings" into nyc-mr2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a60f7151e6
@@ -215,8 +215,16 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mTempWarning = false;
|
mTempWarning = false;
|
||||||
mNoMan.cancelAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP,
|
dismissTemperatureWarningInternal();
|
||||||
UserHandle.ALL);
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
@Override
|
||||||
@@ -388,10 +396,10 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
|
|||||||
} else if (action.equals(ACTION_DISMISSED_WARNING)) {
|
} else if (action.equals(ACTION_DISMISSED_WARNING)) {
|
||||||
dismissLowBatteryWarning();
|
dismissLowBatteryWarning();
|
||||||
} else if (ACTION_CLICKED_TEMP_WARNING.equals(action)) {
|
} else if (ACTION_CLICKED_TEMP_WARNING.equals(action)) {
|
||||||
dismissTemperatureWarning();
|
dismissTemperatureWarningInternal();
|
||||||
showTemperatureDialog();
|
showTemperatureDialog();
|
||||||
} else if (ACTION_DISMISSED_TEMP_WARNING.equals(action)) {
|
} else if (ACTION_DISMISSED_TEMP_WARNING.equals(action)) {
|
||||||
dismissTemperatureWarning();
|
dismissTemperatureWarningInternal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user