Merge "PiP: Re-attach PiP menu when display changes." into tm-dev am: ec56afe31b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17871121

Change-Id: I057b7d16b87f053ef6e6f8b9f014293cb613a7a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ben Lin
2022-04-21 18:32:25 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 1 deletions

View File

@@ -172,7 +172,7 @@ public class PhonePipMenuController implements PipMenuController {
detachPipMenuView();
}
private void attachPipMenuView() {
void attachPipMenuView() {
// In case detach was not called (e.g. PIP unexpectedly closed)
if (mPipMenuView != null) {
detachPipMenuView();

View File

@@ -521,6 +521,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
};
if (mPipTaskOrganizer.isInPip() && saveRestoreSnapFraction) {
mMenuController.attachPipMenuView();
// Calculate the snap fraction of the current stack along the old movement bounds
final PipSnapAlgorithm pipSnapAlgorithm = mPipBoundsAlgorithm.getSnapAlgorithm();
final Rect postChangeStackBounds = new Rect(mPipBoundsState.getBounds());