Merge "Fix the expand button changing too soon"

This commit is contained in:
Ivan Makarov
2022-07-07 16:06:07 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -200,7 +200,7 @@ public class TvPipMenuController implements PipMenuController, TvPipMenuView.Lis
void notifyPipAnimating(boolean animating) {
mPipMenuView.setEduTextActive(!animating);
if (!animating) {
mPipMenuView.onPipTransitionFinished();
mPipMenuView.onPipTransitionFinished(mTvPipBoundsState.isTvPipExpanded());
}
}
@@ -267,7 +267,6 @@ public class TvPipMenuController implements PipMenuController, TvPipMenuView.Lis
void updateExpansionState() {
mPipMenuView.setExpandedModeEnabled(mTvPipBoundsState.isTvExpandedPipSupported()
&& mTvPipBoundsState.getDesiredTvExpandedAspectRatio() != 0);
mPipMenuView.setIsExpanded(mTvPipBoundsState.isTvPipExpanded());
}
private Rect calculateMenuSurfaceBounds(Rect pipBounds) {

View File

@@ -266,7 +266,7 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener {
}
}
void onPipTransitionFinished() {
void onPipTransitionFinished(boolean isTvPipExpanded) {
ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
"%s: onPipTransitionFinished()", TAG);
@@ -277,6 +277,8 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener {
.setInterpolator(TvPipInterpolators.ENTER)
.start();
setIsExpanded(isTvPipExpanded);
// Update buttons.
if (mSwitchingOrientation) {
mActionButtonsContainer.animate()