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

Commit f6114c4f authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

In rare cases the printing client app might have been dieded before...

In rare cases the printing client app might have been dieded before remotePrintDocument.start(). In this case the print spooler should not crash.

Change-Id: Ica1b46fadf6bccbd28e8f9c928f5d504cccff792
parent d1d53361
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -173,6 +173,9 @@ public final class RemotePrintDocument {
        if (DEBUG) {
            Log.i(LOG_TAG, "[CALLED] start()");
        }
        if (mState == STATE_FAILED) {
            Log.w(LOG_TAG, "Failed before start.");
        } else {
            if (mState != STATE_INITIAL) {
                throw new IllegalStateException("Cannot start in state:" + stateToString(mState));
            }
@@ -184,6 +187,7 @@ public final class RemotePrintDocument {
                mState = STATE_FAILED;
            }
        }
    }

    public boolean update(PrintAttributes attributes, PageRange[] pages, boolean preview) {
        boolean willUpdate;