Merge "Catch NoSuchElementException when unbinding print doc death recipient" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ccc5c7c345
@@ -52,6 +52,7 @@ import java.io.InputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
public final class RemotePrintDocument {
|
public final class RemotePrintDocument {
|
||||||
private static final String LOG_TAG = "RemotePrintDocument";
|
private static final String LOG_TAG = "RemotePrintDocument";
|
||||||
@@ -441,7 +442,12 @@ public final class RemotePrintDocument {
|
|||||||
// Keep going - best effort...
|
// Keep going - best effort...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
mPrintDocumentAdapter.asBinder().unlinkToDeath(mDeathRecipient, 0);
|
mPrintDocumentAdapter.asBinder().unlinkToDeath(mDeathRecipient, 0);
|
||||||
|
} catch (NoSuchElementException e) {
|
||||||
|
Log.w(LOG_TAG, "Error unlinking print document adapter death recipient.");
|
||||||
|
// Keep going - best effort...
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleCommand(AsyncCommand command) {
|
private void scheduleCommand(AsyncCommand command) {
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ import android.print.PrinterId;
|
|||||||
import android.print.PrinterInfo;
|
import android.print.PrinterInfo;
|
||||||
import android.printservice.PrintService;
|
import android.printservice.PrintService;
|
||||||
import android.printservice.PrintServiceInfo;
|
import android.printservice.PrintServiceInfo;
|
||||||
import android.provider.DocumentsContract;
|
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
|||||||
Reference in New Issue
Block a user