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

Commit 199ef2f1 authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by android-build-merger
Browse files

Merge "Do not finish multiple times." into nyc-dev

am: 74f9a2fc

* commit '74f9a2fc':
  Do not finish multiple times.
parents 667ad177 74f9a2fc
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -159,6 +159,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
    private static final int STATE_PRINTER_UNAVAILABLE = 6;
    private static final int STATE_PRINTER_UNAVAILABLE = 6;
    private static final int STATE_UPDATE_SLOW = 7;
    private static final int STATE_UPDATE_SLOW = 7;
    private static final int STATE_PRINT_COMPLETED = 8;
    private static final int STATE_PRINT_COMPLETED = 8;
    private static final int STATE_FINISHING = 9;


    private static final int UI_STATE_PREVIEW = 0;
    private static final int UI_STATE_PREVIEW = 0;
    private static final int UI_STATE_ERROR = 1;
    private static final int UI_STATE_ERROR = 1;
@@ -2034,6 +2035,12 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
            return;
            return;
        }
        }


        if (mState == STATE_FINISHING) {
            return;
        }

        mState = STATE_FINISHING;

        if (mPrinterRegistry != null) {
        if (mPrinterRegistry != null) {
            mPrinterRegistry.setTrackedPrinter(null);
            mPrinterRegistry.setTrackedPrinter(null);
        }
        }