camera: Allow shutter sounds to be disabled from camera2 api
When using the connectLegacy binder interface (available only
through an @hide java api), then consider the camera to be in the
camera2 api legacy mode.
In legacy mode, allow disabling the shutter sound unconditionally.
Bug: 17109582
Change-Id: Ieb3fc61ff111d792cc657c018e278349c25472cf
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index cb98c96..a7328cf 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -452,14 +452,17 @@
*
* Returns OK on success, or a negative error code.
*/
- status_t connectHelperLocked(const sp<ICameraClient>& cameraClient,
- int cameraId,
- const String16& clientPackageName,
- int clientUid,
- int callingPid,
- /*out*/
- sp<Client>& client,
- int halVersion = CAMERA_HAL_API_VERSION_UNSPECIFIED);
+ status_t connectHelperLocked(
+ /*out*/
+ sp<Client>& client,
+ /*in*/
+ const sp<ICameraClient>& cameraClient,
+ int cameraId,
+ const String16& clientPackageName,
+ int clientUid,
+ int callingPid,
+ int halVersion = CAMERA_HAL_API_VERSION_UNSPECIFIED,
+ bool legacyMode = false);
};
} // namespace android