diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2015-05-12 02:19:27 +0000 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2015-05-12 02:19:27 +0000 |
commit | 280405a138a0068694f3c39b4290f510173133d9 (patch) | |
tree | 691b6bc4e9a5011b38233f01df9e0486d9ce759a /camera | |
parent | 32fa6d0e65dbf956e253a1006e9419dce2fe75c9 (diff) | |
download | frameworks_av-280405a138a0068694f3c39b4290f510173133d9.zip frameworks_av-280405a138a0068694f3c39b4290f510173133d9.tar.gz frameworks_av-280405a138a0068694f3c39b4290f510173133d9.tar.bz2 |
Revert "Add camera app op - camera"
This is not needed duplication of work
This reverts commit 32fa6d0e65dbf956e253a1006e9419dce2fe75c9.
Change-Id: I2c81b0dacb2ed99c408c79c1f9e22a4baa564494
Diffstat (limited to 'camera')
-rw-r--r-- | camera/Camera.cpp | 9 | ||||
-rw-r--r-- | camera/CameraBase.cpp | 4 | ||||
-rw-r--r-- | camera/ICameraService.cpp | 24 |
3 files changed, 19 insertions, 18 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp index 84e0d1c..3a9fb4c 100644 --- a/camera/Camera.cpp +++ b/camera/Camera.cpp @@ -71,13 +71,14 @@ Camera::~Camera() // deadlock if we call any method of ICamera here. } -sp<Camera> Camera::connect(int cameraId, const String16& opPackageName, int clientUid) +sp<Camera> Camera::connect(int cameraId, const String16& clientPackageName, + int clientUid) { - return CameraBaseT::connect(cameraId, opPackageName, clientUid); + return CameraBaseT::connect(cameraId, clientPackageName, clientUid); } status_t Camera::connectLegacy(int cameraId, int halVersion, - const String16& opPackageName, + const String16& clientPackageName, int clientUid, sp<Camera>& camera) { @@ -88,7 +89,7 @@ status_t Camera::connectLegacy(int cameraId, int halVersion, const sp<ICameraService>& cs = CameraBaseT::getCameraService(); if (cs != 0) { - status = cs.get()->connectLegacy(cl, cameraId, halVersion, opPackageName, + status = cs.get()->connectLegacy(cl, cameraId, halVersion, clientPackageName, clientUid, /*out*/c->mCamera); } if (status == OK && c->mCamera != 0) { diff --git a/camera/CameraBase.cpp b/camera/CameraBase.cpp index 0dc0276..5d50aa8 100644 --- a/camera/CameraBase.cpp +++ b/camera/CameraBase.cpp @@ -91,7 +91,7 @@ const sp<ICameraService>& CameraBase<TCam, TCamTraits>::getCameraService() template <typename TCam, typename TCamTraits> sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId, - const String16& opPackageName, + const String16& clientPackageName, int clientUid) { ALOGV("%s: connect", __FUNCTION__); @@ -102,7 +102,7 @@ sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId, if (cs != 0) { TCamConnectService fnConnectService = TCamTraits::fnConnectService; - status = (cs.get()->*fnConnectService)(cl, cameraId, opPackageName, clientUid, + status = (cs.get()->*fnConnectService)(cl, cameraId, clientPackageName, clientUid, /*out*/ c->mCamera); } if (status == OK && c->mCamera != 0) { diff --git a/camera/ICameraService.cpp b/camera/ICameraService.cpp index 192e40d..51a775b 100644 --- a/camera/ICameraService.cpp +++ b/camera/ICameraService.cpp @@ -164,7 +164,7 @@ public: // connect to camera service (android.hardware.Camera) virtual status_t connect(const sp<ICameraClient>& cameraClient, int cameraId, - const String16& opPackageName, int clientUid, + const String16 &clientPackageName, int clientUid, /*out*/ sp<ICamera>& device) { @@ -172,7 +172,7 @@ public: data.writeInterfaceToken(ICameraService::getInterfaceDescriptor()); data.writeStrongBinder(IInterface::asBinder(cameraClient)); data.writeInt32(cameraId); - data.writeString16(opPackageName); + data.writeString16(clientPackageName); data.writeInt32(clientUid); remote()->transact(BnCameraService::CONNECT, data, &reply); @@ -187,7 +187,7 @@ public: // connect to camera service (android.hardware.Camera) virtual status_t connectLegacy(const sp<ICameraClient>& cameraClient, int cameraId, int halVersion, - const String16& opPackageName, int clientUid, + const String16 &clientPackageName, int clientUid, /*out*/sp<ICamera>& device) { Parcel data, reply; @@ -195,7 +195,7 @@ public: data.writeStrongBinder(IInterface::asBinder(cameraClient)); data.writeInt32(cameraId); data.writeInt32(halVersion); - data.writeString16(opPackageName); + data.writeString16(clientPackageName); data.writeInt32(clientUid); remote()->transact(BnCameraService::CONNECT_LEGACY, data, &reply); @@ -225,7 +225,7 @@ public: virtual status_t connectDevice( const sp<ICameraDeviceCallbacks>& cameraCb, int cameraId, - const String16& opPackageName, + const String16& clientPackageName, int clientUid, /*out*/ sp<ICameraDeviceUser>& device) @@ -234,7 +234,7 @@ public: data.writeInterfaceToken(ICameraService::getInterfaceDescriptor()); data.writeStrongBinder(IInterface::asBinder(cameraCb)); data.writeInt32(cameraId); - data.writeString16(opPackageName); + data.writeString16(clientPackageName); data.writeInt32(clientUid); remote()->transact(BnCameraService::CONNECT_DEVICE, data, &reply); @@ -374,11 +374,11 @@ status_t BnCameraService::onTransact( sp<ICameraClient> cameraClient = interface_cast<ICameraClient>(data.readStrongBinder()); int32_t cameraId = data.readInt32(); - const String16 opPackageName = data.readString16(); + const String16 clientName = data.readString16(); int32_t clientUid = data.readInt32(); sp<ICamera> camera; status_t status = connect(cameraClient, cameraId, - opPackageName, clientUid, /*out*/camera); + clientName, clientUid, /*out*/camera); reply->writeNoException(); reply->writeInt32(status); if (camera != NULL) { @@ -394,11 +394,11 @@ status_t BnCameraService::onTransact( sp<ICameraDeviceCallbacks> cameraClient = interface_cast<ICameraDeviceCallbacks>(data.readStrongBinder()); int32_t cameraId = data.readInt32(); - const String16 opPackageName = data.readString16(); + const String16 clientName = data.readString16(); int32_t clientUid = data.readInt32(); sp<ICameraDeviceUser> camera; status_t status = connectDevice(cameraClient, cameraId, - opPackageName, clientUid, /*out*/camera); + clientName, clientUid, /*out*/camera); reply->writeNoException(); reply->writeInt32(status); if (camera != NULL) { @@ -454,11 +454,11 @@ status_t BnCameraService::onTransact( interface_cast<ICameraClient>(data.readStrongBinder()); int32_t cameraId = data.readInt32(); int32_t halVersion = data.readInt32(); - const String16 opPackageName = data.readString16(); + const String16 clientName = data.readString16(); int32_t clientUid = data.readInt32(); sp<ICamera> camera; status_t status = connectLegacy(cameraClient, cameraId, halVersion, - opPackageName, clientUid, /*out*/camera); + clientName, clientUid, /*out*/camera); reply->writeNoException(); reply->writeInt32(status); if (camera != NULL) { |