Camera: Support TEST_PATTERN_MODE_BLACK for camera muting
If test pattern mode BLACK is supported, but SOLID_COLOR is not,
use it for implementing camera muting.
Also fix up incorrect docs for test patterns
Test: Camera CTS continues to pass
Bug: 189507251
Change-Id: I3db57f42c5615bba28f1b59e61adcde1d0640590
diff --git a/services/camera/libcameraservice/device3/Camera3Device.h b/services/camera/libcameraservice/device3/Camera3Device.h
index f962c78..b27f1a5 100644
--- a/services/camera/libcameraservice/device3/Camera3Device.h
+++ b/services/camera/libcameraservice/device3/Camera3Device.h
@@ -918,7 +918,7 @@
status_t setRotateAndCropAutoBehavior(
camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropValue);
- status_t setCameraMute(bool enabled);
+ status_t setCameraMute(int32_t muteMode);
status_t setHalInterface(sp<HalInterface> newHalInterface);
@@ -1069,7 +1069,7 @@
uint32_t mCurrentAfTriggerId;
uint32_t mCurrentPreCaptureTriggerId;
camera_metadata_enum_android_scaler_rotate_and_crop_t mRotateAndCropOverride;
- bool mCameraMute;
+ int32_t mCameraMute; // 0 = no mute, otherwise the TEST_PATTERN_MODE to use
bool mCameraMuteChanged;
int64_t mRepeatingLastFrameNumber;
@@ -1342,6 +1342,8 @@
// Whether the HAL supports camera muting via test pattern
bool mSupportCameraMute = false;
+ // Whether the HAL supports SOLID_COLOR or BLACK if mSupportCameraMute is true
+ bool mSupportTestPatternSolidColor = false;
// Injection camera related methods.
class Camera3DeviceInjectionMethods : public virtual RefBase {