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

Commit 9c9888b8 authored by Svetoslav's avatar Svetoslav
Browse files

Fix a crash in PrintSpooler.

If the user cancels printing we cancel the current
pring operation in the RemotePrintDocument which is
a state machine enforcing valid state transitions.
A valid transition was not allowed: finishing after
canceled.

bug:17182301

Change-Id: Iccf3a78d7dc736a64bf5c44941a8f8064dcd0ec3
parent 4610545d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -258,7 +258,8 @@ public final class RemotePrintDocument {
            Log.i(LOG_TAG, "[CALLED] finish()");
        }
        if (mState != STATE_STARTED && mState != STATE_UPDATED
                && mState != STATE_FAILED && mState != STATE_CANCELING) {
                && mState != STATE_FAILED && mState != STATE_CANCELING
                && mState != STATE_CANCELED) {
            throw new IllegalStateException("Cannot finish in state:"
                    + stateToString(mState));
        }