summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-26 16:33:13 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-26 16:33:13 +0000
commit677f3512b0b912105e1f560a639a261be7bb9394 (patch)
treeb75a3def96a0ee2776002e200eb3c7ccdb0a680e
parent6c245f279c358e21ba9fb0e317d202a73dfaf4be (diff)
parenta8688cb234622fa644170d819b5a61ae669502eb (diff)
downloadbase-677f3512b0b912105e1f560a639a261be7bb9394.tar.gz
Merge cherrypicks of ['googleplex-android-review.googlesource.com/21447325'] into tm-qpr2-b-release.
Change-Id: I953bbfa0f3b260929c5e73e0ff529a6844f5a044
-rw-r--r--services/core/java/com/android/server/display/DisplayPowerController.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index f88a3372a4ac..3b70c93ea050 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -132,6 +132,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
private static final int MSG_UPDATE_RBC = 11;
private static final int MSG_BRIGHTNESS_RAMP_DONE = 12;
private static final int MSG_STATSD_HBM_BRIGHTNESS = 13;
+ private static final int MSG_SWITCH_USER = 14;
private static final int PROXIMITY_UNKNOWN = -1;
private static final int PROXIMITY_NEGATIVE = 0;
@@ -701,6 +702,11 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
}
public void onSwitchUser(@UserIdInt int newUserId) {
+ Message msg = mHandler.obtainMessage(MSG_SWITCH_USER, newUserId);
+ mHandler.sendMessage(msg);
+ }
+
+ private void handleOnSwitchUser(@UserIdInt int newUserId) {
handleSettingsChange(true /* userSwitch */);
handleBrightnessModeChange();
if (mBrightnessTracker != null) {
@@ -3163,6 +3169,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
case MSG_STATSD_HBM_BRIGHTNESS:
logHbmBrightnessStats(Float.intBitsToFloat(msg.arg1), msg.arg2);
break;
+
+ case MSG_SWITCH_USER:
+ handleOnSwitchUser(msg.arg1);
+ break;
}
}
}