Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6868e986 authored by Jeff Tinker's avatar Jeff Tinker Committed by Riley Spahn
Browse files

Fix Externally reported security issue

bug: 12724697
Change-Id: I57f37dbb3b01c0c3d3256be67c395352dd6ada13
parent 0bffd2e6
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -34,8 +34,19 @@ using namespace android;
static Vector<uid_t> trustedUids;

static bool isProtectedCallAllowed() {
    // 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() {
    ALOGV("instantiate");