From 568efb06b8d9263b2d8cd46d7c631198d1020e83 Mon Sep 17 00:00:00 2001 From: lpeter Date: Mon, 7 Jun 2021 16:00:36 +0800 Subject: [PATCH] Called onError() when HotwordDetectionService process died Bug: 189887779 Test: atest CtsVoiceInteractionTestCases Test: atest CtsVoiceInteractionTestCases --instant Change-Id: I98659f4c4553b6c9da31829016419871756d34c9 --- .../voiceinteraction/HotwordDetectionConnection.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java index 0bb09a9de07f8..31825013604d2 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java @@ -131,6 +131,17 @@ final class HotwordDetectionConnection { protected long getAutoDisconnectTimeoutMs() { return -1; } + + @Override + public void binderDied() { + super.binderDied(); + Slog.w(TAG, "binderDied"); + try { + callback.onError(-1); + } catch (RemoteException e) { + Slog.w(TAG, "Failed to report onError status: " + e); + } + } }; mRemoteHotwordDetectionService.connect(); if (callback == null) {