summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Charles Chen <liangyuchen@google.com> 2023-04-10 19:34:25 +0000
committer Charles Chen <liangyuchen@google.com> 2023-04-20 08:16:50 +0000
commit75c4443f4e561855d3bec7487e154b19a8ba69dc (patch)
treeb690dc65359edda9ca68fab67a8f77f3e0ea7290
parentad2e7289cfcd289d0793a5ef8933fe0072e12cc4 (diff)
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
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VisualQueryDetectorSession.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VisualQueryDetectorSession.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VisualQueryDetectorSession.java
index aadb38da5469..2e05e2073e80 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VisualQueryDetectorSession.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VisualQueryDetectorSession.java
@@ -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(