Merge "Transitions can also be aborted after start." into tm-qpr-dev

This commit is contained in:
Evan Rosky
2022-11-01 20:51:40 +00:00
committed by Android (Google) Code Review

View File

@@ -879,8 +879,8 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
void abort() {
// This calls back into itself via controller.abort, so just early return here.
if (mState == STATE_ABORT) return;
if (mState != STATE_COLLECTING) {
throw new IllegalStateException("Too late to abort.");
if (mState != STATE_COLLECTING && mState != STATE_STARTED) {
throw new IllegalStateException("Too late to abort. state=" + mState);
}
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, "Aborting Transition: %d", mSyncId);
mState = STATE_ABORT;