diff options
| author | 2016-03-18 16:19:43 +0000 | |
|---|---|---|
| committer | 2016-03-18 16:19:45 +0000 | |
| commit | 74f9a2fc2e87b63ad7e367dff455f934c8a9d396 (patch) | |
| tree | 6cb736ff52df0dfecc5637dccfafd910122e1271 | |
| parent | b2cc929657926750336b22a9333c3738dfa38e29 (diff) | |
| parent | 0ad7fc5250334879fb96cdb6c4443c83f8094631 (diff) | |
Merge "Do not finish multiple times." into nyc-dev
| -rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java | 7 |
1 files changed, 7 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 ec8305941c6e..4e1180d051bf 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -159,6 +159,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat private static final int STATE_PRINTER_UNAVAILABLE = 6; private static final int STATE_UPDATE_SLOW = 7; private static final int STATE_PRINT_COMPLETED = 8; + private static final int STATE_FINISHING = 9; private static final int UI_STATE_PREVIEW = 0; private static final int UI_STATE_ERROR = 1; @@ -2034,6 +2035,12 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat return; } + if (mState == STATE_FINISHING) { + return; + } + + mState = STATE_FINISHING; + if (mPrinterRegistry != null) { mPrinterRegistry.setTrackedPrinter(null); } |