Merge "Use list instead of array when filtering non-app leashes" into sc-v2-dev

This commit is contained in:
TreeHugger Robot 2022-01-06 00:25:34 +00:00 committed by Android (Google) Code Review
commit 5735251c33
2 changed files with 5 additions and 4 deletions

View File

@ -1001,7 +1001,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
} }
if (mRecentsAnimationTargets != null) { if (mRecentsAnimationTargets != null) {
TaskViewUtils.setSplitAuxiliarySurfacesShown(mRecentsAnimationTargets.nonApps, TaskViewUtils.setSplitAuxiliarySurfacesShown(mRecentsAnimationTargets.nonApps,
true /*shown*/, true /*animate*/); true /*shown*/, false /*animate*/);
} }
break; break;
} }
@ -1654,7 +1654,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
if (mRecentsAnimationTargets != null) { if (mRecentsAnimationTargets != null) {
TaskViewUtils.setSplitAuxiliarySurfacesShown(mRecentsAnimationTargets.nonApps, TaskViewUtils.setSplitAuxiliarySurfacesShown(mRecentsAnimationTargets.nonApps,
true /*shown*/, true /*animate*/); true /*shown*/, false /*animate*/);
} }
// Leave the pending invisible flag, as it may be used by wallpaper open animation. // Leave the pending invisible flag, as it may be used by wallpaper open animation.

View File

@ -84,6 +84,7 @@ import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat.SurfaceParams; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat.SurfaceParams;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
/** /**
* Utility class for helpful methods related to {@link TaskView} objects and their tasks. * Utility class for helpful methods related to {@link TaskView} objects and their tasks.
@ -606,13 +607,13 @@ public final class TaskViewUtils {
} }
SurfaceControl.Transaction t = new SurfaceControl.Transaction(); SurfaceControl.Transaction t = new SurfaceControl.Transaction();
SurfaceControl[] auxiliarySurfaces = new SurfaceControl[nonApps.length]; List<SurfaceControl> auxiliarySurfaces = new ArrayList<>(nonApps.length);
boolean hasSurfaceToAnimate = false; boolean hasSurfaceToAnimate = false;
for (int i = 0; i < nonApps.length; ++i) { for (int i = 0; i < nonApps.length; ++i) {
final RemoteAnimationTargetCompat targ = nonApps[i]; final RemoteAnimationTargetCompat targ = nonApps[i];
final SurfaceControl leash = targ.leash.getSurfaceControl(); final SurfaceControl leash = targ.leash.getSurfaceControl();
if (targ.windowType == TYPE_DOCK_DIVIDER && leash != null) { if (targ.windowType == TYPE_DOCK_DIVIDER && leash != null) {
auxiliarySurfaces[i] = leash; auxiliarySurfaces.add(leash);
hasSurfaceToAnimate = true; hasSurfaceToAnimate = true;
} }
} }