diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index d17dfb831f..d26b55cf37 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -1462,7 +1462,8 @@ public abstract class RecentsView< anim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { - finishRecentsAnimation(false /* toRecents */, null); + finishRecentsAnimation(false /* toRecents */, true /*shouldPip*/, + allAppsAreTranslucent(apps), null); } }); } else { @@ -1473,6 +1474,18 @@ public abstract class RecentsView< anim.start(); } + private boolean allAppsAreTranslucent(RemoteAnimationTarget[] apps) { + if (apps == null) { + return false; + } + for (int i = apps.length - 1; i >= 0; --i) { + if (!apps[i].isTranslucent) { + return false; + } + } + return true; + } + public boolean isTaskViewVisible(TaskView tv) { if (showAsGrid()) { int screenStart = getPagedOrientationHandler().getPrimaryScroll(this);