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

Commit 23d3361e authored by Svetoslav's avatar Svetoslav
Browse files

Do not change fragments if print activity finishing.

It is possible that we try to switch framents after the print
activity finish method is called. In this state the activity
is going away and trying to perform a fragment operation throws.
Now if we are finishing no fragment opration is performed.

bug:17520007

Change-Id: I0dd935d3cdaeddca31fccf49bd5de97e878abb9d
parent 7c9823ac
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -816,6 +816,9 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
    }

    private void ensureProgressUiShown() {
        if (isFinishing()) {
            return;
        }
        if (mUiState != UI_STATE_PROGRESS) {
            mUiState = UI_STATE_PROGRESS;
            mPrintPreviewController.setUiShown(false);
@@ -825,6 +828,9 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
    }

    private void ensurePreviewUiShown() {
        if (isFinishing()) {
            return;
        }
        if (mUiState != UI_STATE_PREVIEW) {
            mUiState = UI_STATE_PREVIEW;
            mPrintPreviewController.setUiShown(true);
@@ -833,6 +839,9 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
    }

    private void ensureErrorUiShown(CharSequence message, int action) {
        if (isFinishing()) {
            return;
        }
        if (mUiState != UI_STATE_ERROR) {
            mUiState = UI_STATE_ERROR;
            mPrintPreviewController.setUiShown(false);