diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2014-06-16 19:21:12 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2014-06-17 20:32:53 +0000 |
commit | 63d877fe4138a95c27f1020b34e81bfa0430d2b8 (patch) | |
tree | 5942df400b6396fb30883603b0a79b51a4101cfa /services | |
parent | 3a227969f604d7c6a24a795661a13f70a5f37e1f (diff) | |
download | frameworks_av-63d877fe4138a95c27f1020b34e81bfa0430d2b8.zip frameworks_av-63d877fe4138a95c27f1020b34e81bfa0430d2b8.tar.gz frameworks_av-63d877fe4138a95c27f1020b34e81bfa0430d2b8.tar.bz2 |
CameraService: Fix permissions check issues
Bug: 15677063
Change-Id: I012c111fff90fefd9eb0fef7c9d6034f00c9c6df
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 280478c..a014457 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -791,8 +791,8 @@ status_t CameraService::connectPro( case CAMERA_DEVICE_API_VERSION_3_0: case CAMERA_DEVICE_API_VERSION_3_1: case CAMERA_DEVICE_API_VERSION_3_2: - 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); @@ -871,8 +871,8 @@ status_t CameraService::connectDevice( case CAMERA_DEVICE_API_VERSION_3_0: case CAMERA_DEVICE_API_VERSION_3_1: case CAMERA_DEVICE_API_VERSION_3_2: - 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); @@ -1090,6 +1090,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) { |