diff options
| author | 2024-07-15 14:42:02 -0700 | |
|---|---|---|
| committer | 2024-07-15 14:57:36 -0700 | |
| commit | bfd858590bdf34581fc602e568545b207a02b36c (patch) | |
| tree | c744d1a13d54f77362599a5b0f1c4a30ffd4c1ba | |
| parent | 0adfd5f3839b96e0d469abf1a459f8c54390aa2b (diff) | |
Remove the state when forcefully remove overlay
The state check in PipTaskOrganizer#removeContentOverlay was added to
avoid double removal of the overlay. This has been addressed
alternatively by checking the leash state.
On the other hand, the state check does prevent the leash removal in the
fail-safe, since the state could have been set to undefined (since it's
moved from pip to full-screen).
Flag: EXEMPT bugfix
Bug: 352771711
Bug: 327405289
Test: restart Maps when it's entering PiP
Test: atest --iteration 5 \
CtsWindowManagerDeviceOther:PinnedStackTests \
FrameworksCoreTests:ActivityThreadTest \
WmTests:ScreenshotTests \
WmTests:TaskStackChangedListenerTest
Change-Id: I627d674128568b047e5b490252d2620307b6ab21
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java index ff40d4c6e231..8d63ff2a3a5d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java @@ -1980,12 +1980,6 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener, } clearContentOverlay(); } - if (mPipTransitionState.getTransitionState() == PipTransitionState.UNDEFINED) { - // Avoid double removal, which is fatal. - ProtoLog.w(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE, - "%s: trying to remove overlay (%s) while in UNDEFINED state", TAG, surface); - return; - } if (surface == null || !surface.isValid()) { ProtoLog.w(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE, "%s: trying to remove invalid content overlay (%s)", TAG, surface); |