Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 435b11b9 authored by Tony Wickham's avatar Tony Wickham
Browse files

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
parent 92d4086f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -391,12 +391,11 @@ public class TouchInteractionService extends Service implements PluginListener<O

    @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();