Loading camera/CameraSessionStats.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -421,6 +421,12 @@ status_t CameraSessionStats::readFromParcel(const android::Parcel* parcel) { return err; } bool usedZoomOverride = false; if ((err = parcel->readBool(&usedZoomOverride)) != OK) { ALOGE("%s: Failed to read zoom override usage from parcel", __FUNCTION__); return err; } int32_t sessionIdx; if ((err = parcel->readInt32(&sessionIdx)) != OK) { ALOGE("%s: Failed to read session index from parcel", __FUNCTION__); Loading Loading @@ -451,6 +457,7 @@ status_t CameraSessionStats::readFromParcel(const android::Parcel* parcel) { mUserTag = toStdString(userTag); mVideoStabilizationMode = videoStabilizationMode; mUsedUltraWide = usedUltraWide; mUsedZoomOverride = usedZoomOverride; mSessionIndex = sessionIdx; mCameraExtensionSessionStats = extStats; Loading Loading @@ -549,11 +556,17 @@ status_t CameraSessionStats::writeToParcel(android::Parcel* parcel) const { ALOGE("%s: Failed to write video stabilization mode!", __FUNCTION__); return err; } if ((err = parcel->writeBool(mUsedUltraWide)) != OK) { ALOGE("%s: Failed to write ultrawide usage!", __FUNCTION__); return err; } if ((err = parcel->writeBool(mUsedZoomOverride)) != OK) { ALOGE("%s: Failed to write zoom override usage!", __FUNCTION__); return err; } if ((err = parcel->writeInt32(mSessionIndex)) != OK) { ALOGE("%s: Failed to write session index!", __FUNCTION__); return err; Loading camera/camera_platform.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,10 @@ flag { description: "Use waitForService instead of getService with lazy AIDL HALs" bug: "285546208" } flag { namespace: "camera_platform" name: "log_zoom_override_usage" description: "Enable measuring how much usage there is for zoom settings overrde" bug: "307409002" } camera/include/camera/CameraSessionStats.h +1 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ public: std::string mUserTag; int mVideoStabilizationMode; bool mUsedUltraWide; bool mUsedZoomOverride; int mSessionIndex; CameraExtensionSessionStats mCameraExtensionSessionStats; Loading services/camera/libcameraservice/api2/CameraDeviceClient.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -549,6 +549,14 @@ binder::Status CameraDeviceClient::submitRequestList( mUsedUltraWide = true; } } if (!mUsedSettingsOverrideZoom && flags::log_zoom_override_usage()) { entry = physicalSettingsList.begin()->metadata.find( ANDROID_CONTROL_SETTINGS_OVERRIDE); if (entry.count == 1 && entry.data.i32[0] == ANDROID_CONTROL_SETTINGS_OVERRIDE_ZOOM) { mUsedSettingsOverrideZoom = true; } } } mRequestIdCounter++; Loading Loading @@ -2061,7 +2069,8 @@ void CameraDeviceClient::notifyIdle( } } Camera2ClientBase::notifyIdleWithUserTag(requestCount, resultErrorCount, deviceError, fullStreamStats, mUserTag, mVideoStabilizationMode, mUsedUltraWide); fullStreamStats, mUserTag, mVideoStabilizationMode, mUsedUltraWide, mUsedSettingsOverrideZoom); } void CameraDeviceClient::notifyShutter(const CaptureResultExtras& resultExtras, Loading services/camera/libcameraservice/api2/CameraDeviceClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,8 @@ private: int mVideoStabilizationMode = -1; // Whether a zoom_ratio < 1.0 has been used during this session bool mUsedUltraWide = false; // Whether a zoom settings override has been used during this session bool mUsedSettingsOverrideZoom = false; // This only exists in case of camera ID Remapping. const std::string mOriginalCameraId; Loading Loading
camera/CameraSessionStats.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -421,6 +421,12 @@ status_t CameraSessionStats::readFromParcel(const android::Parcel* parcel) { return err; } bool usedZoomOverride = false; if ((err = parcel->readBool(&usedZoomOverride)) != OK) { ALOGE("%s: Failed to read zoom override usage from parcel", __FUNCTION__); return err; } int32_t sessionIdx; if ((err = parcel->readInt32(&sessionIdx)) != OK) { ALOGE("%s: Failed to read session index from parcel", __FUNCTION__); Loading Loading @@ -451,6 +457,7 @@ status_t CameraSessionStats::readFromParcel(const android::Parcel* parcel) { mUserTag = toStdString(userTag); mVideoStabilizationMode = videoStabilizationMode; mUsedUltraWide = usedUltraWide; mUsedZoomOverride = usedZoomOverride; mSessionIndex = sessionIdx; mCameraExtensionSessionStats = extStats; Loading Loading @@ -549,11 +556,17 @@ status_t CameraSessionStats::writeToParcel(android::Parcel* parcel) const { ALOGE("%s: Failed to write video stabilization mode!", __FUNCTION__); return err; } if ((err = parcel->writeBool(mUsedUltraWide)) != OK) { ALOGE("%s: Failed to write ultrawide usage!", __FUNCTION__); return err; } if ((err = parcel->writeBool(mUsedZoomOverride)) != OK) { ALOGE("%s: Failed to write zoom override usage!", __FUNCTION__); return err; } if ((err = parcel->writeInt32(mSessionIndex)) != OK) { ALOGE("%s: Failed to write session index!", __FUNCTION__); return err; Loading
camera/camera_platform.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,10 @@ flag { description: "Use waitForService instead of getService with lazy AIDL HALs" bug: "285546208" } flag { namespace: "camera_platform" name: "log_zoom_override_usage" description: "Enable measuring how much usage there is for zoom settings overrde" bug: "307409002" }
camera/include/camera/CameraSessionStats.h +1 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ public: std::string mUserTag; int mVideoStabilizationMode; bool mUsedUltraWide; bool mUsedZoomOverride; int mSessionIndex; CameraExtensionSessionStats mCameraExtensionSessionStats; Loading
services/camera/libcameraservice/api2/CameraDeviceClient.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -549,6 +549,14 @@ binder::Status CameraDeviceClient::submitRequestList( mUsedUltraWide = true; } } if (!mUsedSettingsOverrideZoom && flags::log_zoom_override_usage()) { entry = physicalSettingsList.begin()->metadata.find( ANDROID_CONTROL_SETTINGS_OVERRIDE); if (entry.count == 1 && entry.data.i32[0] == ANDROID_CONTROL_SETTINGS_OVERRIDE_ZOOM) { mUsedSettingsOverrideZoom = true; } } } mRequestIdCounter++; Loading Loading @@ -2061,7 +2069,8 @@ void CameraDeviceClient::notifyIdle( } } Camera2ClientBase::notifyIdleWithUserTag(requestCount, resultErrorCount, deviceError, fullStreamStats, mUserTag, mVideoStabilizationMode, mUsedUltraWide); fullStreamStats, mUserTag, mVideoStabilizationMode, mUsedUltraWide, mUsedSettingsOverrideZoom); } void CameraDeviceClient::notifyShutter(const CaptureResultExtras& resultExtras, Loading
services/camera/libcameraservice/api2/CameraDeviceClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,8 @@ private: int mVideoStabilizationMode = -1; // Whether a zoom_ratio < 1.0 has been used during this session bool mUsedUltraWide = false; // Whether a zoom settings override has been used during this session bool mUsedSettingsOverrideZoom = false; // This only exists in case of camera ID Remapping. const std::string mOriginalCameraId; Loading