Merge "Fixed a bug where the AssistComponent was outdated" into mnc-dev

This commit is contained in:
Selim Cinek
2015-06-23 15:00:39 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 0 deletions

View File

@@ -311,4 +311,12 @@ public class AssistManager {
public void showDisclosure() {
mAssistDisclosure.postShow();
}
public void onUserSwitched(int newUserId) {
updateAssistInfo();
}
public void prepareBeforeInvocation() {
updateAssistInfo();
}
}

View File

@@ -1049,6 +1049,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
private int mShowSearchHoldoff = 0;
private Runnable mInvokeAssist = new Runnable() {
public void run() {
mAssistManager.prepareBeforeInvocation();
invokeAssistGesture(true /* vibrate */);
awakenDreams();
if (mNavigationBarView != null) {
@@ -2938,6 +2939,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
updateNotifications();
resetUserSetupObserver();
setControllerUsers();
mAssistManager.onUserSwitched(newUserId);
}
private void setControllerUsers() {