summaryrefslogtreecommitdiffstats
path: root/media/libmedia/IMediaRecorder.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
commit48af7e8dd40883d6154e7029d9500072b551b5fa (patch)
treece8b71d67a3313dc19c0691bc1b26d1244a106b4 /media/libmedia/IMediaRecorder.cpp
parent68e6e24cb6cdd66c2209774c4871a2c47e8bbc8b (diff)
downloadframeworks_av-48af7e8dd40883d6154e7029d9500072b551b5fa.zip
frameworks_av-48af7e8dd40883d6154e7029d9500072b551b5fa.tar.gz
frameworks_av-48af7e8dd40883d6154e7029d9500072b551b5fa.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/libmedia/IMediaRecorder.cpp')
-rw-r--r--media/libmedia/IMediaRecorder.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/media/libmedia/IMediaRecorder.cpp b/media/libmedia/IMediaRecorder.cpp
index fdbc747..c935d97 100644
--- a/media/libmedia/IMediaRecorder.cpp
+++ b/media/libmedia/IMediaRecorder.cpp
@@ -51,7 +51,8 @@ enum {
SET_PARAMETERS,
SET_PREVIEW_SURFACE,
SET_CAMERA,
- SET_LISTENER
+ SET_LISTENER,
+ SET_CLIENT_NAME
};
class BpMediaRecorder: public BpInterface<IMediaRecorder>
@@ -217,6 +218,16 @@ public:
return reply.readInt32();
}
+ status_t setClientName(const String16& clientName)
+ {
+ ALOGV("setClientName(%s)", String8(clientName).string());
+ Parcel data, reply;
+ data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor());
+ data.writeString16(clientName);
+ remote()->transact(SET_CLIENT_NAME, data, &reply);
+ return reply.readInt32();
+ }
+
status_t prepare()
{
ALOGV("prepare");
@@ -423,6 +434,12 @@ status_t BnMediaRecorder::onTransact(
reply->writeInt32(setListener(listener));
return NO_ERROR;
} break;
+ case SET_CLIENT_NAME: {
+ ALOGV("SET_CLIENT_NAME");
+ CHECK_INTERFACE(IMediaRecorder, data, reply);
+ reply->writeInt32(setClientName(data.readString16()));
+ return NO_ERROR;
+ }
case SET_PREVIEW_SURFACE: {
ALOGV("SET_PREVIEW_SURFACE");
CHECK_INTERFACE(IMediaRecorder, data, reply);