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

Commit d724a401 authored by Svetoslav's avatar Svetoslav
Browse files

Print preview disappearing on screen off/on.

We were not clearing the tracked printer when the print activity is
paused and then not setting the tracked printer when the activity
is resumed.

bug:17525271

Change-Id: Ib0fb29006bfcf5ad03dce24b3407cd96dc421442
parent 7c9823ac
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -311,6 +311,14 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
        setState(STATE_CONFIGURING);
    }

    @Override
    public void onResume() {
        super.onResume();
        if (mState != STATE_INITIALIZING && mCurrentPrinter != null) {
            mPrinterRegistry.setTrackedPrinter(mCurrentPrinter.getId());
        }
    }

    @Override
    public void onPause() {
        PrintSpoolerService spooler = mSpoolerProvider.getSpooler();
@@ -347,6 +355,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
        }

        mPrinterAvailabilityDetector.cancel();
        mPrinterRegistry.setTrackedPrinter(null);

        super.onPause();
    }