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

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

Merge "Don\'t mix UI and print job state" into nyc-dev am: b9893ec6

am: de77a334

* commit 'de77a334':
  Don't mix UI and print job state
parents 38d1133f de77a334
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -159,7 +159,6 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
    private static final int STATE_PRINTER_UNAVAILABLE = 6;
    private static final int STATE_UPDATE_SLOW = 7;
    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_ERROR = 1;
@@ -255,6 +254,9 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
    /** Whether at least one print services is enabled or not */
    private boolean mArePrintServicesEnabled;

    /** Is doFinish() already in progress */
    private boolean mIsFinishing;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
@@ -2035,11 +2037,11 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
            return;
        }

        if (mState == STATE_FINISHING) {
        if (mIsFinishing) {
            return;
        }

        mState = STATE_FINISHING;
        mIsFinishing = true;

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