问题描述
com.google.android.assistant.gts.AssistantTest#testAssistantOpenFrontCamera
com.google.android.assistant.gts.AssistantTest#testAssistantOpenRearCamera
com.google.android.assistant.gts.AssistantTest#testAssistantTakePhotoWithoutVoiceInteraction
com.google.android.assistant.gts.AssistantTest#testAssistantTakeSelfieWithoutVoiceInteraction
解决方案
The enforcement date for GTS 6.0 R4 version is changed from April 11th, 2019 to April 15th, 2019. This will align GTS 6.0 R4 enforcement date with February Mandatory Functional Patches Due Dates.
GTS 6.0 R4 can fail for the following four test cases for certain devices with either no camera hardware or no HAL3 Camera:
Note that we have already approved waiver for these tests. When uploading your GTS report on APFE, you can mention b/128888399 as waiver ID for these failures. You do not need to request another waiver for these failures.
Google针对这几条case提供 了如下信息
Google官方给的一些信息
Extended Camera Actions
The Google Assistant provides camera and video actions that partners can integrate with their device cameras. These actions let users activate the camera or video recorder and take pictures and videos with voice commands. The camera and video actions are optional modes supported by the Google Assistant. If you choose to integrate these actions, you should follow the implementation instructions below.
To integrate the camera and video actions, use the MediaStore class from the android.provider API.
Important: Before doing a camera or video recorder action, the device must confirm that isVoiceInteractionRoot() is true. If isVoiceInteractionRoot() is false, then the camera will only open in a preview mode and no picture will be taken. There will be no received extras if isVoiceInteractionRoot() is false.
Camera actions
Within the MediaStore class, use the INTENT_ACTION_STILL_IMAGE_CAMERA constant to listen for camera actions. The value is android.media.action.STILL_IMAGE_CAMERA.
The camera intent should listen for the following types of extras:
Action | Extra |
Open only | com.google.assistant.extra.CAMERA_OPEN_ONLY |
Timer | com.google.assistant.extra.TIMER_DURATION_SECONDS |
Front camera | com.google.assistant.extra.USE_FRONT_CAMERA |
Camera mode | com.google.assistant.extra.CAMERA_MODE |
Video recorder actions
Within the MediaStore class, use the INTENT_ACTION_VIDEO_CAMERA constant to listen for video recorder actions. The value is android.media.action.VIDEO_CAMERA.
Video recorder actions use the same extras as camera actions, except for the Timer extra. The video recorder intent should listen for the following types of extras:
Action | Extra |
Open only | com.google.assistant.extra.CAMERA_OPEN_ONLY |
Front camera | com.google.assistant.extra.USE_FRONT_CAMERA |
Camera mode | com.google.assistant.extra.CAMERA_MODE |
Extras
Open only
If this parameter is true, then the camera app should open but not take a picture.
Timer
The timer duration in seconds. Once the timer duration expires, the camera will take a picture.
Note: This extra is not available for video recorder actions.
Front camera
If the value exists and the value is true, the device will use the front-facing camera to take a picture.
Camera mode
The String value specifies the mode the camera should use when taking a picture. If the camera does not understand the specified mode, it should open in its default mode. The String value can be one of the following:
- SINGLE
- PANORAMIC
- BURST_MODE
- LOW_LIGHT
- LANDSCAPE
- BLACK_WHITE
- WIDE_ANGLE
- CINEMA_MODE
- MANUAL_MODE
- PORTRAIT
- SLOW_MOTION
- SUPER_SLOW_MOTION
- AIRBRUSHED
- SQUARE
- DUAL_CAMERA
- FOOD_MODE
- TIME_LAPSE
Note: Some camera modes may not apply for taking pictures (e.g. slow_motion) or recording videos (e.g. burst_mode). If the mode/action combination is not supported by the camera, it should use its default mode.
Examples
The following examples illustrate what extras the intents, on an Android 8.x device, should receive depending on users' voice commands:
Command (OK Google) | Action (android.media.action.) | Extras (com.google.assistant.extra.) |
Take a picture on a wide angle. | STILL_IMAGE_CAMERA | CAMERA_MODE = WIDE_ANGLE |
Take a selfie on a wide angle. | STILL_IMAGE_CAMERA | CAMERA_MODE = WIDE_ANGLE USE_FRONT_CAMERA = true |
Take a picture in beauty mode. | STILL_IMAGE_CAMERA | CAMERA_MODE = AIRBRUSHED |
Take a selfie video on a wide angle. | VIDEO_CAMERA | CAMERA_MODE = WIDE_ANGLE USE_FRONT_CAMERA = true |
Open camera in manual video mode. | VIDEO_CAMERA | CAMERA_MODE = MANUAL_MODE CAMERA_OPEN_ONLY = true |
Take a video in cinema mode. | VIDEO_CAMERA | CAMERA_MODE = CINEMA_MODE |