CameraService: Clean up ICameraServiceProxy; send it more info
- Remove hand-written ICameraServiceProxy C++ impl; use the AIDL-
generated version instead
- Send client package name and camera facing with the camera state
notices
Test: Verify by logging that information sent to proxy is correct;
no camera CTS regressions.
Bug: 32449509
Change-Id: I7a305b76b4f1d5c08b7938108bd73c95986508e0
diff --git a/services/camera/libcameraservice/api1/CameraClient.cpp b/services/camera/libcameraservice/api1/CameraClient.cpp
index 075c2e3..a407d0b 100644
--- a/services/camera/libcameraservice/api1/CameraClient.cpp
+++ b/services/camera/libcameraservice/api1/CameraClient.cpp
@@ -256,8 +256,8 @@
disableMsgType(CAMERA_MSG_ALL_MSGS);
mHardware->stopPreview();
sCameraService->updateProxyDeviceState(
- ICameraServiceProxy::CAMERA_STATE_IDLE,
- String8::format("%d", mCameraId));
+ hardware::ICameraServiceProxy::CAMERA_STATE_IDLE,
+ mCameraIdStr, mCameraFacing, mClientPackageName);
mHardware->cancelPicture();
// Release the hardware resources.
mHardware->release();
@@ -418,8 +418,8 @@
result = mHardware->startPreview();
if (result == NO_ERROR) {
sCameraService->updateProxyDeviceState(
- ICameraServiceProxy::CAMERA_STATE_ACTIVE,
- String8::format("%d", mCameraId));
+ hardware::ICameraServiceProxy::CAMERA_STATE_ACTIVE,
+ mCameraIdStr, mCameraFacing, mClientPackageName);
}
return result;
}
@@ -461,8 +461,8 @@
disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
mHardware->stopPreview();
sCameraService->updateProxyDeviceState(
- ICameraServiceProxy::CAMERA_STATE_IDLE,
- String8::format("%d", mCameraId));
+ hardware::ICameraServiceProxy::CAMERA_STATE_IDLE,
+ mCameraIdStr, mCameraFacing, mClientPackageName);
mPreviewBuffer.clear();
}
@@ -960,8 +960,8 @@
// Shutters only happen in response to takePicture, so mark device as
// idle now, until preview is restarted
sCameraService->updateProxyDeviceState(
- ICameraServiceProxy::CAMERA_STATE_IDLE,
- String8::format("%d", mCameraId));
+ hardware::ICameraServiceProxy::CAMERA_STATE_IDLE,
+ mCameraIdStr, mCameraFacing, mClientPackageName);
mLock.unlock();
}