Fix janky add guest transition

Delay updating the user switcher until the
switch is complete, so we aren't showing
an intermediate state while the screen is
frozen.

Also pokes the UserInfoController to update
the user avatar while the screen is still frozen
so it is ready by thawing time.

Bug: 22557684
Change-Id: I020b8c1ad42c03ab9162ed384ecfe54ed12f998d
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 b2a67bd..53dae5c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -44,6 +44,7 @@
 import com.android.systemui.statusbar.policy.CastController;
 import com.android.systemui.statusbar.policy.CastController.CastDevice;
 import com.android.systemui.statusbar.policy.HotspotController;
+import com.android.systemui.statusbar.policy.UserInfoController;
 
 /**
  * This class contains all of the policy about which icons are installed in the status
@@ -69,6 +70,7 @@
     private final CastController mCast;
     private final HotspotController mHotspot;
     private final AlarmManager mAlarmManager;
+    private final UserInfoController mUserInfoController;
 
     // Assume it's all good unless we hear otherwise.  We don't always seem
     // to get broadcasts that it *is* there.
@@ -111,12 +113,14 @@
         }
     };
 
-    public PhoneStatusBarPolicy(Context context, CastController cast, HotspotController hotspot) {
+    public PhoneStatusBarPolicy(Context context, CastController cast, HotspotController hotspot,
+            UserInfoController userInfoController) {
         mContext = context;
         mCast = cast;
         mHotspot = hotspot;
         mService = (StatusBarManager) context.getSystemService(Context.STATUS_BAR_SERVICE);
         mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
+        mUserInfoController = userInfoController;
 
         // listen for broadcasts
         IntentFilter filter = new IntentFilter();
@@ -360,6 +364,7 @@
             new IUserSwitchObserver.Stub() {
                 @Override
                 public void onUserSwitching(int newUserId, IRemoteCallback reply) {
+                    mUserInfoController.reloadUserInfo();
                 }
 
                 @Override