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

Commit 9e0f324e authored by David Saff's avatar David Saff
Browse files

BubbleController: Remove stack view even when broadcast receiver missing

Bug: 253647225
Test: atest BubblesTest, also see bug for abtd run.
Change-Id: Ia60fb73fc3cff887af466b21f140f1ad01261dd1
parent 0310eb67
Loading
Loading
Loading
Loading
+11 −3
Original line number Original line Diff line number Diff line
@@ -671,10 +671,18 @@ public class BubbleController implements ConfigurationChangeListener {
            return;
            return;
        }
        }


        try {
        mAddedToWindowManager = false;
        mAddedToWindowManager = false;
        // Put on background for this binder call, was causing jank
        // Put on background for this binder call, was causing jank
            mBackgroundExecutor.execute(() -> mContext.unregisterReceiver(mBroadcastReceiver));
        mBackgroundExecutor.execute(() -> {
            try {
                mContext.unregisterReceiver(mBroadcastReceiver);
            } catch (IllegalArgumentException e) {
                // Not sure if this happens in production, but was happening in tests
                // (b/253647225)
                e.printStackTrace();
            }
        });
        try {
            if (mStackView != null) {
            if (mStackView != null) {
                mWindowManager.removeView(mStackView);
                mWindowManager.removeView(mStackView);
                mBubbleData.getOverflow().cleanUpExpandedState();
                mBubbleData.getOverflow().cleanUpExpandedState();