Enable process restart behavior for VisualQueryDetectionService

Since VisualQueryDetectionService shares process with
HotwordDetectionService and when the latter restarted the former should
also be restarted and calls the correct onRestart method. Add this
capability.

Bug: 265535257
Test: atest CtsVoiceInteractionTestCases
Change-Id: Ie050d5f50b01d1f9e29e4fe4c8a48ed9bf116861
This commit is contained in:
Charles Chen
2023-04-10 19:34:25 +00:00
parent ad2e7289cf
commit 75c4443f4e

View File

@@ -81,7 +81,12 @@ final class VisualQueryDetectorSession extends DetectorSession {
void informRestartProcessLocked() {
Slog.v(TAG, "informRestartProcessLocked");
mUpdateStateAfterStartFinished.set(false);
//TODO(b/261783819): Starts detection in VisualQueryDetectionService.
try {
mCallback.onProcessRestarted();
} catch (RemoteException e) {
Slog.w(TAG, "Failed to communicate #onProcessRestarted", e);
notifyOnDetectorRemoteException();
}
}
void setVisualQueryDetectionAttentionListenerLocked(