Camera: Add metrics for zoom override usage
Test: Verify locally that zoom override usage is detected correctly
Bug: 307409002
Change-Id: I0c1783e278ea7ead1df48ae59ec846d6640c0feb
diff --git a/services/camera/libcameraservice/utils/CameraServiceProxyWrapper.cpp b/services/camera/libcameraservice/utils/CameraServiceProxyWrapper.cpp
index d227606..65e93a9 100644
--- a/services/camera/libcameraservice/utils/CameraServiceProxyWrapper.cpp
+++ b/services/camera/libcameraservice/utils/CameraServiceProxyWrapper.cpp
@@ -95,7 +95,7 @@
sp<hardware::ICameraServiceProxy>& proxyBinder,
int64_t requestCount, int64_t resultErrorCount, bool deviceError,
const std::string& userTag, int32_t videoStabilizationMode, bool usedUltraWide,
- const std::vector<hardware::CameraStreamStats>& streamStats) {
+ bool usedZoomOverride, const std::vector<hardware::CameraStreamStats>& streamStats) {
Mutex::Autolock l(mLock);
mSessionStats.mNewCameraState = CameraSessionStats::CAMERA_STATE_IDLE;
@@ -105,6 +105,7 @@
mSessionStats.mUserTag = userTag;
mSessionStats.mVideoStabilizationMode = videoStabilizationMode;
mSessionStats.mUsedUltraWide = usedUltraWide;
+ mSessionStats.mUsedZoomOverride = usedZoomOverride;
mSessionStats.mStreamStats = streamStats;
updateProxyDeviceState(proxyBinder);
@@ -280,7 +281,7 @@
void CameraServiceProxyWrapper::logIdle(const std::string& id,
int64_t requestCount, int64_t resultErrorCount, bool deviceError,
const std::string& userTag, int32_t videoStabilizationMode, bool usedUltraWide,
- const std::vector<hardware::CameraStreamStats>& streamStats) {
+ bool usedZoomOverride, const std::vector<hardware::CameraStreamStats>& streamStats) {
std::shared_ptr<CameraSessionStatsWrapper> sessionStats;
{
Mutex::Autolock l(mLock);
@@ -305,7 +306,7 @@
sp<hardware::ICameraServiceProxy> proxyBinder = getCameraServiceProxy();
sessionStats->onIdle(proxyBinder, requestCount, resultErrorCount, deviceError, userTag,
- videoStabilizationMode, usedUltraWide, streamStats);
+ videoStabilizationMode, usedUltraWide, usedZoomOverride, streamStats);
}
void CameraServiceProxyWrapper::logOpen(const std::string& id, int facing,