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

Commit 092b4a0f authored by Hongwei Wang's avatar Hongwei Wang
Browse files

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
parent 1ba4fcf0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);