Loading packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +12 −12 Original line number Original line Diff line number Diff line Loading @@ -61,7 +61,6 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnClickListener; import android.view.View.OnFocusChangeListener; import android.view.View.OnFocusChangeListener; import android.view.ViewGroup; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager; import android.widget.AdapterView; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.AdapterView.OnItemSelectedListener; Loading Loading @@ -2304,19 +2303,20 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat new AsyncTask<Void, Void, Void>() { new AsyncTask<Void, Void, Void>() { @Override @Override protected Void doInBackground(Void... params) { protected Void doInBackground(Void... params) { try { // It's OK to access the data members as they are // It's OK to access the data members as they are // final and this code is the last one to touch // final and this code is the last one to touch // them as shredding is the very last step, so the // them as shredding is the very last step, so the // UI is not interactive at this point. // UI is not interactive at this point. shredPages(editor); shredPages(editor); updatePrintJob(); updatePrintJob(); } finally { return null; } @Override protected void onPostExecute(Void aVoid) { mContext.unbindService(PageShredder.this); mContext.unbindService(PageShredder.this); mCallback.run(); mCallback.run(); } } return null; } }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); } } Loading Loading
packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +12 −12 Original line number Original line Diff line number Diff line Loading @@ -61,7 +61,6 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnClickListener; import android.view.View.OnFocusChangeListener; import android.view.View.OnFocusChangeListener; import android.view.ViewGroup; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager; import android.widget.AdapterView; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.AdapterView.OnItemSelectedListener; Loading Loading @@ -2304,19 +2303,20 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat new AsyncTask<Void, Void, Void>() { new AsyncTask<Void, Void, Void>() { @Override @Override protected Void doInBackground(Void... params) { protected Void doInBackground(Void... params) { try { // It's OK to access the data members as they are // It's OK to access the data members as they are // final and this code is the last one to touch // final and this code is the last one to touch // them as shredding is the very last step, so the // them as shredding is the very last step, so the // UI is not interactive at this point. // UI is not interactive at this point. shredPages(editor); shredPages(editor); updatePrintJob(); updatePrintJob(); } finally { return null; } @Override protected void onPostExecute(Void aVoid) { mContext.unbindService(PageShredder.this); mContext.unbindService(PageShredder.this); mCallback.run(); mCallback.run(); } } return null; } }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); } } Loading