BubbleController: Remove stack view even when broadcast receiver missing
Bug: 253647225 Test: atest BubblesTest, also see bug for abtd run. Change-Id: Ia60fb73fc3cff887af466b21f140f1ad01261dd1
This commit is contained in:
@@ -671,10 +671,18 @@ public class BubbleController implements ConfigurationChangeListener {
|
||||
return;
|
||||
}
|
||||
|
||||
mAddedToWindowManager = false;
|
||||
// Put on background for this binder call, was causing jank
|
||||
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 {
|
||||
mAddedToWindowManager = false;
|
||||
// Put on background for this binder call, was causing jank
|
||||
mBackgroundExecutor.execute(() -> mContext.unregisterReceiver(mBroadcastReceiver));
|
||||
if (mStackView != null) {
|
||||
mWindowManager.removeView(mStackView);
|
||||
mBubbleData.getOverflow().cleanUpExpandedState();
|
||||
|
||||
Reference in New Issue
Block a user