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

Commit 22b818af authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Optimize the order of setting remote animating state" into main

parents 520c9b33 1a33f318
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -171,13 +171,14 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
            return false;
            return false;
        }
        }
        final RecentsController controller = mControllers.get(controllerIdx);
        final RecentsController controller = mControllers.get(controllerIdx);
        Transitions.setRunningRemoteTransitionDelegate(mAnimApp);
        final IApplicationThread animApp = mAnimApp;
        mAnimApp = null;
        mAnimApp = null;
        if (!controller.start(info, startTransaction, finishTransaction, finishCallback)) {
        if (!controller.start(info, startTransaction, finishTransaction, finishCallback)) {
            ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
            ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
                    "RecentsTransitionHandler.startAnimation: failed to start animation");
                    "RecentsTransitionHandler.startAnimation: failed to start animation");
            return false;
            return false;
        }
        }
        Transitions.setRunningRemoteTransitionDelegate(animApp);
        return true;
        return true;
    }
    }


+1 −1
Original line number Original line Diff line number Diff line
@@ -137,7 +137,6 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler {
                });
                });
            }
            }
        };
        };
        Transitions.setRunningRemoteTransitionDelegate(remote.getAppThread());
        try {
        try {
            // If the remote is actually in the same process, then make a copy of parameters since
            // If the remote is actually in the same process, then make a copy of parameters since
            // remote impls assume that they have to clean-up native references.
            // remote impls assume that they have to clean-up native references.
@@ -149,6 +148,7 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler {
            remote.getRemoteTransition().startAnimation(transition, remoteInfo, remoteStartT, cb);
            remote.getRemoteTransition().startAnimation(transition, remoteInfo, remoteStartT, cb);
            // assume that remote will apply the start transaction.
            // assume that remote will apply the start transaction.
            startTransaction.clear();
            startTransaction.clear();
            Transitions.setRunningRemoteTransitionDelegate(remote.getAppThread());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            Log.e(Transitions.TAG, "Error running remote transition.", e);
            Log.e(Transitions.TAG, "Error running remote transition.", e);
            unhandleDeath(remote.asBinder(), finishCallback);
            unhandleDeath(remote.asBinder(), finishCallback);