From bc3fc104fc1f4c7e9d32aa121cbd50e805aecfde Mon Sep 17 00:00:00 2001 From: Fiona Campbell Date: Wed, 26 Jan 2022 17:31:04 +0000 Subject: [PATCH] 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 --- .../android/server/display/AutomaticBrightnessController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/display/AutomaticBrightnessController.java b/services/core/java/com/android/server/display/AutomaticBrightnessController.java index f4c36c6b6ec2a..1b552577308de 100644 --- a/services/core/java/com/android/server/display/AutomaticBrightnessController.java +++ b/services/core/java/com/android/server/display/AutomaticBrightnessController.java @@ -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)) {