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

Commit e8b378a5 authored by David Saff's avatar David Saff Committed by Android (Google) Code Review
Browse files

Merge "BubbleController: Remove stack view even when broadcast receiver missing"

parents 152b8791 9e0f324e
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -671,10 +671,18 @@ public class BubbleController implements ConfigurationChangeListener {
            return;
        }

        try {
        mAddedToWindowManager = false;
        // 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) {
                mWindowManager.removeView(mStackView);
                mBubbleData.getOverflow().cleanUpExpandedState();