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

Commit 10fad6ad authored by Nick Kralevich's avatar Nick Kralevich Committed by Android Git Automerger
Browse files

am 787bdb33: Merge "Fix Externally reported security issue"

* commit '787bdb33':
  Fix Externally reported security issue
parents 24a5a7c3 787bdb33
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");