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

Commit 17720f16 authored by Fengjiang Li's avatar Fengjiang Li
Browse files

Clear mOnInitialBindListener in Launcher#onDestroy()

Bug: 305643224
Test: manual
Flag: N/A
Change-Id: I8c5f670dc7d42eb03e0017a11a0beca2c5005cd3
parent e861fa05
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1721,7 +1721,11 @@ public class Launcher extends StatefulActivity<LauncherState>
        TextKeyListener.getInstance().release();
        clearPendingBinds();
        LauncherAppState.getIDP(this).removeOnChangeListener(this);

        // if Launcher activity is recreated, {@link Window} including {@link ViewTreeObserver}
        // could be preserved in {@link ActivityThread#scheduleRelaunchActivity(IBinder)} if the
        // previous activity has not stopped, which could happen when wallpaper detects a color
        // changes while launcher is still loading.
        getRootView().getViewTreeObserver().removeOnPreDrawListener(mOnInitialBindListener);
        mOverlayManager.onActivityDestroyed();
    }