Don't invalidate short term model when idle

We don't want to invalidate the short term model when idle, as this
mode requires the short term model to remain active for the entire
duration of being idle.
We reset the short term model after, when switching from idle to
interactive.

Bug: 205686510
Test: manual
Change-Id: I10e66d86711024af64ab6a6afc5dd8d7b4117041
This commit is contained in:
Fiona Campbell
2022-01-26 17:31:04 +00:00
parent c83914f97b
commit bc3fc104fc

View File

@@ -412,7 +412,7 @@ class AutomaticBrightnessController {
if (mLoggingEnabled) {
Slog.d(TAG, "Display policy transitioning from " + oldPolicy + " to " + policy);
}
if (!isInteractivePolicy(policy) && isInteractivePolicy(oldPolicy)) {
if (!isInteractivePolicy(policy) && isInteractivePolicy(oldPolicy) && !isInIdleMode()) {
mHandler.sendEmptyMessageDelayed(MSG_INVALIDATE_SHORT_TERM_MODEL,
mCurrentBrightnessMapper.getShortTermModelTimeout());
} else if (isInteractivePolicy(policy) && !isInteractivePolicy(oldPolicy)) {