Remove mTargetViewContainer safely
Per bugreport there is chance that PipDismissTargetHandler#mTargetViewContainer is not attached to window manager when we try to remove it in PipDismissTargetHandler#init on overlay changes (such as changing wallpaper) Bug: 209796452 Test: N/A not able to reproduce on raven Change-Id: Ic2fbe2d59145afa2c994bc75446d60f8c4415e58
This commit is contained in:
@@ -122,7 +122,7 @@ public class PipDismissTargetHandler implements ViewTreeObserver.OnPreDrawListen
|
||||
|
||||
if (mTargetViewContainer != null) {
|
||||
// init can be called multiple times, remove the old one from view hierarchy first.
|
||||
mWindowManager.removeViewImmediate(mTargetViewContainer);
|
||||
cleanUpDismissTarget();
|
||||
}
|
||||
|
||||
mTargetView = new DismissCircleView(mContext);
|
||||
|
||||
Reference in New Issue
Block a user