diff options
| author | 2017-02-06 19:42:28 +0000 | |
|---|---|---|
| committer | 2017-02-06 19:42:33 +0000 | |
| commit | 5f7a49bc38b10cf14e04d6536f021dd624556f60 (patch) | |
| tree | 706761338e3fd094223b1c9bfab71179180b04a7 | |
| parent | 5bed8d17af58b4670524ea3e01ce2a7e7558fd50 (diff) | |
| parent | 0c7592ffacd21c52f2fb30313b56dd9b5e9bf6f4 (diff) | |
Merge "Fixing crash when fetching SysUI components for secondary user."
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/SystemUIApplication.java | 1 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/Recents.java | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java index a9ac2d97903b..27070edc73e5 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java @@ -87,6 +87,7 @@ public class SystemUIApplication extends Application implements SysUiServiceProv * above. */ private final Class<?>[] SERVICES_PER_USER = new Class[] { + Dependency.class, Recents.class, PipUI.class }; diff --git a/packages/SystemUI/src/com/android/systemui/recents/Recents.java b/packages/SystemUI/src/com/android/systemui/recents/Recents.java index 9157e3377dd9..e635162807e2 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/Recents.java +++ b/packages/SystemUI/src/com/android/systemui/recents/Recents.java @@ -205,7 +205,6 @@ public class Recents extends SystemUI sTaskLoader = new RecentsTaskLoader(mContext); sConfiguration = new RecentsConfiguration(mContext); mHandler = new Handler(); - getComponent(CommandQueue.class).addCallbacks(this); UiModeManager uiModeManager = (UiModeManager) mContext. getSystemService(Context.UI_MODE_SERVICE); if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) { @@ -234,6 +233,7 @@ public class Recents extends SystemUI if (sSystemServicesProxy.isSystemUser(processUser)) { // For the system user, initialize an instance of the interface that we can pass to the // secondary user + getComponent(CommandQueue.class).addCallbacks(this); mSystemToUserCallbacks = new RecentsSystemUser(mContext, mImpl); } else { // For the secondary user, bind to the primary user's service to get a persistent |