summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-09-07 17:38:58 -0700
committerJeff Brown <jeffbrown@google.com>2012-09-07 17:39:35 -0700
commitb019250df516e094b0cb648851f9a132b045378a (patch)
treedacb7de5f5f683a1c33fed69f6e78b9cb90e5b44 /media/libmediaplayerservice
parent5e54e0898a0110642df126238227eca150f2654a (diff)
downloadframeworks_av-b019250df516e094b0cb648851f9a132b045378a.zip
frameworks_av-b019250df516e094b0cb648851f9a132b045378a.tar.gz
frameworks_av-b019250df516e094b0cb648851f9a132b045378a.tar.bz2
Add a permission for controlling wifi display.
Change-Id: I321b6c1a0223e0c3d5df04fde7a13ab91c08c7bc
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 6b57c48..1be4edf 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -283,10 +283,19 @@ sp<ICrypto> MediaPlayerService::makeCrypto() {
sp<IRemoteDisplay> MediaPlayerService::listenForRemoteDisplay(
const sp<IRemoteDisplayClient>& client, const String8& iface) {
+ if (!checkPermission("android.permission.CONTROL_WIFI_DISPLAY")) {
+ return NULL;
+ }
+
return new RemoteDisplay(client, iface.string());
}
+// TODO: delete this method
status_t MediaPlayerService::enableRemoteDisplay(const char *iface) {
+ if (!checkPermission("android.permission.CONTROL_WIFI_DISPLAY")) {
+ return PERMISSION_DENIED;
+ }
+
Mutex::Autolock autoLock(mLock);
if (iface != NULL) {