summaryrefslogtreecommitdiffstats
path: root/packages/PrintSpooler/src
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-09-16 10:50:52 -0700
committerSvetoslav <svetoslavganov@google.com>2014-09-16 10:50:55 -0700
commit23d3361e1747ee286157f9c61c3d02e6e20cac58 (patch)
tree7be20e4687eb3a6f13c5960604665ba8dcd84784 /packages/PrintSpooler/src
parent7c9823ac4fe63e22962b48c46059ff89f539de5b (diff)
downloadframeworks_base-23d3361e1747ee286157f9c61c3d02e6e20cac58.zip
frameworks_base-23d3361e1747ee286157f9c61c3d02e6e20cac58.tar.gz
frameworks_base-23d3361e1747ee286157f9c61c3d02e6e20cac58.tar.bz2
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
Diffstat (limited to 'packages/PrintSpooler/src')
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
index 693e5ac..3985285 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
@@ -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);