Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c99fa35 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "PrintSpooler: Avoid crash in DocumentTransformer shutdown" into main

parents 1dee2c68 d798a70d
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -3282,8 +3282,20 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat

                    @Override
                    protected void onPostExecute(String error) {
                        try {
                            mContext.unbindService(DocumentTransformer.this);
                            mCallback.accept(error);
                        } catch (IllegalArgumentException e) {
                            // Unbinding can fail if the PrintActivity has already been torn down
                            // before the document transform completes.  Since this is about to
                            // exit, there's no need to attempt additional error recovery.
                            Log.w(
                                    LOG_TAG,
                                    "Unable to unbind PdfManipulationService: "
                                            + e
                                            + ". Original error: "
                                            + error);
                        }
                    }
                }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);