From ea8b1a551457c00a33b2af458c720f1ec249ec68 Mon Sep 17 00:00:00 2001 From: Nicholas Ambur Date: Mon, 10 Apr 2023 23:35:20 +0000 Subject: [PATCH] AOHD do not unbind HotwordDetectionService on destroy AlwaysOnHotwordDetector should not be required to tear down the HotwordDetectionService. The VoiceInteractionManagerService will handle the unbinding and shutdown of the service on its own. Bug: 277392480 Test: atest AlwaysOnHotwordDetectorTest Change-Id: Iec0af794595f0e8d143d7bab118c4b1f02569c31 --- .../service/voice/VoiceInteractionService.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java index 79a4f54bac0ad..6e85de2062a7f 100644 --- a/core/java/android/service/voice/VoiceInteractionService.java +++ b/core/java/android/service/voice/VoiceInteractionService.java @@ -1070,21 +1070,6 @@ public class VoiceInteractionService extends Service { mActiveVisualQueryDetector = null; } mActiveDetectors.remove(detector); - shutdownHotwordDetectionServiceIfRequiredLocked(); - } - } - - private void shutdownHotwordDetectionServiceIfRequiredLocked() { - for (HotwordDetector detector : mActiveDetectors) { - if (detector.isUsingSandboxedDetectionService()) { - return; - } - } - - try { - mSystemService.shutdownHotwordDetectionService(); - } catch (RemoteException e) { - e.rethrowFromSystemServer(); } }