diff options
author | Matt Pietal <mpietal@google.com> | 2021-05-07 10:35:01 -0400 |
---|---|---|
committer | Matt Pietal <mpietal@google.com> | 2021-05-07 10:37:40 -0400 |
commit | 10e70d9e58986647f443db5492932d520c37dcdb (patch) | |
tree | 23f4ce2d25bf6f242c327abd8bb607cf5a60d61f /packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java | |
parent | 006f1a69d0ee975148e4dc5e2023f0911190d2c3 (diff) |
Smartspace - Do not listen for user changes
The KeyguardClockSwitchController will already be recreated on a user
switch. This was adding a 2nd call, and then attempting reload
smartspace on a detached view.
Fixes: 187467770
Test: atest KeyguardClockSwitchControllerTest
Change-Id: I1f153c029481fe4915d42f7334cbb9534f89a42b
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java index dfe035d23411..4b71a3a8fbdc 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java @@ -25,7 +25,6 @@ import android.app.smartspace.SmartspaceConfig; import android.app.smartspace.SmartspaceManager; import android.app.smartspace.SmartspaceSession; import android.app.smartspace.SmartspaceTarget; -import android.content.Context; import android.content.Intent; import android.content.pm.UserInfo; import android.content.res.Resources; @@ -112,7 +111,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private boolean mShowSensitiveContentForCurrentUser; private boolean mShowSensitiveContentForManagedUser; private UserHandle mManagedUserHandle; - private UserTracker.Callback mUserTrackerCallback; /** * Listener for changes to the color palette. @@ -294,13 +292,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS } }; - mUserTrackerCallback = new UserTracker.Callback() { - public void onUserChanged(int newUser, Context userContext) { - reloadSmartspace(); - } - }; - mUserTracker.addCallback(mUserTrackerCallback, mUiExecutor); - getContext().getContentResolver().registerContentObserver( Settings.Secure.getUriFor( Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS), @@ -376,10 +367,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS if (mSettingsObserver != null) { getContext().getContentResolver().unregisterContentObserver(mSettingsObserver); } - - if (mUserTrackerCallback != null) { - mUserTracker.removeCallback(mUserTrackerCallback); - } } /** |