Loading core/java/android/view/RemoteAnimationTarget.java +9 −1 Original line number Diff line number Diff line Loading @@ -109,9 +109,14 @@ public class RemoteAnimationTarget implements Parcelable { */ public final WindowConfiguration windowConfiguration; /** * Whether the task is not presented in Recents UI. */ public boolean isNotInRecents; public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, Rect clipRect, Rect contentInsets, int prefixOrderIndex, Point position, Rect sourceContainerBounds, WindowConfiguration windowConfig) { Rect sourceContainerBounds, WindowConfiguration windowConfig, boolean isNotInRecents) { this.mode = mode; this.taskId = taskId; this.leash = leash; Loading @@ -122,6 +127,7 @@ public class RemoteAnimationTarget implements Parcelable { this.position = new Point(position); this.sourceContainerBounds = new Rect(sourceContainerBounds); this.windowConfiguration = windowConfig; this.isNotInRecents = isNotInRecents; } public RemoteAnimationTarget(Parcel in) { Loading @@ -135,6 +141,7 @@ public class RemoteAnimationTarget implements Parcelable { position = in.readParcelable(null); sourceContainerBounds = in.readParcelable(null); windowConfiguration = in.readParcelable(null); isNotInRecents = in.readBoolean(); } @Override Loading @@ -154,6 +161,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeParcelable(position, 0 /* flags */); dest.writeParcelable(sourceContainerBounds, 0 /* flags */); dest.writeParcelable(windowConfiguration, 0 /* flags */); dest.writeBoolean(isNotInRecents); } public static final Creator<RemoteAnimationTarget> CREATOR Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +2 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.shared.system; import static android.app.WindowConfiguration.ACTIVITY_TYPE_ASSISTANT; import android.app.WindowConfiguration; import android.graphics.Point; import android.graphics.Rect; import android.view.RemoteAnimationTarget; Loading @@ -39,6 +38,7 @@ public class RemoteAnimationTargetCompat { public final int prefixOrderIndex; public final Point position; public final Rect sourceContainerBounds; public final boolean isNotInRecents; private final RemoteAnimationTarget mTarget; Loading @@ -52,6 +52,7 @@ public class RemoteAnimationTargetCompat { position = app.position; sourceContainerBounds = app.sourceContainerBounds; prefixOrderIndex = app.prefixOrderIndex; isNotInRecents = app.isNotInRecents; } public static RemoteAnimationTargetCompat[] wrap(RemoteAnimationTarget[] apps) { Loading services/core/java/com/android/server/am/RecentTasks.java +19 −0 Original line number Diff line number Diff line Loading @@ -827,6 +827,25 @@ class RecentTasks { return mTasks; } /** * @return ids of tasks that are presented in Recents UI. */ SparseBooleanArray getRecentTaskIds() { final SparseBooleanArray res = new SparseBooleanArray(); final int size = mTasks.size(); int numVisibleTasks = 0; for (int i = 0; i < size; i++) { final TaskRecord tr = mTasks.get(i); if (isVisibleRecentTask(tr)) { numVisibleTasks++; if (isInVisibleRange(tr, numVisibleTasks)) { res.put(tr.taskId, true); } } } return res; } /** * @return the task in the task list with the given {@param id} if one exists. */ Loading services/core/java/com/android/server/am/RecentsAnimation.java +1 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.server.am; import static android.app.ActivityManager.StackId.INVALID_STACK_ID; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION; Loading Loading @@ -139,7 +138,7 @@ class RecentsAnimation implements RecentsAnimationCallbacks { // started mWindowManager.cancelRecentsAnimation(); mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, display.mDisplayId); display.mDisplayId, mStackSupervisor.mRecentTasks.getRecentTaskIds()); // If we updated the launch-behind state, update the visibility of the activities after // we fetch the visible tasks to be controlled by the animation Loading services/core/java/com/android/server/wm/RecentsAnimationController.java +11 −8 Original line number Diff line number Diff line Loading @@ -29,12 +29,12 @@ import android.app.WindowConfiguration; import android.graphics.Point; import android.graphics.Rect; import android.os.Binder; import android.os.IBinder; import android.os.RemoteException; import android.os.SystemClock; import android.util.ArraySet; import android.util.Log; import android.util.Slog; import android.util.SparseBooleanArray; import android.view.IRecentsAnimationController; import android.view.IRecentsAnimationRunner; import android.view.RemoteAnimationTarget; Loading Loading @@ -175,7 +175,7 @@ public class RecentsAnimationController { * because it may call cancelAnimation() which needs to properly clean up the controller * in the window manager. */ public void initialize() { public void initialize(SparseBooleanArray recentTaskIds) { // Make leashes for each of the visible tasks and add it to the recents animation to be // started final DisplayContent dc = mService.mRoot.getDisplayContent(mDisplayId); Loading @@ -189,7 +189,7 @@ public class RecentsAnimationController { || config.getActivityType() == ACTIVITY_TYPE_HOME) { continue; } addAnimation(task); addAnimation(task, !recentTaskIds.get(task.mTaskId)); } // Skip the animation if there is nothing to animate Loading @@ -216,11 +216,12 @@ public class RecentsAnimationController { mService.mWindowPlacerLocked.performSurfacePlacement(); } private void addAnimation(Task task) { private void addAnimation(Task task, boolean isRecentTaskInvisible) { if (DEBUG) Log.d(TAG, "addAnimation(" + task.getName() + ")"); final SurfaceAnimator anim = new SurfaceAnimator(task, null /* animationFinishedCallback */, mService); final TaskAnimationAdapter taskAdapter = new TaskAnimationAdapter(task); final TaskAnimationAdapter taskAdapter = new TaskAnimationAdapter(task, isRecentTaskInvisible); anim.startAnimation(task.getPendingTransaction(), taskAdapter, false /* hidden */); task.commitPendingTransaction(); mPendingAnimations.add(taskAdapter); Loading Loading @@ -343,12 +344,14 @@ public class RecentsAnimationController { private class TaskAnimationAdapter implements AnimationAdapter { private Task mTask; private final Task mTask; private SurfaceControl mCapturedLeash; private OnAnimationFinishedCallback mCapturedFinishCallback; private final boolean mIsRecentTaskInvisible; TaskAnimationAdapter(Task task) { TaskAnimationAdapter(Task task, boolean isRecentTaskInvisible) { mTask = task; mIsRecentTaskInvisible = isRecentTaskInvisible; } RemoteAnimationTarget createRemoteAnimationApp() { Loading @@ -361,7 +364,7 @@ public class RecentsAnimationController { return new RemoteAnimationTarget(mTask.mTaskId, MODE_CLOSING, mCapturedLeash, !mTask.fillsParent(), mainWindow.mWinAnimator.mLastClipRect, mainWindow.mContentInsets, mTask.getPrefixOrderIndex(), position, bounds, mTask.getWindowConfiguration()); mTask.getWindowConfiguration(), mIsRecentTaskInvisible); } @Override Loading Loading
core/java/android/view/RemoteAnimationTarget.java +9 −1 Original line number Diff line number Diff line Loading @@ -109,9 +109,14 @@ public class RemoteAnimationTarget implements Parcelable { */ public final WindowConfiguration windowConfiguration; /** * Whether the task is not presented in Recents UI. */ public boolean isNotInRecents; public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent, Rect clipRect, Rect contentInsets, int prefixOrderIndex, Point position, Rect sourceContainerBounds, WindowConfiguration windowConfig) { Rect sourceContainerBounds, WindowConfiguration windowConfig, boolean isNotInRecents) { this.mode = mode; this.taskId = taskId; this.leash = leash; Loading @@ -122,6 +127,7 @@ public class RemoteAnimationTarget implements Parcelable { this.position = new Point(position); this.sourceContainerBounds = new Rect(sourceContainerBounds); this.windowConfiguration = windowConfig; this.isNotInRecents = isNotInRecents; } public RemoteAnimationTarget(Parcel in) { Loading @@ -135,6 +141,7 @@ public class RemoteAnimationTarget implements Parcelable { position = in.readParcelable(null); sourceContainerBounds = in.readParcelable(null); windowConfiguration = in.readParcelable(null); isNotInRecents = in.readBoolean(); } @Override Loading @@ -154,6 +161,7 @@ public class RemoteAnimationTarget implements Parcelable { dest.writeParcelable(position, 0 /* flags */); dest.writeParcelable(sourceContainerBounds, 0 /* flags */); dest.writeParcelable(windowConfiguration, 0 /* flags */); dest.writeBoolean(isNotInRecents); } public static final Creator<RemoteAnimationTarget> CREATOR Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +2 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.shared.system; import static android.app.WindowConfiguration.ACTIVITY_TYPE_ASSISTANT; import android.app.WindowConfiguration; import android.graphics.Point; import android.graphics.Rect; import android.view.RemoteAnimationTarget; Loading @@ -39,6 +38,7 @@ public class RemoteAnimationTargetCompat { public final int prefixOrderIndex; public final Point position; public final Rect sourceContainerBounds; public final boolean isNotInRecents; private final RemoteAnimationTarget mTarget; Loading @@ -52,6 +52,7 @@ public class RemoteAnimationTargetCompat { position = app.position; sourceContainerBounds = app.sourceContainerBounds; prefixOrderIndex = app.prefixOrderIndex; isNotInRecents = app.isNotInRecents; } public static RemoteAnimationTargetCompat[] wrap(RemoteAnimationTarget[] apps) { Loading
services/core/java/com/android/server/am/RecentTasks.java +19 −0 Original line number Diff line number Diff line Loading @@ -827,6 +827,25 @@ class RecentTasks { return mTasks; } /** * @return ids of tasks that are presented in Recents UI. */ SparseBooleanArray getRecentTaskIds() { final SparseBooleanArray res = new SparseBooleanArray(); final int size = mTasks.size(); int numVisibleTasks = 0; for (int i = 0; i < size; i++) { final TaskRecord tr = mTasks.get(i); if (isVisibleRecentTask(tr)) { numVisibleTasks++; if (isInVisibleRange(tr, numVisibleTasks)) { res.put(tr.taskId, true); } } } return res; } /** * @return the task in the task list with the given {@param id} if one exists. */ Loading
services/core/java/com/android/server/am/RecentsAnimation.java +1 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.server.am; import static android.app.ActivityManager.StackId.INVALID_STACK_ID; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION; Loading Loading @@ -139,7 +138,7 @@ class RecentsAnimation implements RecentsAnimationCallbacks { // started mWindowManager.cancelRecentsAnimation(); mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, display.mDisplayId); display.mDisplayId, mStackSupervisor.mRecentTasks.getRecentTaskIds()); // If we updated the launch-behind state, update the visibility of the activities after // we fetch the visible tasks to be controlled by the animation Loading
services/core/java/com/android/server/wm/RecentsAnimationController.java +11 −8 Original line number Diff line number Diff line Loading @@ -29,12 +29,12 @@ import android.app.WindowConfiguration; import android.graphics.Point; import android.graphics.Rect; import android.os.Binder; import android.os.IBinder; import android.os.RemoteException; import android.os.SystemClock; import android.util.ArraySet; import android.util.Log; import android.util.Slog; import android.util.SparseBooleanArray; import android.view.IRecentsAnimationController; import android.view.IRecentsAnimationRunner; import android.view.RemoteAnimationTarget; Loading Loading @@ -175,7 +175,7 @@ public class RecentsAnimationController { * because it may call cancelAnimation() which needs to properly clean up the controller * in the window manager. */ public void initialize() { public void initialize(SparseBooleanArray recentTaskIds) { // Make leashes for each of the visible tasks and add it to the recents animation to be // started final DisplayContent dc = mService.mRoot.getDisplayContent(mDisplayId); Loading @@ -189,7 +189,7 @@ public class RecentsAnimationController { || config.getActivityType() == ACTIVITY_TYPE_HOME) { continue; } addAnimation(task); addAnimation(task, !recentTaskIds.get(task.mTaskId)); } // Skip the animation if there is nothing to animate Loading @@ -216,11 +216,12 @@ public class RecentsAnimationController { mService.mWindowPlacerLocked.performSurfacePlacement(); } private void addAnimation(Task task) { private void addAnimation(Task task, boolean isRecentTaskInvisible) { if (DEBUG) Log.d(TAG, "addAnimation(" + task.getName() + ")"); final SurfaceAnimator anim = new SurfaceAnimator(task, null /* animationFinishedCallback */, mService); final TaskAnimationAdapter taskAdapter = new TaskAnimationAdapter(task); final TaskAnimationAdapter taskAdapter = new TaskAnimationAdapter(task, isRecentTaskInvisible); anim.startAnimation(task.getPendingTransaction(), taskAdapter, false /* hidden */); task.commitPendingTransaction(); mPendingAnimations.add(taskAdapter); Loading Loading @@ -343,12 +344,14 @@ public class RecentsAnimationController { private class TaskAnimationAdapter implements AnimationAdapter { private Task mTask; private final Task mTask; private SurfaceControl mCapturedLeash; private OnAnimationFinishedCallback mCapturedFinishCallback; private final boolean mIsRecentTaskInvisible; TaskAnimationAdapter(Task task) { TaskAnimationAdapter(Task task, boolean isRecentTaskInvisible) { mTask = task; mIsRecentTaskInvisible = isRecentTaskInvisible; } RemoteAnimationTarget createRemoteAnimationApp() { Loading @@ -361,7 +364,7 @@ public class RecentsAnimationController { return new RemoteAnimationTarget(mTask.mTaskId, MODE_CLOSING, mCapturedLeash, !mTask.fillsParent(), mainWindow.mWinAnimator.mLastClipRect, mainWindow.mContentInsets, mTask.getPrefixOrderIndex(), position, bounds, mTask.getWindowConfiguration()); mTask.getWindowConfiguration(), mIsRecentTaskInvisible); } @Override Loading