bug:
12724697
Change-Id: I57f37dbb3b01c0c3d3256be67c395352dd6ada13
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() {