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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user