summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drm/drmserver/DrmManagerService.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/drm/drmserver/DrmManagerService.cpp b/drm/drmserver/DrmManagerService.cpp
index 2b71904..63341e0 100644
--- a/drm/drmserver/DrmManagerService.cpp
+++ b/drm/drmserver/DrmManagerService.cpp
@@ -34,7 +34,18 @@ using namespace android;
static Vector<uid_t> trustedUids;
static bool isProtectedCallAllowed() {
- return true;
+ // TODO
+ // Following implementation is just for reference.
+ // Each OEM manufacturer should implement/replace with their own solutions.
+ IPCThreadState* ipcState = IPCThreadState::self();
+ uid_t uid = ipcState->getCallingUid();
+
+ for (unsigned int i = 0; i < trustedUids.size(); ++i) {
+ if (trustedUids[i] == uid) {
+ return true;
+ }
+ }
+ return false;
}
void DrmManagerService::instantiate() {