Move addPluginListener to onUserUnlocked

addPluginListener() needs to be moved into onUserUnlocked() since it
reads from the shared preferences. This fixes a crash in
Launcher3QuickStepGo on wembley.

Bug: 143249037
Change-Id: Ib60f688cb3f91e377141fab1ad9f2a0071c96694
This commit is contained in:
Winson Chung
2019-10-24 13:44:43 -07:00
committed by Peter Kalauskas
parent 85561d1e44
commit eed626a63c
@@ -279,9 +279,6 @@ public class TouchInteractionService extends Service implements PluginListener<O
mDeviceState.runOnUserUnlocked(this::onUserUnlocked);
sConnected = true;
PluginManagerWrapper.INSTANCE.get(getBaseContext()).addPluginListener(this,
OverscrollPlugin.class, false /* allowMultiple */);
}
private void disposeEventHandlers() {
@@ -348,6 +345,9 @@ public class TouchInteractionService extends Service implements PluginListener<O
mBackGestureNotificationCounter = Math.max(0, Utilities.getDevicePrefs(this)
.getInt(KEY_BACK_NOTIFICATION_COUNT, MAX_BACK_NOTIFICATION_COUNT));
resetHomeBounceSeenOnQuickstepEnabledFirstTime();
PluginManagerWrapper.INSTANCE.get(getBaseContext()).addPluginListener(this,
OverscrollPlugin.class, false /* allowMultiple */);
}
private void onDeferredActivityLaunch() {