Merge "Catch exception when unlinkToDeath" into tm-qpr-dev am: 9a5afdb60b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19346886 Change-Id: I8596b049461d6e4a76a64b9406a11b7ee3893977 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -64,6 +64,7 @@ import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/**
|
||||
@@ -630,7 +631,11 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
|
||||
mComponentName = null;
|
||||
mEvents = null;
|
||||
if (mDirectServiceInterface != null) {
|
||||
mDirectServiceInterface.asBinder().unlinkToDeath(mDirectServiceVulture, 0);
|
||||
try {
|
||||
mDirectServiceInterface.asBinder().unlinkToDeath(mDirectServiceVulture, 0);
|
||||
} catch (NoSuchElementException e) {
|
||||
Log.w(TAG, "IContentCaptureDirectManager does not exist");
|
||||
}
|
||||
}
|
||||
mDirectServiceInterface = null;
|
||||
mHandler.removeMessages(MSG_FLUSH);
|
||||
|
||||
Reference in New Issue
Block a user