summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/CameraSourceTimeLapse.cpp
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 /media/libstagefright/CameraSourceTimeLapse.cpp
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 'media/libstagefright/CameraSourceTimeLapse.cpp')
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 26ce7ae..2ed2223 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -36,6 +36,8 @@ CameraSourceTimeLapse *CameraSourceTimeLapse::CreateFromCamera(
const sp<ICamera> &camera,
const sp<ICameraRecordingProxy> &proxy,
int32_t cameraId,
+ const String16& clientName,
+ uid_t clientUid,
Size videoSize,
int32_t videoFrameRate,
const sp<Surface>& surface,
@@ -43,6 +45,7 @@ CameraSourceTimeLapse *CameraSourceTimeLapse::CreateFromCamera(
CameraSourceTimeLapse *source = new
CameraSourceTimeLapse(camera, proxy, cameraId,
+ clientName, clientUid,
videoSize, videoFrameRate, surface,
timeBetweenFrameCaptureUs);
@@ -59,11 +62,14 @@ CameraSourceTimeLapse::CameraSourceTimeLapse(
const sp<ICamera>& camera,
const sp<ICameraRecordingProxy>& proxy,
int32_t cameraId,
+ const String16& clientName,
+ uid_t clientUid,
Size videoSize,
int32_t videoFrameRate,
const sp<Surface>& surface,
int64_t timeBetweenFrameCaptureUs)
- : CameraSource(camera, proxy, cameraId, videoSize, videoFrameRate, surface, true),
+ : CameraSource(camera, proxy, cameraId, clientName, clientUid,
+ videoSize, videoFrameRate, surface, true),
mTimeBetweenTimeLapseVideoFramesUs(1E6/videoFrameRate),
mLastTimeLapseFrameRealTimestampUs(0),
mSkipCurrentFrame(false) {