Merge "Handle PhoneStatusBarPolicy user switch callbacks on main thread" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5201a6246d
@@ -415,20 +415,35 @@ public class PhoneStatusBarPolicy implements Callback, RotationLockController.Ro
|
|||||||
new SynchronousUserSwitchObserver() {
|
new SynchronousUserSwitchObserver() {
|
||||||
@Override
|
@Override
|
||||||
public void onUserSwitching(int newUserId) throws RemoteException {
|
public void onUserSwitching(int newUserId) throws RemoteException {
|
||||||
mUserInfoController.reloadUserInfo();
|
mHandler.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mUserInfoController.reloadUserInfo();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUserSwitchComplete(int newUserId) throws RemoteException {
|
public void onUserSwitchComplete(int newUserId) throws RemoteException {
|
||||||
updateAlarm();
|
mHandler.post(new Runnable() {
|
||||||
profileChanged(newUserId);
|
@Override
|
||||||
updateQuietState();
|
public void run() {
|
||||||
updateManagedProfile();
|
updateAlarm();
|
||||||
|
profileChanged(newUserId);
|
||||||
|
updateQuietState();
|
||||||
|
updateManagedProfile();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onForegroundProfileSwitch(int newProfileId) {
|
public void onForegroundProfileSwitch(int newProfileId) {
|
||||||
profileChanged(newProfileId);
|
mHandler.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
profileChanged(newProfileId);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user