Loading camera/Camera.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -71,9 +71,10 @@ Camera::~Camera() } sp<Camera> Camera::connect(int cameraId, const String16& clientPackageName, int clientUid, int clientPid) int clientUid, int clientPid, int targetSdkVersion) { return CameraBaseT::connect(cameraId, clientPackageName, clientUid, clientPid); return CameraBaseT::connect(cameraId, clientPackageName, clientUid, clientPid, targetSdkVersion); } status_t Camera::reconnect() Loading camera/CameraBase.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ const sp<::android::hardware::ICameraService> CameraBase<TCam, TCamTraits>::getC template <typename TCam, typename TCamTraits> sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId, const String16& clientPackageName, int clientUid, int clientPid) int clientUid, int clientPid, int targetSdkVersion) { ALOGV("%s: connect", __FUNCTION__); sp<TCam> c = new TCam(cameraId); Loading @@ -163,7 +163,7 @@ sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId, if (cs != nullptr) { TCamConnectService fnConnectService = TCamTraits::fnConnectService; ret = (cs.get()->*fnConnectService)(cl, cameraId, clientPackageName, clientUid, clientPid, /*out*/ &c->mCamera); clientPid, targetSdkVersion, /*out*/ &c->mCamera); } if (ret.isOk() && c->mCamera != nullptr) { IInterface::asBinder(c->mCamera)->linkToDeath(c); Loading camera/aidl/android/hardware/ICameraService.aidl +8 −4 Original line number Diff line number Diff line Loading @@ -82,7 +82,8 @@ interface ICameraService ICamera connect(ICameraClient client, int cameraId, String opPackageName, int clientUid, int clientPid); int clientUid, int clientPid, int targetSdkVersion); /** * Open a camera device through the new camera API Loading @@ -92,7 +93,8 @@ interface ICameraService String cameraId, String opPackageName, @nullable String featureId, int clientUid, int oomScoreOffset); int clientUid, int oomScoreOffset, int targetSdkVersion); /** * Add listener for changes to camera device and flashlight state. Loading @@ -114,13 +116,15 @@ interface ICameraService * corresponding camera ids. * * @param sessions the set of camera id and session configuration pairs to be queried. * @param targetSdkVersion the target sdk level of the application calling this function. * @return true - the set of concurrent camera id and stream combinations is supported. * false - the set of concurrent camera id and stream combinations is not supported * OR the method was called with a set of camera ids not returned by * getConcurrentCameraIds(). */ boolean isConcurrentSessionConfigurationSupported( in CameraIdAndSessionConfiguration[] sessions); in CameraIdAndSessionConfiguration[] sessions, int targetSdkVersion); /** * Remove listener for changes to camera device and flashlight state. Loading @@ -131,7 +135,7 @@ interface ICameraService * Read the static camera metadata for a camera device. * Only supported for device HAL versions >= 3.2 */ CameraMetadataNative getCameraCharacteristics(String cameraId); CameraMetadataNative getCameraCharacteristics(String cameraId, int targetSdkVersion); /** * Read in the vendor tag descriptors from the camera module HAL. Loading camera/include/camera/Camera.h +2 −2 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ struct CameraTraits<Camera> typedef ::android::hardware::ICameraClient TCamCallbacks; typedef ::android::binder::Status(::android::hardware::ICameraService::*TCamConnectService) (const sp<::android::hardware::ICameraClient>&, int, const String16&, int, int, int, const String16&, int, int, int, /*out*/ sp<::android::hardware::ICamera>*); static TCamConnectService fnConnectService; Loading @@ -81,7 +81,7 @@ public: static sp<Camera> create(const sp<::android::hardware::ICamera>& camera); static sp<Camera> connect(int cameraId, const String16& clientPackageName, int clientUid, int clientPid); int clientUid, int clientPid, int targetSdkVersion); virtual ~Camera(); Loading camera/include/camera/CameraBase.h +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ public: static sp<TCam> connect(int cameraId, const String16& clientPackageName, int clientUid, int clientPid); int clientUid, int clientPid, int targetSdkVersion); virtual void disconnect(); void setListener(const sp<TCamListener>& listener); Loading Loading
camera/Camera.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -71,9 +71,10 @@ Camera::~Camera() } sp<Camera> Camera::connect(int cameraId, const String16& clientPackageName, int clientUid, int clientPid) int clientUid, int clientPid, int targetSdkVersion) { return CameraBaseT::connect(cameraId, clientPackageName, clientUid, clientPid); return CameraBaseT::connect(cameraId, clientPackageName, clientUid, clientPid, targetSdkVersion); } status_t Camera::reconnect() Loading
camera/CameraBase.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ const sp<::android::hardware::ICameraService> CameraBase<TCam, TCamTraits>::getC template <typename TCam, typename TCamTraits> sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId, const String16& clientPackageName, int clientUid, int clientPid) int clientUid, int clientPid, int targetSdkVersion) { ALOGV("%s: connect", __FUNCTION__); sp<TCam> c = new TCam(cameraId); Loading @@ -163,7 +163,7 @@ sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId, if (cs != nullptr) { TCamConnectService fnConnectService = TCamTraits::fnConnectService; ret = (cs.get()->*fnConnectService)(cl, cameraId, clientPackageName, clientUid, clientPid, /*out*/ &c->mCamera); clientPid, targetSdkVersion, /*out*/ &c->mCamera); } if (ret.isOk() && c->mCamera != nullptr) { IInterface::asBinder(c->mCamera)->linkToDeath(c); Loading
camera/aidl/android/hardware/ICameraService.aidl +8 −4 Original line number Diff line number Diff line Loading @@ -82,7 +82,8 @@ interface ICameraService ICamera connect(ICameraClient client, int cameraId, String opPackageName, int clientUid, int clientPid); int clientUid, int clientPid, int targetSdkVersion); /** * Open a camera device through the new camera API Loading @@ -92,7 +93,8 @@ interface ICameraService String cameraId, String opPackageName, @nullable String featureId, int clientUid, int oomScoreOffset); int clientUid, int oomScoreOffset, int targetSdkVersion); /** * Add listener for changes to camera device and flashlight state. Loading @@ -114,13 +116,15 @@ interface ICameraService * corresponding camera ids. * * @param sessions the set of camera id and session configuration pairs to be queried. * @param targetSdkVersion the target sdk level of the application calling this function. * @return true - the set of concurrent camera id and stream combinations is supported. * false - the set of concurrent camera id and stream combinations is not supported * OR the method was called with a set of camera ids not returned by * getConcurrentCameraIds(). */ boolean isConcurrentSessionConfigurationSupported( in CameraIdAndSessionConfiguration[] sessions); in CameraIdAndSessionConfiguration[] sessions, int targetSdkVersion); /** * Remove listener for changes to camera device and flashlight state. Loading @@ -131,7 +135,7 @@ interface ICameraService * Read the static camera metadata for a camera device. * Only supported for device HAL versions >= 3.2 */ CameraMetadataNative getCameraCharacteristics(String cameraId); CameraMetadataNative getCameraCharacteristics(String cameraId, int targetSdkVersion); /** * Read in the vendor tag descriptors from the camera module HAL. Loading
camera/include/camera/Camera.h +2 −2 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ struct CameraTraits<Camera> typedef ::android::hardware::ICameraClient TCamCallbacks; typedef ::android::binder::Status(::android::hardware::ICameraService::*TCamConnectService) (const sp<::android::hardware::ICameraClient>&, int, const String16&, int, int, int, const String16&, int, int, int, /*out*/ sp<::android::hardware::ICamera>*); static TCamConnectService fnConnectService; Loading @@ -81,7 +81,7 @@ public: static sp<Camera> create(const sp<::android::hardware::ICamera>& camera); static sp<Camera> connect(int cameraId, const String16& clientPackageName, int clientUid, int clientPid); int clientUid, int clientPid, int targetSdkVersion); virtual ~Camera(); Loading
camera/include/camera/CameraBase.h +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ public: static sp<TCam> connect(int cameraId, const String16& clientPackageName, int clientUid, int clientPid); int clientUid, int clientPid, int targetSdkVersion); virtual void disconnect(); void setListener(const sp<TCamListener>& listener); Loading