diff options
author | naman14 <namandwivedi14@gmail.com> | 2015-05-04 11:19:45 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-26 21:55:40 -0700 |
commit | 3d6fd9af084bbb894293975fb5b4d3116961eb7b (patch) | |
tree | 556a7267a7c5e9661e897303b66c88ac09cb9860 /packages/PrintSpooler | |
parent | 6d6d1393091bd4ab659e8ed9c2254fb2ceed7f60 (diff) | |
download | frameworks_base-3d6fd9af084bbb894293975fb5b4d3116961eb7b.zip frameworks_base-3d6fd9af084bbb894293975fb5b4d3116961eb7b.tar.gz frameworks_base-3d6fd9af084bbb894293975fb5b4d3116961eb7b.tar.bz2 |
Fix IllegalStateException in Printspooler
Open webpage in chrome(or any thing to print) and click print and then press
back, throws a IllegalStateException.
Currently in onDestroy, doFinish() is called which further calls
unbindService()in PrintSpoolerProvider,but since service has already been
unbinded,it throws a Service not registered error.
Change-Id: If58a951e9e66a4048f0ece3100aabe49cee0ab84
Diffstat (limited to 'packages/PrintSpooler')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java | 12 |
1 files changed, 11 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 1b58eba..1fb84b4 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -372,7 +372,17 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat @Override protected void onDestroy() { - doFinish(); + if (mState != STATE_INITIALIZING) { + mPrintPreviewController.destroy(new Runnable() { + @Override + public void run() { + finish(); + } + }); + } else { + finish(); + } + super.onDestroy(); } |