Merge "Perform checking for restarting SandboxedDetectionProcesses"

This commit is contained in:
Charles Chen
2023-01-26 07:20:30 +00:00
committed by Android (Google) Code Review

View File

@@ -445,9 +445,15 @@ final class HotwordDetectionConnection {
// Recreate connection to reset the cache.
mRestartCount++;
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) -> {