diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-09-16 02:22:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-16 02:22:22 +0000 |
commit | 56bdeeeb80d31d2c299a7e55b233658b5bc6fe01 (patch) | |
tree | ea36b0a447377358ea78c49d5c7d386347e23a0b /packages/PrintSpooler/src | |
parent | 0e51a6d97af96352e977675751dae8ff0280a593 (diff) | |
parent | fb3532eea391574cda69cae274915e9e1a7b6cf2 (diff) | |
download | frameworks_base-56bdeeeb80d31d2c299a7e55b233658b5bc6fe01.zip frameworks_base-56bdeeeb80d31d2c299a7e55b233658b5bc6fe01.tar.gz frameworks_base-56bdeeeb80d31d2c299a7e55b233658b5bc6fe01.tar.bz2 |
Merge "Page shredder callback invoked on the wrong thread." into lmp-dev
Diffstat (limited to 'packages/PrintSpooler/src')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java index 7574fca..693e5ac 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -61,7 +61,6 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnFocusChangeListener; import android.view.ViewGroup; -import android.view.accessibility.AccessibilityEvent; import android.view.inputmethod.InputMethodManager; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; @@ -2304,19 +2303,20 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { - try { - // It's OK to access the data members as they are - // final and this code is the last one to touch - // them as shredding is the very last step, so the - // UI is not interactive at this point. - shredPages(editor); - updatePrintJob(); - } finally { - mContext.unbindService(PageShredder.this); - mCallback.run(); - } + // It's OK to access the data members as they are + // final and this code is the last one to touch + // them as shredding is the very last step, so the + // UI is not interactive at this point. + shredPages(editor); + updatePrintJob(); return null; } + + @Override + protected void onPostExecute(Void aVoid) { + mContext.unbindService(PageShredder.this); + mCallback.run(); + } }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); } |