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

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

Always call finished when merging with an ongoing recents transition

- We don't need to call onTasksAppeared, but onTransitionFinished
  should always be called when the transition is merged

Bug: 278782223
Test: Enter overview, start settings via adb
Change-Id: I2426632813be8190f3d70bb054d35195ea2c043c
parent 0110ea13
Loading
Loading
Loading
Loading
+9 −8
Original line number Original line Diff line number Diff line
@@ -132,7 +132,7 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
    public WindowContainerTransaction handleRequest(IBinder transition,
    public WindowContainerTransaction handleRequest(IBinder transition,
            TransitionRequestInfo request) {
            TransitionRequestInfo request) {
        // do not directly handle requests. Only entry point should be via startRecentsTransition
        // do not directly handle requests. Only entry point should be via startRecentsTransition
        Slog.e(TAG, "RecentsTransitionHandler.handleRequest: Unexpected transition request");
        // TODO: Only log an error if the transition is a recents transition
        return null;
        return null;
    }
    }


@@ -612,7 +612,7 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
            t.apply();
            t.apply();
            // not using the incoming anim-only surfaces
            // not using the incoming anim-only surfaces
            info.releaseAnimSurfaces();
            info.releaseAnimSurfaces();
            if (appearedTargets == null) return;
            if (appearedTargets != null) {
                try {
                try {
                    ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
                    ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
                            "[%d] RecentsController.merge: calling onTasksAppeared", mInstanceId);
                            "[%d] RecentsController.merge: calling onTasksAppeared", mInstanceId);
@@ -620,6 +620,7 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    Slog.e(TAG, "Error sending appeared tasks to recents animation", e);
                    Slog.e(TAG, "Error sending appeared tasks to recents animation", e);
                }
                }
            }
            finishCallback.onTransitionFinished(null /* wct */, null /* wctCB */);
            finishCallback.onTransitionFinished(null /* wct */, null /* wctCB */);
        }
        }