[Pip2] Reload Recents when IPipAnimationListener#onExitPip
is triggered instead of in RecentsView#onActivityUnpinned, so that Recents is updated in sync with PiP transitions. Bug: 416075099 Test: m Test: Presubmits Flag: com.android.wm.shell.enable_pip2 Change-Id: If593c2e7271e972e96b1ab21b4396af66b1e3ea4
This commit is contained in:
1 parent
505814903b
commit
c4cc2a52f1
1 file changed
+14
-1
@@ -657,7 +657,10 @@ public abstract class RecentsView<
|
||||
return;
|
||||
}
|
||||
|
||||
reloadIfNeeded();
|
||||
// If PiP2 is enabled, we will trigger the reload only after the Transition is finished.
|
||||
if (!PipFlags.isPip2ExperimentEnabled()) {
|
||||
reloadIfNeeded();
|
||||
}
|
||||
enableLayoutTransitions();
|
||||
}
|
||||
|
||||
@@ -6919,6 +6922,16 @@ public abstract class RecentsView<
|
||||
mRecentsView.mSizeStrategy.getTaskbarController().onExpandPip();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExitPip() {
|
||||
MAIN_EXECUTOR.execute(() -> {
|
||||
if (mRecentsView == null || !PipFlags.isPip2ExperimentEnabled()) {
|
||||
return;
|
||||
}
|
||||
mRecentsView.reloadIfNeeded();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** Get the color used for foreground scrimming the RecentsView for sharing. */
|
||||
|
||||
Reference in new issue
Block a user