Perform checking for restarting SandboxedDetectionProcesses
SandboxedDetectionServices should not be started unexpectedly if the service is not specified. This change adds a checking to fix this. Bug: 265535257 Test: atest CtsVoiceInteractionTestCases Change-Id: I6143079bbf3288039246ce5f9af27164a84b0958
This commit is contained in:
@@ -432,9 +432,15 @@ final class HotwordDetectionConnection {
|
||||
mLastRestartInstant = Instant.now();
|
||||
// Recreate connection to reset the cache.
|
||||
|
||||
mRemoteHotwordDetectionService = mHotwordDetectionServiceConnectionFactory.createLocked();
|
||||
mRemoteVisualQueryDetectionService =
|
||||
mVisualQueryDetectionServiceConnectionFactory.createLocked();
|
||||
if (oldHotwordConnection != null) {
|
||||
mRemoteHotwordDetectionService =
|
||||
mHotwordDetectionServiceConnectionFactory.createLocked();
|
||||
}
|
||||
|
||||
if (oldVisualQueryDetectionConnection != null) {
|
||||
mRemoteVisualQueryDetectionService =
|
||||
mVisualQueryDetectionServiceConnectionFactory.createLocked();
|
||||
}
|
||||
|
||||
Slog.v(TAG, "Started the new process, dispatching processRestarted to detector");
|
||||
runForEachDetectorSessionLocked((session) -> {
|
||||
|
||||
Reference in New Issue
Block a user