summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2014-06-16 19:21:12 -0700
committerRicardo Cerqueira <ricardo@cyngn.com>2014-11-12 20:04:19 +0000
commit5568e2e869e031462254ed8468493a640bd60166 (patch)
tree89e1446f09b5a2fbee7696f9ab48229d306b1f01
parent248986c0c0dcbebf60baf06bd957be79f144ed30 (diff)
downloadframeworks_av-5568e2e869e031462254ed8468493a640bd60166.tar.gz
frameworks_av-5568e2e869e031462254ed8468493a640bd60166.tar.bz2
frameworks_av-5568e2e869e031462254ed8468493a640bd60166.zip
DO NOT MERGE: CameraService: Fix permissions check issues
Bug: 15677063 Change-Id: I012c111fff90fefd9eb0fef7c9d6034f00c9c6df
-rw-r--r--services/camera/libcameraservice/CameraService.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index eab3c2ac86..994ce26572 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -542,8 +542,8 @@ status_t CameraService::connectPro(
case CAMERA_DEVICE_API_VERSION_2_0:
case CAMERA_DEVICE_API_VERSION_2_1:
case CAMERA_DEVICE_API_VERSION_3_0:
- client = new ProCamera2Client(this, cameraCb, String16(),
- cameraId, facing, callingPid, USE_CALLING_UID, getpid());
+ client = new ProCamera2Client(this, cameraCb, clientPackageName,
+ cameraId, facing, callingPid, clientUid, getpid());
break;
case -1:
ALOGE("Invalid camera id %d", cameraId);
@@ -620,8 +620,8 @@ status_t CameraService::connectDevice(
case CAMERA_DEVICE_API_VERSION_2_0:
case CAMERA_DEVICE_API_VERSION_2_1:
case CAMERA_DEVICE_API_VERSION_3_0:
- client = new CameraDeviceClient(this, cameraCb, String16(),
- cameraId, facing, callingPid, USE_CALLING_UID, getpid());
+ client = new CameraDeviceClient(this, cameraCb, clientPackageName,
+ cameraId, facing, callingPid, clientUid, getpid());
break;
case -1:
ALOGE("Invalid camera id %d", cameraId);
@@ -835,6 +835,7 @@ status_t CameraService::onTransact(
switch (code) {
case BnCameraService::CONNECT:
case BnCameraService::CONNECT_PRO:
+ case BnCameraService::CONNECT_DEVICE:
const int pid = getCallingPid();
const int self_pid = getpid();
if (pid != self_pid) {