summaryrefslogtreecommitdiffstats
path: root/include/camera/ICameraService.h
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2013-02-19 10:40:14 -0800
committerEino-Ville Talvala <etalvala@google.com>2013-02-25 16:11:41 -0800
commitceb388d6c03c38b96dc41c0ea4804b749aa077c4 (patch)
tree0639ba70ce330094a9fa71ba4577eece6d4dadb1 /include/camera/ICameraService.h
parent0894bfb78b7872570b94d0b8d23ebbf6a8b51d35 (diff)
downloadframeworks_av-ceb388d6c03c38b96dc41c0ea4804b749aa077c4.zip
frameworks_av-ceb388d6c03c38b96dc41c0ea4804b749aa077c4.tar.gz
frameworks_av-ceb388d6c03c38b96dc41c0ea4804b749aa077c4.tar.bz2
CameraService and Stagefright: Support AppOps
Camera: - Signal to AppOpsService when camera usage starts and stops - Listen to permissions revocations and act on them - Currently just kill camera connection when permissions lost Stagefright: - Pass on client name, UID to camera as needed Bug: 8181262 Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
Diffstat (limited to 'include/camera/ICameraService.h')
-rw-r--r--include/camera/ICameraService.h20
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;
};
// ----------------------------------------------------------------------------