Fix orientation change between PiPs when collapsed

Bug: 226571625
Fixes: 226571625
Test: manual - open vertical expanded PiP, close PiP, open horizontal
expanded PiP

Change-Id: I574e53d496b9b03539970f380b4ee1a5ec5d36fc
This commit is contained in:
Jacqueline Bronger
2022-03-24 16:09:08 +01:00
parent c037af53ba
commit 84dedaffac

View File

@@ -95,10 +95,10 @@ public class TvPipBoundsAlgorithm extends PipBoundsAlgorithm {
ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
"%s: getEntryDestinationBounds()", TAG);
}
updateExpandedPipSize();
if (mTvPipBoundsState.isTvExpandedPipSupported()
&& mTvPipBoundsState.getDesiredTvExpandedAspectRatio() != 0
&& !mTvPipBoundsState.isTvPipManuallyCollapsed()) {
updateExpandedPipSize();
updateGravityOnExpandToggled(Gravity.NO_GRAVITY, true);
mTvPipBoundsState.setTvPipExpanded(true);
}