diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index fce60aec44..9fa36bf3df 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -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. */