summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boot/hiddenapi/hiddenapi-unsupported.txt1
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentTasks.aidl2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentsAnimationController.aidl (renamed from core/java/android/view/IRecentsAnimationController.aidl)72
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentsAnimationRunner.aidl (renamed from core/java/android/view/IRecentsAnimationRunner.aidl)6
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java29
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java2
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/recents/view/RecentsTransition.java30
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java49
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationListener.java10
10 files changed, 8 insertions, 195 deletions
diff --git a/boot/hiddenapi/hiddenapi-unsupported.txt b/boot/hiddenapi/hiddenapi-unsupported.txt
index adcc3df2d7fe..70e5a68745bc 100644
--- a/boot/hiddenapi/hiddenapi-unsupported.txt
+++ b/boot/hiddenapi/hiddenapi-unsupported.txt
@@ -183,7 +183,6 @@ Landroid/view/autofill/IAutoFillManager$Stub$Proxy;-><init>(Landroid/os/IBinder;
Landroid/view/autofill/IAutoFillManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/autofill/IAutoFillManager;
Landroid/view/IAppTransitionAnimationSpecsFuture$Stub;-><init>()V
Landroid/view/IDockedStackListener$Stub;-><init>()V
-Landroid/view/IRecentsAnimationRunner$Stub;-><init>()V
Landroid/view/IRemoteAnimationRunner$Stub;-><init>()V
Landroid/view/IRotationWatcher$Stub;-><init>()V
Landroid/view/IWindow$Stub;-><init>()V
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentTasks.aidl b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentTasks.aidl
index ebfd3571ae6d..799028a5507a 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentTasks.aidl
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentTasks.aidl
@@ -21,8 +21,8 @@ import android.app.IApplicationThread;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
-import android.view.IRecentsAnimationRunner;
+import com.android.wm.shell.recents.IRecentsAnimationRunner;
import com.android.wm.shell.recents.IRecentTasksListener;
import com.android.wm.shell.shared.GroupedRecentTaskInfo;
diff --git a/core/java/android/view/IRecentsAnimationController.aidl b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentsAnimationController.aidl
index 55ad4ae6d665..ccfaab079205 100644
--- a/core/java/android/view/IRecentsAnimationController.aidl
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentsAnimationController.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.view;
+package com.android.wm.shell.recents;
import android.app.ActivityManager;
import android.graphics.GraphicBuffer;
@@ -61,7 +61,6 @@ interface IRecentsAnimationController {
* @param sendUserLeaveHint If set to true, {@link Activity#onUserLeaving} will be sent to the
* top resumed app, false otherwise.
*/
- @UnsupportedAppUsage
void finish(boolean moveHomeToTop, boolean sendUserLeaveHint, in IResultReceiver finishCb);
/**
@@ -71,75 +70,15 @@ interface IRecentsAnimationController {
* may register the recents animation input consumer prior to starting the recents animation
* and then enable it mid-animation to start receiving touch events.
*/
- @UnsupportedAppUsage
void setInputConsumerEnabled(boolean enabled);
/**
- * Informs the system whether the animation targets passed into
- * IRecentsAnimationRunner.onAnimationStart are currently behind the system bars. If they are,
- * they can control the SystemUI flags, otherwise the SystemUI flags from home activity will be
- * taken.
- */
- @UnsupportedAppUsage
- void setAnimationTargetsBehindSystemBars(boolean behindSystemBars);
-
- /**
- * Clean up the screenshot of previous task which was created during recents animation that
- * was cancelled by a stack order change.
- *
- * @see {@link IRecentsAnimationRunner#onAnimationCanceled}
- */
- void cleanupScreenshot();
-
- /**
- * Set a state for controller whether would like to cancel recents animations with deferred
- * task screenshot presentation.
- *
- * When we cancel the recents animation due to a stack order change, we can't just cancel it
- * immediately as it would lead to a flicker in Launcher if we just remove the task from the
- * leash. Instead we screenshot the previous task and replace the child of the leash with the
- * screenshot, so that Launcher can still control the leash lifecycle & make the next app
- * transition animate smoothly without flickering.
- *
- * @param defer When set {@code true}, means that the recents animation will defer canceling the
- * animation when a stack order change is triggered until the subsequent app
- * transition start and skip previous task's animation.
- * When set to {@code false}, means that the recents animation will be canceled
- * immediately when the stack order changes.
- * @param screenshot When set {@code true}, means that the system will take previous task's
- * screenshot and replace the contents of the leash with it when the next app
- * transition starting. The runner must call #cleanupScreenshot() to end the
- * recents animation.
- * When set to {@code false}, means that the system will simply wait for the
- * next app transition start to immediately cancel the recents animation. This
- * can be useful when you want an immediate transition into a state where the
- * task is shown in the home/recents activity (without waiting for a
- * screenshot).
- *
- * @see #cleanupScreenshot()
- * @see IRecentsAnimationRunner#onCancelled
- */
- void setDeferCancelUntilNextTransition(boolean defer, boolean screenshot);
-
- /**
* Sets a state for controller to decide which surface is the destination when the recents
* animation is cancelled through fail safe mechanism.
*/
void setWillFinishToHome(boolean willFinishToHome);
/**
- * Stops controlling a task that is currently controlled by this recents animation.
- *
- * This method should be called when a task that has been received via {@link #onAnimationStart}
- * or {@link #onTaskAppeared} is no longer needed. After calling this method, the task will
- * either disappear from the screen, or jump to its final position in case it was the top task.
- *
- * @param taskId Id of the Task target to remove
- * @return {@code true} when target removed successfully, {@code false} otherwise.
- */
- boolean removeTask(int taskId);
-
- /**
* Detach navigation bar from app.
*
* The system reparents the leash of navigation bar to the app when the recents animation starts
@@ -155,15 +94,6 @@ interface IRecentsAnimationController {
void detachNavigationBarFromApp(boolean moveHomeToTop);
/**
- * Used for animating the navigation bar during app launch from recents in live tile mode.
- *
- * First fade out the navigation bar at the bottom of the display and then fade in to the app.
- *
- * @param duration the duration of the app launch animation
- */
- void animateNavigationBarToApp(long duration);
-
- /**
* Hand off the ongoing animation of a set of remote targets, to be run by another handler using
* the given starting parameters.
*
diff --git a/core/java/android/view/IRecentsAnimationRunner.aidl b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentsAnimationRunner.aidl
index 37663d59cafd..8021758bf7c3 100644
--- a/core/java/android/view/IRecentsAnimationRunner.aidl
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentsAnimationRunner.aidl
@@ -14,15 +14,16 @@
* limitations under the License.
*/
-package android.view;
+package com.android.wm.shell.recents;
import android.app.ActivityManager;
import android.graphics.Rect;
import android.view.RemoteAnimationTarget;
-import android.view.IRecentsAnimationController;
import android.window.TaskSnapshot;
import android.os.Bundle;
+import com.android.wm.shell.recents.IRecentsAnimationController;
+
/**
* Interface that is used to callback from window manager to the process that runs a recents
* animation to start or cancel it.
@@ -55,7 +56,6 @@ oneway interface IRecentsAnimationRunner {
* @param minimizedHomeBounds Specifies the bounds of the minimized home app, will be
* {@code null} if the device is not currently in split screen
*/
- @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
void onAnimationStart(in IRecentsAnimationController controller,
in RemoteAnimationTarget[] apps, in RemoteAnimationTarget[] wallpapers,
in Rect homeContentInsets, in Rect minimizedHomeBounds, in Bundle extras) = 2;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java
index 9af33a84b045..a6e25a95e1eb 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java
@@ -37,7 +37,6 @@ import android.os.RemoteException;
import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseIntArray;
-import android.view.IRecentsAnimationRunner;
import android.window.WindowContainerToken;
import androidx.annotation.BinderThread;
@@ -54,6 +53,7 @@ import com.android.wm.shell.common.TaskStackListenerCallback;
import com.android.wm.shell.common.TaskStackListenerImpl;
import com.android.wm.shell.desktopmode.DesktopModeTaskRepository;
import com.android.wm.shell.protolog.ShellProtoLogGroup;
+import com.android.wm.shell.recents.IRecentsAnimationRunner;
import com.android.wm.shell.shared.GroupedRecentTaskInfo;
import com.android.wm.shell.shared.annotations.ExternalThread;
import com.android.wm.shell.shared.annotations.ShellMainThread;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
index c90da052dd72..c660000e4f61 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
@@ -49,8 +49,6 @@ import android.util.IntArray;
import android.util.Pair;
import android.util.Slog;
import android.view.Display;
-import android.view.IRecentsAnimationController;
-import android.view.IRecentsAnimationRunner;
import android.view.RemoteAnimationTarget;
import android.view.SurfaceControl;
import android.window.PictureInPictureSurfaceTransaction;
@@ -1024,10 +1022,6 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
}
@Override
- public void setAnimationTargetsBehindSystemBars(boolean behindSystemBars) {
- }
-
- @Override
public void setFinishTaskTransaction(int taskId,
PictureInPictureSurfaceTransaction finishTransaction, SurfaceControl overlay) {
mExecutor.execute(() -> {
@@ -1254,14 +1248,6 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
}
@Override
- public void setDeferCancelUntilNextTransition(boolean defer, boolean screenshot) {
- }
-
- @Override
- public void cleanupScreenshot() {
- }
-
- @Override
public void setWillFinishToHome(boolean willFinishToHome) {
mExecutor.execute(() -> {
mWillFinishToHome = willFinishToHome;
@@ -1269,14 +1255,6 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
}
/**
- * @see IRecentsAnimationController#removeTask
- */
- @Override
- public boolean removeTask(int taskId) {
- return false;
- }
-
- /**
* @see IRecentsAnimationController#detachNavigationBarFromApp
*/
@Override
@@ -1292,13 +1270,6 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
}
});
}
-
- /**
- * @see IRecentsAnimationController#animateNavigationBarToApp(long)
- */
- @Override
- public void animateNavigationBarToApp(long duration) {
- }
};
/** Utility class to track the state of a task as-seen by recents. */
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java
index 7c63fdad660a..7937a843b90a 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java
@@ -76,7 +76,6 @@ import android.os.RemoteException;
import android.platform.test.flag.junit.SetFlagsRule;
import android.util.ArraySet;
import android.util.Pair;
-import android.view.IRecentsAnimationRunner;
import android.view.Surface;
import android.view.SurfaceControl;
import android.window.IRemoteTransition;
@@ -107,6 +106,7 @@ import com.android.wm.shell.TestShellExecutor;
import com.android.wm.shell.common.DisplayController;
import com.android.wm.shell.common.DisplayLayout;
import com.android.wm.shell.common.ShellExecutor;
+import com.android.wm.shell.recents.IRecentsAnimationRunner;
import com.android.wm.shell.recents.RecentTasksController;
import com.android.wm.shell.recents.RecentsTransitionHandler;
import com.android.wm.shell.shared.ShellSharedConstants;
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/view/RecentsTransition.java b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/view/RecentsTransition.java
index b8319e51ec3b..c8de9f6660f9 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/view/RecentsTransition.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/view/RecentsTransition.java
@@ -36,36 +36,6 @@ import java.util.function.Consumer;
public class RecentsTransition {
/**
- * Creates a new transition aspect scaled transition activity options.
- */
- public static ActivityOptions createAspectScaleAnimation(Context context, Handler handler,
- boolean scaleUp, AppTransitionAnimationSpecsFuture animationSpecsFuture,
- final Runnable animationStartCallback) {
- final OnAnimationStartedListener animStartedListener = new OnAnimationStartedListener() {
- private boolean mHandled;
-
- @Override
- public void onAnimationStarted(long elapsedRealTime) {
- // OnAnimationStartedListener can be called numerous times, so debounce here to
- // prevent multiple callbacks
- if (mHandled) {
- return;
- }
- mHandled = true;
-
- if (animationStartCallback != null) {
- animationStartCallback.run();
- }
- }
- };
- final ActivityOptions opts = ActivityOptions.makeMultiThumbFutureAspectScaleAnimation(
- context, handler,
- animationSpecsFuture != null ? animationSpecsFuture.getFuture() : null,
- animStartedListener, scaleUp);
- return opts;
- }
-
- /**
* Wraps a animation-start callback in a binder that can be called from window manager.
*/
public static IRemoteCallback wrapStartedListener(final Handler handler,
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java
index bbf46984208f..76af813fe2f8 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java
@@ -18,13 +18,13 @@ package com.android.systemui.shared.system;
import android.os.RemoteException;
import android.util.Log;
-import android.view.IRecentsAnimationController;
import android.view.SurfaceControl;
import android.window.PictureInPictureSurfaceTransaction;
import android.window.TaskSnapshot;
import com.android.internal.os.IResultReceiver;
import com.android.systemui.shared.recents.model.ThumbnailData;
+import com.android.wm.shell.recents.IRecentsAnimationController;
public class RecentsAnimationControllerCompat {
@@ -58,14 +58,6 @@ public class RecentsAnimationControllerCompat {
}
}
- public void setAnimationTargetsBehindSystemBars(boolean behindSystemBars) {
- try {
- mAnimationController.setAnimationTargetsBehindSystemBars(behindSystemBars);
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to set whether animation targets are behind system bars", e);
- }
- }
-
/**
* Sets the final surface transaction on a Task. This is used by Launcher to notify the system
* that animating Activity to PiP has completed and the associated task surface should be
@@ -103,22 +95,6 @@ public class RecentsAnimationControllerCompat {
}
}
- public void setDeferCancelUntilNextTransition(boolean defer, boolean screenshot) {
- try {
- mAnimationController.setDeferCancelUntilNextTransition(defer, screenshot);
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to set deferred cancel with screenshot", e);
- }
- }
-
- public void cleanupScreenshot() {
- try {
- mAnimationController.cleanupScreenshot();
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to clean up screenshot of recents animation", e);
- }
- }
-
/**
* @see {{@link IRecentsAnimationController#setWillFinishToHome(boolean)}}.
*/
@@ -131,18 +107,6 @@ public class RecentsAnimationControllerCompat {
}
/**
- * @see IRecentsAnimationController#removeTask
- */
- public boolean removeTask(int taskId) {
- try {
- return mAnimationController.removeTask(taskId);
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to remove remote animation target", e);
- return false;
- }
- }
-
- /**
* @see IRecentsAnimationController#detachNavigationBarFromApp
*/
public void detachNavigationBarFromApp(boolean moveHomeToTop) {
@@ -152,15 +116,4 @@ public class RecentsAnimationControllerCompat {
Log.e(TAG, "Failed to detach the navigation bar from app", e);
}
}
-
- /**
- * @see IRecentsAnimationController#animateNavigationBarToApp(long)
- */
- public void animateNavigationBarToApp(long duration) {
- try {
- mAnimationController.animateNavigationBarToApp(duration);
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to animate the navigation bar to app", e);
- }
- }
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationListener.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationListener.java
index 24073501c946..51892aac606a 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationListener.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationListener.java
@@ -42,14 +42,4 @@ public interface RecentsAnimationListener {
* was running becomes ready for control.
*/
void onTasksAppeared(RemoteAnimationTarget[] app);
-
- /**
- * Called to request that the current task tile be switched out for a screenshot (if not
- * already). Once complete, onFinished should be called.
- * @return true if this impl will call onFinished. No other onSwitchToScreenshot impls will
- * be called afterwards (to avoid multiple calls to onFinished).
- */
- default boolean onSwitchToScreenshot(Runnable onFinished) {
- return false;
- }
}