commit | 9a634991cf5fe5c8c44b643554330c87d7672e4a | [log] [tgz] |
---|---|---|
author | Selim Cinek <cinek@google.com> | Tue Jun 23 01:10:07 2015 -0400 |
committer | Selim Cinek <cinek@google.com> | Tue Jun 23 01:11:25 2015 -0400 |
tree | 35b871ec73a5a7e75b8cf9166a303cf18bbc49d0 | |
parent | 9f49dcda24ea63efc8b16d0c7d69cc697cdf20d7 [diff] |
Fixed a bug where the AssistComponent was outdated It also wasn’t updated when switching users. Bug: 22005038 Change-Id: I45e58de5f48e3769f114ff830d62c287d2b04d4f
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java index 674356b..7838119 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java +++ b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
@@ -311,4 +311,12 @@ public void showDisclosure() { mAssistDisclosure.postShow(); } + + public void onUserSwitched(int newUserId) { + updateAssistInfo(); + } + + public void prepareBeforeInvocation() { + updateAssistInfo(); + } }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 16df64c..cde743a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1028,6 +1028,7 @@ private int mShowSearchHoldoff = 0; private Runnable mInvokeAssist = new Runnable() { public void run() { + mAssistManager.prepareBeforeInvocation(); invokeAssistGesture(true /* vibrate */); awakenDreams(); if (mNavigationBarView != null) { @@ -2917,6 +2918,7 @@ updateNotifications(); resetUserSetupObserver(); setControllerUsers(); + mAssistManager.onUserSwitched(newUserId); } private void setControllerUsers() {