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

Commit a0f25d58 authored by Evan Rosky's avatar Evan Rosky
Browse files

When detaching player, set to null before clean-up

Otherwise, its possible for queued stuff to start collecting
during clean-up and then they will report to the new player
after it is replaced.

Bug: 278781290
Test: Wait to see if metric reduces?
Change-Id: I37f28b5daed6946675751b9fb430860c3331048a
parent 77ea277f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -192,6 +192,8 @@ class TransitionController {

    private void detachPlayer() {
        if (mTransitionPlayer == null) return;
        // Immediately set to null so that nothing inadvertently starts/queues.
        mTransitionPlayer = null;
        // Clean-up/finish any playing transitions.
        for (int i = 0; i < mPlayingTransitions.size(); ++i) {
            mPlayingTransitions.get(i).cleanUpOnFailure();
@@ -200,7 +202,6 @@ class TransitionController {
        if (mCollectingTransition != null) {
            mCollectingTransition.abort();
        }
        mTransitionPlayer = null;
        mTransitionPlayerProc = null;
        mRemotePlayer.clear();
        mRunningLock.doNotifyLocked();