Fix gravity issue when enabling expanded PiP (TV)

Bug: 226570096
Fixes: 226570096
Test: manual - open expanded PiP, close PiP, open regular PiP, add
expanded aspect ratio to the PiP

Change-Id: I951db94a23ee1c885dfa508ea02f1329f604742e
This commit is contained in:
Jacqueline Bronger
2022-03-25 11:29:48 +01:00
parent 84dedaffac
commit b258b21892

View File

@@ -96,12 +96,13 @@ public class TvPipBoundsAlgorithm extends PipBoundsAlgorithm {
"%s: getEntryDestinationBounds()", TAG);
}
updateExpandedPipSize();
if (mTvPipBoundsState.isTvExpandedPipSupported()
final boolean isPipExpanded = mTvPipBoundsState.isTvExpandedPipSupported()
&& mTvPipBoundsState.getDesiredTvExpandedAspectRatio() != 0
&& !mTvPipBoundsState.isTvPipManuallyCollapsed()) {
&& !mTvPipBoundsState.isTvPipManuallyCollapsed();
if (isPipExpanded) {
updateGravityOnExpandToggled(Gravity.NO_GRAVITY, true);
mTvPipBoundsState.setTvPipExpanded(true);
}
mTvPipBoundsState.setTvPipExpanded(isPipExpanded);
return getTvPipBounds().getBounds();
}