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
This commit is contained in:
Nicholas Ambur
2023-04-10 23:35:20 +00:00
parent aef1724849
commit ea8b1a5514

View File

@@ -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();
}
}