diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-09-30 14:55:04 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-30 14:55:04 +0000 |
commit | ce8d47600b0b9926edd86d9eb35d0a150dd79874 (patch) | |
tree | fac13668ea1da3698956f6232817270bb0e0ade0 /packages/PrintSpooler | |
parent | ed62f5d8c83598bb80be8df8a2d96e8d9d48e6b2 (diff) | |
parent | 922fcc2f9e2370b34672af0e91e5754c6f8d6da7 (diff) | |
download | frameworks_base-ce8d47600b0b9926edd86d9eb35d0a150dd79874.zip frameworks_base-ce8d47600b0b9926edd86d9eb35d0a150dd79874.tar.gz frameworks_base-ce8d47600b0b9926edd86d9eb35d0a150dd79874.tar.bz2 |
am 922fcc2f: Merge "Crash in print spooler if save to PDF selected early." into lmp-dev
* commit '922fcc2f9e2370b34672af0e91e5754c6f8d6da7':
Crash in print spooler if save to PDF selected early.
Diffstat (limited to 'packages/PrintSpooler')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java | 6 |
1 files changed, 5 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 72916ea..84ada6f 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -566,6 +566,9 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat } private void startCreateDocumentActivity() { + if (!isResumed()) { + return; + } PrintDocumentInfo info = mPrintedDocument.getDocumentInfo().info; if (info == null) { return; @@ -1372,7 +1375,8 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat mPrintButton.setImageResource(R.drawable.ic_menu_savetopdf); mPrintButton.setContentDescription(getString(R.string.savetopdf_button)); } - if ((mRangeOptionsSpinner.getSelectedItemPosition() == 1 + if (!mPrintedDocument.getDocumentInfo().laidout + ||(mRangeOptionsSpinner.getSelectedItemPosition() == 1 && (TextUtils.isEmpty(mPageRangeEditText.getText()) || hasErrors())) || (mRangeOptionsSpinner.getSelectedItemPosition() == 0 && (mPrintedDocument.getDocumentInfo() == null || hasErrors()))) { |