summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Reynolds <juliacr@google.com> 2016-05-18 14:09:49 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-05-18 14:09:50 +0000
commit5201a6246d12830d0bb766d59e22b0320f2f99dc (patch)
treeeb779f7ffc58ad717f039eb944092a7f7627b94e
parentbbd26bc023992ee7bc6a0e682d4a343dfe3dc848 (diff)
parente97f923c1820dab0f52a4b1731a92cefdfe2ce8a (diff)
Merge "Handle PhoneStatusBarPolicy user switch callbacks on main thread" into nyc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index 8f24033e0bee..d9dd9e243b94 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -415,20 +415,35 @@ public class PhoneStatusBarPolicy implements Callback, RotationLockController.Ro
new SynchronousUserSwitchObserver() {
@Override
public void onUserSwitching(int newUserId) throws RemoteException {
- mUserInfoController.reloadUserInfo();
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ mUserInfoController.reloadUserInfo();
+ }
+ });
}
@Override
public void onUserSwitchComplete(int newUserId) throws RemoteException {
- updateAlarm();
- profileChanged(newUserId);
- updateQuietState();
- updateManagedProfile();
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ updateAlarm();
+ profileChanged(newUserId);
+ updateQuietState();
+ updateManagedProfile();
+ }
+ });
}
@Override
public void onForegroundProfileSwitch(int newProfileId) {
- profileChanged(newProfileId);
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ profileChanged(newProfileId);
+ }
+ });
}
};