Loading services/core/java/com/android/server/wm/Transition.java +7 −7 Original line number Diff line number Diff line Loading @@ -173,7 +173,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { private final TransitionController mController; private final BLASTSyncEngine mSyncEngine; private final Token mToken; private IApplicationThread mRemoteAnimApp; private @Nullable ActivityRecord mPipActivity; Loading Loading @@ -1485,13 +1484,14 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return mForcePlaying; } /** Adjusts the priority of the process which will run the transition animation. */ void setRemoteAnimationApp(IApplicationThread app) { mRemoteAnimApp = app; final WindowProcessController wpc = mController.mAtm.getProcessController(app); if (wpc != null) { // This is an early prediction. If the process doesn't ack the animation in 200 ms, // the priority will be restored. mController.mRemotePlayer.update(wpc, true /* running */, true /* predict */); } /** Returns the app which will run the transition animation. */ IApplicationThread getRemoteAnimationApp() { return mRemoteAnimApp; } void setNoAnimation(WindowContainer wc) { Loading services/core/java/com/android/server/wm/TransitionController.java +1 −7 Original line number Diff line number Diff line Loading @@ -1251,13 +1251,7 @@ class TransitionController { } else if (mPlayingTransitions.isEmpty()) { mTransitionPlayerProc.setRunningRemoteAnimation(false); mRemotePlayer.clear(); return; } final IApplicationThread appThread = transition.getRemoteAnimationApp(); if (appThread == null || appThread == mTransitionPlayerProc.getThread()) return; final WindowProcessController delegate = mAtm.getProcessController(appThread); if (delegate == null) return; mRemotePlayer.update(delegate, isPlaying, true /* predict */); } /** Called when a transition is aborted. This should only be called by {@link Transition} */ Loading Loading @@ -1483,7 +1477,7 @@ class TransitionController { * {@link #mTransitionPlayerProc}. */ static class RemotePlayer { private static final long REPORT_RUNNING_GRACE_PERIOD_MS = 100; private static final long REPORT_RUNNING_GRACE_PERIOD_MS = 200; @GuardedBy("itself") private final ArrayMap<IBinder, DelegateProcess> mDelegateProcesses = new ArrayMap<>(); private final ActivityTaskManagerService mAtm; Loading services/tests/wmtests/src/com/android/server/wm/TransitionTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -636,6 +636,7 @@ public class TransitionTests extends WindowTestsBase { transition.collect(app); controller.requestStartTransition(transition, null /* startTask */, remoteTransition, null /* displayChange */); assertTrue(delegateProc.isRunningRemoteTransition()); testPlayer.startTransition(); app.onStartingWindowDrawn(); // The task appeared event should be deferred until transition ready. Loading @@ -643,7 +644,6 @@ public class TransitionTests extends WindowTestsBase { testPlayer.onTransactionReady(app.getSyncTransaction()); assertTrue(task.taskAppearedReady()); assertTrue(playerProc.isRunningRemoteTransition()); assertTrue(delegateProc.isRunningRemoteTransition()); assertTrue(controller.mRemotePlayer.reportRunning(delegateProc.getThread())); assertTrue(app.isVisible()); Loading Loading
services/core/java/com/android/server/wm/Transition.java +7 −7 Original line number Diff line number Diff line Loading @@ -173,7 +173,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { private final TransitionController mController; private final BLASTSyncEngine mSyncEngine; private final Token mToken; private IApplicationThread mRemoteAnimApp; private @Nullable ActivityRecord mPipActivity; Loading Loading @@ -1485,13 +1484,14 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return mForcePlaying; } /** Adjusts the priority of the process which will run the transition animation. */ void setRemoteAnimationApp(IApplicationThread app) { mRemoteAnimApp = app; final WindowProcessController wpc = mController.mAtm.getProcessController(app); if (wpc != null) { // This is an early prediction. If the process doesn't ack the animation in 200 ms, // the priority will be restored. mController.mRemotePlayer.update(wpc, true /* running */, true /* predict */); } /** Returns the app which will run the transition animation. */ IApplicationThread getRemoteAnimationApp() { return mRemoteAnimApp; } void setNoAnimation(WindowContainer wc) { Loading
services/core/java/com/android/server/wm/TransitionController.java +1 −7 Original line number Diff line number Diff line Loading @@ -1251,13 +1251,7 @@ class TransitionController { } else if (mPlayingTransitions.isEmpty()) { mTransitionPlayerProc.setRunningRemoteAnimation(false); mRemotePlayer.clear(); return; } final IApplicationThread appThread = transition.getRemoteAnimationApp(); if (appThread == null || appThread == mTransitionPlayerProc.getThread()) return; final WindowProcessController delegate = mAtm.getProcessController(appThread); if (delegate == null) return; mRemotePlayer.update(delegate, isPlaying, true /* predict */); } /** Called when a transition is aborted. This should only be called by {@link Transition} */ Loading Loading @@ -1483,7 +1477,7 @@ class TransitionController { * {@link #mTransitionPlayerProc}. */ static class RemotePlayer { private static final long REPORT_RUNNING_GRACE_PERIOD_MS = 100; private static final long REPORT_RUNNING_GRACE_PERIOD_MS = 200; @GuardedBy("itself") private final ArrayMap<IBinder, DelegateProcess> mDelegateProcesses = new ArrayMap<>(); private final ActivityTaskManagerService mAtm; Loading
services/tests/wmtests/src/com/android/server/wm/TransitionTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -636,6 +636,7 @@ public class TransitionTests extends WindowTestsBase { transition.collect(app); controller.requestStartTransition(transition, null /* startTask */, remoteTransition, null /* displayChange */); assertTrue(delegateProc.isRunningRemoteTransition()); testPlayer.startTransition(); app.onStartingWindowDrawn(); // The task appeared event should be deferred until transition ready. Loading @@ -643,7 +644,6 @@ public class TransitionTests extends WindowTestsBase { testPlayer.onTransactionReady(app.getSyncTransaction()); assertTrue(task.taskAppearedReady()); assertTrue(playerProc.isRunningRemoteTransition()); assertTrue(delegateProc.isRunningRemoteTransition()); assertTrue(controller.mRemotePlayer.reportRunning(delegateProc.getThread())); assertTrue(app.isVisible()); Loading