Called onError() when HotwordDetectionService process died

Bug: 189887779
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I98659f4c4553b6c9da31829016419871756d34c9
This commit is contained in:
lpeter
2021-06-07 16:00:36 +08:00
parent d1251db40d
commit 568efb06b8

View File

@@ -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) {