Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eda33eca authored by Winson Chung's avatar Winson Chung
Browse files

6/ Remove unhandled recents animation controller calls from the interface



- There were legacy recents animation calls that were not used along
  the shell transition path, which can be removed
- onSwitchToScreenshot was also not used following migration to the
  shell recents transition implementation
- Since there are no other implementations of the aidls, these can
  also be moved into the shell package now

Flag: EXEMPT bugfix
Bug: 359608026
Test: atest NexusLauncherTests
Change-Id: I0f8eb80c2e69bc5345cdf1ae56633dce3e3d2cf1
Signed-off-by: default avatarWinson Chung <winsonc@google.com>
parent ca2f7297
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −71
Original line number Diff line number Diff line
@@ -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,74 +70,14 @@ 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.
     *
@@ -154,15 +93,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.
+3 −3
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,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;
@@ -51,6 +50,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;
Loading