Merge "Remove the isBound() check for HotwordDetectionService." into sc-qpr1-dev am: 75bdd11137 am: c4a0db7832 am: ba064f738c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15768220

Change-Id: Ida389b1e52e647cb7cca70fa7dfe701a893816d3
This commit is contained in:
TreeHugger Robot
2021-09-15 15:21:35 +00:00
committed by Automerger Merge Worker

View File

@@ -272,13 +272,11 @@ final class HotwordDetectionConnection {
Slog.v(TAG, "cancelLocked");
clearDebugHotwordLoggingTimeoutLocked();
mDebugHotwordLogging = false;
if (mRemoteHotwordDetectionService.isBound()) {
mRemoteHotwordDetectionService.unbind();
LocalServices.getService(PermissionManagerServiceInternal.class)
.setHotwordDetectionServiceProvider(null);
mIdentity = null;
updateServiceUidForAudioPolicy(Process.INVALID_UID);
}
mRemoteHotwordDetectionService.unbind();
LocalServices.getService(PermissionManagerServiceInternal.class)
.setHotwordDetectionServiceProvider(null);
mIdentity = null;
updateServiceUidForAudioPolicy(Process.INVALID_UID);
mCancellationTaskFuture.cancel(/* may interrupt */ true);
if (mAudioFlinger != null) {
mAudioFlinger.unlinkToDeath(mAudioServerDeathRecipient, /* flags= */ 0);