commit | 092b4a0f92d444f1a818f4bdcd71490148487776 | [log] [tgz] |
---|---|---|
author | Hongwei Wang <hwwang@google.com> | Wed Dec 08 09:23:53 2021 -0800 |
committer | Hongwei Wang <hwwang@google.com> | Wed Dec 08 09:23:53 2021 -0800 |
tree | 36aa40e45ddb80066ee86d5dbeacb3b81d63210d | |
parent | 1ba4fcf07687b37c91e270769554f05087639771 [diff] |
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
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipDismissTargetHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipDismissTargetHandler.java index 8467cc5..92a3598 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipDismissTargetHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipDismissTargetHandler.java
@@ -122,7 +122,7 @@ 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);