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

Commit 5acfeed3 authored by Evan Rosky's avatar Evan Rosky
Browse files

Flush queued transitions when player crashes

When a player crashes, also flush all the queued
transitions. Since there is no player, we can just
abort all of these since there are no expectations.

Bug: 433742796
Test: monitor cts tests
Flag: EXEMPT bugfix
Change-Id: I94104f44feee2c6db93b5eea09c5a33ed7da1d4e
parent e2084a0c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -291,6 +291,16 @@ class TransitionController {
            mCollectingTransition.abort();
        }
        mRemotePlayer.clear();
        for (int i = 0; i < mQueuedTransitions.size(); ++i) {
            final QueuedTransition queued = mQueuedTransitions.get(i);
            if (queued.mTransition != null) {
                queued.mTransition.abort();
            } else {
                // legacy sync
                mSyncEngine.abort(queued.mLegacySync.mSyncId);
            }
        }
        mQueuedTransitions.clear();
        mRunningLock.doNotifyLocked();
        // Restore the rest of the player stack
        mTransitionPlayers.addAll(temp);