commit | 435b11b95fd83901e7c2dc36269442b3c1312c95 | [log] [tgz] |
---|---|---|
author | Tony Wickham <twickham@google.com> | Fri Nov 22 16:06:49 2019 -0800 |
committer | Tony Wickham <twickham@google.com> | Fri Nov 22 16:06:49 2019 -0800 |
tree | 356e48920763b2aa6cbe669365827382d43d3231 | |
parent | 92d4086fda48216015795230b5b0dc429f7f73f6 [diff] |
Don't removePluginListener() unless user is unlocked This just crashes since we can't access SharedPreferences, and we don't addPluginListener until onUserUnlocked() anyway. Change-Id: I705498f859857a52a2cb5735201a652973b26d0b
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java index 71f8ba4..07537ed 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
@@ -391,12 +391,11 @@ @Override public void onDestroy() { - PluginManagerWrapper.INSTANCE.get(getBaseContext()).removePluginListener(this); - sIsInitialized = false; if (mDeviceState.isUserUnlocked()) { mInputConsumer.unregisterInputConsumer(); mOverviewComponentObserver.onDestroy(); + PluginManagerWrapper.INSTANCE.get(getBaseContext()).removePluginListener(this); } disposeEventHandlers(); mDeviceState.destroy();