From ceb388d6c03c38b96dc41c0ea4804b749aa077c4 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Tue, 19 Feb 2013 10:40:14 -0800 Subject: 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 --- include/camera/Camera.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/camera/Camera.h') diff --git a/include/camera/Camera.h b/include/camera/Camera.h index 8b87de6..be2b7f4 100644 --- a/include/camera/Camera.h +++ b/include/camera/Camera.h @@ -53,6 +53,7 @@ class ICamera; class Surface; class Mutex; class String8; +class String16; // ref-counted object for callbacks class CameraListener: virtual public RefBase @@ -67,12 +68,19 @@ public: class Camera : public BnCameraClient, public IBinder::DeathRecipient { public: + enum { + USE_CALLING_UID = -1 + }; + // construct a camera client from an existing remote static sp create(const sp& camera); static int32_t getNumberOfCameras(); static status_t getCameraInfo(int cameraId, struct CameraInfo* cameraInfo); - static sp connect(int cameraId); + static sp connect(int cameraId, + const String16& clientPackageName, + int clientUid); + virtual ~Camera(); void init(); -- cgit v1.1