diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2013-02-26 01:40:39 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-02-26 01:40:39 +0000 |
commit | b39f30b0a4902ea0f28454885785da4b2629fe25 (patch) | |
tree | c4042ba7bf201f8d4ac726e876f30cc168f0d032 /include/camera/ICameraService.h | |
parent | b4ac0ea6c45c04ac3e69d6b2243cfec58e858495 (diff) | |
parent | ceb388d6c03c38b96dc41c0ea4804b749aa077c4 (diff) | |
download | frameworks_av-b39f30b0a4902ea0f28454885785da4b2629fe25.zip frameworks_av-b39f30b0a4902ea0f28454885785da4b2629fe25.tar.gz frameworks_av-b39f30b0a4902ea0f28454885785da4b2629fe25.tar.bz2 |
am ceb388d6: CameraService and Stagefright: Support AppOps
* commit 'ceb388d6c03c38b96dc41c0ea4804b749aa077c4':
CameraService and Stagefright: Support AppOps
Diffstat (limited to 'include/camera/ICameraService.h')
-rw-r--r-- | include/camera/ICameraService.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h index 11d7b65..aa64243 100644 --- a/include/camera/ICameraService.h +++ b/include/camera/ICameraService.h @@ -37,18 +37,28 @@ public: CONNECT_PRO }; + enum { + USE_CALLING_UID = -1 + }; + public: DECLARE_META_INTERFACE(CameraService); virtual int32_t getNumberOfCameras() = 0; virtual status_t getCameraInfo(int cameraId, struct CameraInfo* cameraInfo) = 0; - virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, - int cameraId) = 0; + /** + * clientPackageName and clientUid are used for permissions checking. if + * clientUid == USE_CALLING_UID, then the calling UID is used instead. Only + * trusted callers can set a clientUid other than USE_CALLING_UID. + */ + virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, + int cameraId, + const String16& clientPackageName, + int clientUid) = 0; - virtual sp<IProCameraUser> - connect(const sp<IProCameraCallbacks>& cameraCb, - int cameraId) = 0; + virtual sp<IProCameraUser> connect(const sp<IProCameraCallbacks>& cameraCb, + int cameraId) = 0; }; // ---------------------------------------------------------------------------- |