Loading services/camera/libcameraservice/common/Camera2ClientBase.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -135,16 +135,17 @@ status_t Camera2ClientBase<TClientBase>::initializeImpl(TProviderPtr providerPtr return NO_INIT; } res = mDevice->initialize(providerPtr, monitorTags); // Verify ops permissions res = TClientBase::startCameraOps(); if (res != OK) { ALOGE("%s: Camera %s: unable to initialize device: %s (%d)", __FUNCTION__, TClientBase::mCameraIdStr.c_str(), strerror(-res), res); TClientBase::finishCameraOps(); return res; } // Verify ops permissions res = TClientBase::startCameraOps(); res = mDevice->initialize(providerPtr, monitorTags); if (res != OK) { ALOGE("%s: Camera %s: unable to initialize device: %s (%d)", __FUNCTION__, TClientBase::mCameraIdStr.c_str(), strerror(-res), res); TClientBase::finishCameraOps(); return res; } Loading services/camera/libcameraservice/device3/Camera3Device.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -205,6 +205,8 @@ status_t Camera3Device::initializeCommonLocked() { return res; } setCameraMuteLocked(mCameraMuteInitial); mPreparerThread = new PreparerThread(); internalUpdateStatusLocked(STATUS_UNCONFIGURED); Loading Loading @@ -5526,10 +5528,19 @@ status_t Camera3Device::setCameraMute(bool enabled) { ATRACE_CALL(); Mutex::Autolock il(mInterfaceLock); Mutex::Autolock l(mLock); return setCameraMuteLocked(enabled); } if (mRequestThread == nullptr || !mSupportCameraMute) { status_t Camera3Device::setCameraMuteLocked(bool enabled) { if (mRequestThread == nullptr) { mCameraMuteInitial = enabled; return OK; } if (!mSupportCameraMute) { return INVALID_OPERATION; } int32_t muteMode = !enabled ? ANDROID_SENSOR_TEST_PATTERN_MODE_OFF : mSupportTestPatternSolidColor ? ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR : Loading services/camera/libcameraservice/device3/Camera3Device.h +13 −0 Original line number Diff line number Diff line Loading @@ -300,6 +300,15 @@ class Camera3Device : */ status_t setCameraMute(bool enabled); /** * Mute the camera. * * When muted, black image data is output on all output streams. * This method assumes the caller already acquired the 'mInterfaceLock' * and 'mLock' locks. */ status_t setCameraMuteLocked(bool enabled); /** * Enables/disables camera service watchdog */ Loading Loading @@ -1499,6 +1508,10 @@ class Camera3Device : // Auto framing override value camera_metadata_enum_android_control_autoframing mAutoframingOverride; // Initial camera mute state stored before the request thread // is active. bool mCameraMuteInitial = false; // Settings override value int32_t mSettingsOverride; // -1 = use original, otherwise // the settings override to use. Loading Loading
services/camera/libcameraservice/common/Camera2ClientBase.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -135,16 +135,17 @@ status_t Camera2ClientBase<TClientBase>::initializeImpl(TProviderPtr providerPtr return NO_INIT; } res = mDevice->initialize(providerPtr, monitorTags); // Verify ops permissions res = TClientBase::startCameraOps(); if (res != OK) { ALOGE("%s: Camera %s: unable to initialize device: %s (%d)", __FUNCTION__, TClientBase::mCameraIdStr.c_str(), strerror(-res), res); TClientBase::finishCameraOps(); return res; } // Verify ops permissions res = TClientBase::startCameraOps(); res = mDevice->initialize(providerPtr, monitorTags); if (res != OK) { ALOGE("%s: Camera %s: unable to initialize device: %s (%d)", __FUNCTION__, TClientBase::mCameraIdStr.c_str(), strerror(-res), res); TClientBase::finishCameraOps(); return res; } Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -205,6 +205,8 @@ status_t Camera3Device::initializeCommonLocked() { return res; } setCameraMuteLocked(mCameraMuteInitial); mPreparerThread = new PreparerThread(); internalUpdateStatusLocked(STATUS_UNCONFIGURED); Loading Loading @@ -5526,10 +5528,19 @@ status_t Camera3Device::setCameraMute(bool enabled) { ATRACE_CALL(); Mutex::Autolock il(mInterfaceLock); Mutex::Autolock l(mLock); return setCameraMuteLocked(enabled); } if (mRequestThread == nullptr || !mSupportCameraMute) { status_t Camera3Device::setCameraMuteLocked(bool enabled) { if (mRequestThread == nullptr) { mCameraMuteInitial = enabled; return OK; } if (!mSupportCameraMute) { return INVALID_OPERATION; } int32_t muteMode = !enabled ? ANDROID_SENSOR_TEST_PATTERN_MODE_OFF : mSupportTestPatternSolidColor ? ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR : Loading
services/camera/libcameraservice/device3/Camera3Device.h +13 −0 Original line number Diff line number Diff line Loading @@ -300,6 +300,15 @@ class Camera3Device : */ status_t setCameraMute(bool enabled); /** * Mute the camera. * * When muted, black image data is output on all output streams. * This method assumes the caller already acquired the 'mInterfaceLock' * and 'mLock' locks. */ status_t setCameraMuteLocked(bool enabled); /** * Enables/disables camera service watchdog */ Loading Loading @@ -1499,6 +1508,10 @@ class Camera3Device : // Auto framing override value camera_metadata_enum_android_control_autoframing mAutoframingOverride; // Initial camera mute state stored before the request thread // is active. bool mCameraMuteInitial = false; // Settings override value int32_t mSettingsOverride; // -1 = use original, otherwise // the settings override to use. Loading