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

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

Change-Id: I8c0fae44362634c29ac023e4db24e6ef77469e49
This commit is contained in:
TreeHugger Robot
2021-09-15 14:56:15 +00:00
committed by Automerger Merge Worker

View File

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