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

Commit 2552cc78 authored by Orhan Uysal's avatar Orhan Uysal
Browse files

Set the listeners to null on unregister

In some occasions, launcher leaks through DesktopVisibilityController
and SplitFromDesktopController. It seems that we don't set the listeners
to null after we unregister which might be the reason why they hold on
to the launcher activity.

Bug: 332339792
Test: m
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode TEAMFOOD
Change-Id: If52ae87cec959264109e59b1144679183c8fedcc
parent 8b0d1fb6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ public class DesktopVisibilityController {
     */
    public void unregisterSystemUiListener() {
        SystemUiProxy.INSTANCE.get(mLauncher).setDesktopTaskListener(null);
        mDesktopTaskListener = null;
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -983,6 +983,7 @@ public class SplitSelectStateController {
        void onDestroy() {
            SystemUiProxy.INSTANCE.get(mLauncher).unregisterSplitSelectListener(
                    mSplitSelectListener);
            mSplitSelectListener = null;
        }

        /**