Calculate the max possible preview frame rate for a session and attach
it to CameraSessionStats for consumption by CameraServiceProxy.
Bug: 209669709
Test: Verified values received by the CameraServiceProxy are reasonable.
Change-Id: I865ebda1cb6cbbb5769ace85a0feef8fbd84e554
diff --git a/services/camera/libcameraservice/common/Camera2ClientBase.cpp b/services/camera/libcameraservice/common/Camera2ClientBase.cpp
index a29f3a6..6ed3c02 100644
--- a/services/camera/libcameraservice/common/Camera2ClientBase.cpp
+++ b/services/camera/libcameraservice/common/Camera2ClientBase.cpp
@@ -315,7 +315,7 @@
}
template <typename TClientBase>
-status_t Camera2ClientBase<TClientBase>::notifyActive() {
+status_t Camera2ClientBase<TClientBase>::notifyActive(float maxPreviewFps) {
if (!mDeviceActive) {
status_t res = TClientBase::startCameraStreamingOps();
if (res != OK) {
@@ -323,7 +323,7 @@
TClientBase::mCameraIdStr.string(), res);
return res;
}
- CameraServiceProxyWrapper::logActive(TClientBase::mCameraIdStr);
+ CameraServiceProxyWrapper::logActive(TClientBase::mCameraIdStr, maxPreviewFps);
}
mDeviceActive = true;