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

Commit 83a6a2cd authored by Fengjiang Li's avatar Fengjiang Li Committed by Android (Google) Code Review
Browse files

Merge "Clear mOnInitialBindListener in Launcher#onDestroy()" into main

parents d7dd3ca0 17720f16
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1711,7 +1711,11 @@ public class Launcher extends StatefulActivity<LauncherState>
        TextKeyListener.getInstance().release();
        mModelCallbacks.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();
    }