summaryrefslogtreecommitdiffstats
path: root/packages/PrintSpooler
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-10-14 22:15:09 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-14 22:15:09 +0000
commit9784d4b8f33b2e0f7d791cf7386e81d82bd7b49a (patch)
tree44cfa3c6e0f273a1dcfd79abc340d4ef5b1fb8ca /packages/PrintSpooler
parentd5a628d757c4a914be54b5e450784ffaa1f9c958 (diff)
parent0a1ffdb3f89705eeeb89349fcd31c82b2d15b0a5 (diff)
downloadframeworks_base-9784d4b8f33b2e0f7d791cf7386e81d82bd7b49a.zip
frameworks_base-9784d4b8f33b2e0f7d791cf7386e81d82bd7b49a.tar.gz
frameworks_base-9784d4b8f33b2e0f7d791cf7386e81d82bd7b49a.tar.bz2
am 0a1ffdb3: Merge "Handle if the printing app is killed while saving to PDF." into lmp-dev
* commit '0a1ffdb3f89705eeeb89349fcd31c82b2d15b0a5': Handle if the printing app is killed while saving to PDF.
Diffstat (limited to 'packages/PrintSpooler')
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
index 84ada6f..20254f0 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
@@ -286,7 +286,9 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
mFileProvider, new RemotePrintDocument.RemoteAdapterDeathObserver() {
@Override
public void onDied() {
- if (isFinishing()) {
+ // If we are finishing or we are in a state that we do not need any
+ // data from the printing app, then no need to finish.
+ if (isFinishing() || (isFinalState(mState) && !mPrintedDocument.isUpdating())) {
return;
}
setState(STATE_PRINT_CANCELED);