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

Commit 9436f523 authored by Evan Rosky's avatar Evan Rosky
Browse files

Transitions can also be aborted after start.

They only stop being abortable once they are playing.
START is valid.

Auto's tests seem to hit this case frequently when it
kills/restarts their carlauncher.

Bug: 255631687
Test: test_mapping_presubmit_cloud_auto_car_services
Change-Id: I8564e5dfef541fa06717ebbd77ae4e03016b6906
parent 053dd71d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -837,8 +837,8 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
    void abort() {
    void abort() {
        // This calls back into itself via controller.abort, so just early return here.
        // This calls back into itself via controller.abort, so just early return here.
        if (mState == STATE_ABORT) return;
        if (mState == STATE_ABORT) return;
        if (mState != STATE_COLLECTING) {
        if (mState != STATE_COLLECTING && mState != STATE_STARTED) {
            throw new IllegalStateException("Too late to abort.");
            throw new IllegalStateException("Too late to abort. state=" + mState);
        }
        }
        ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, "Aborting Transition: %d", mSyncId);
        ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, "Aborting Transition: %d", mSyncId);
        mState = STATE_ABORT;
        mState = STATE_ABORT;