Add boolean to Exception bundle, to indicate if Fallback is enabled
Fix: 142153888
Test: mma
Change-Id: Ib82c8c23c4e0658e277bc7e9efec7fc30f2ea6c6
diff --git a/car-assist-client-lib/src/com/android/car/assist/client/CarAssistUtils.java b/car-assist-client-lib/src/com/android/car/assist/client/CarAssistUtils.java
index 029467e..1f9d915 100644
--- a/car-assist-client-lib/src/com/android/car/assist/client/CarAssistUtils.java
+++ b/car-assist-client-lib/src/com/android/car/assist/client/CarAssistUtils.java
@@ -346,7 +346,8 @@
// If there is an active assistant, alert them to request permissions.
Bundle handleExceptionBundle = BundleBuilder
.buildAssistantHandleExceptionBundle(
- EXCEPTION_NOTIFICATION_LISTENER_PERMISSIONS_MISSING);
+ EXCEPTION_NOTIFICATION_LISTENER_PERMISSIONS_MISSING,
+ /* fallbackAssistantEnabled */ false);
fireAssistantAction(CarVoiceInteractionSession.VOICE_ACTION_HANDLE_EXCEPTION,
handleExceptionBundle, callback);
}
@@ -390,8 +391,13 @@
final String fallbackActionResult = hasError ? ActionRequestCallback.RESULT_FAILED
: ActionRequestCallback.RESULT_SUCCESS;
if (hasActiveAssistant()) {
+ // If there is an active assistant, alert them to request permissions.
+ Bundle handleExceptionBundle = BundleBuilder
+ .buildAssistantHandleExceptionBundle(
+ EXCEPTION_NOTIFICATION_LISTENER_PERMISSIONS_MISSING,
+ /* fallbackAssistantEnabled */ true);
fireAssistantAction(CarVoiceInteractionSession.VOICE_ACTION_HANDLE_EXCEPTION,
- null, new ActionRequestCallback() {
+ handleExceptionBundle, new ActionRequestCallback() {
@Override
public void onResult(String requestActionFromAssistantResult) {
if (fallbackActionResult.equals(