summaryrefslogtreecommitdiff
path: root/libs/androidfw/ObbFile.cpp
diff options
context:
space:
mode:
author lpeter <lpeter@google.com> 2023-03-10 09:24:58 +0800
committer lpeter <lpeter@google.com> 2023-03-19 16:26:48 +0000
commit78c84e15d284b8e0461f2392c9b800e84d9dc4e9 (patch)
tree43dc0f7c27de6cba17337ae811cbdf0c1d273871 /libs/androidfw/ObbFile.cpp
parent52cef828f16ea9193b0f2999e0ab00701e19ee52 (diff)
Follow HotwordDetector / DetectorFailure API feedback
By API Council feedback, there are two suggestions instead of using instanceof. (1) Use multiple methods in the callback. (2) Use one big failure class which has a field for the failure type. For suggestion 1, the assistant application can easy know the failure comes from which module and take its next action in the different callback method. Currently there are three kinds of detectors, I list what callbacks will be used by different detectors. (1)AlwaysOnHotwordDetector: onFailure(HotwordDetectionServiceFailure) onFailure(SoundTriggerFailure) onUnknownFailure(String) (2)SoftwareHotwordDetector onFailure(HotwordDetectionServiceFailure) onUnknownFailure(String) (3)VisualQueryDetector onFailure(VisualQueryDetectionServiceFailure) onUnknownFailure(String) For suggestion 2, it seems that the assistant application still needs to take the action first to know the failure comes from which module in this one callback method. We think that the suggestion 1 is better than suggestion 2. Bug: 271107031 Test: atest CtsVoiceInteractionTestCases Change-Id: I57fa93d5a0c2919ce762688f1d97766e531ccfb3 Merged-In: I57fa93d5a0c2919ce762688f1d97766e531ccfb3
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
0 files changed, 0 insertions, 0 deletions