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

Commit bddb75c0 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Check if calling uid is system uid for setAllowedPolicyCapture." into...

Merge "Check if calling uid is system uid for setAllowedPolicyCapture." into qt-qpr1-dev am: a6544e3b

Change-Id: If4e8fa84fb74f2b966b6c8bf39870f2faa9b4d76
parents e26f9703 a6544e3b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1346,7 +1346,8 @@ status_t BnAudioPolicyService::onTransact(
        case GET_OFFLOAD_FORMATS_A2DP:
        case LIST_AUDIO_VOLUME_GROUPS:
        case GET_VOLUME_GROUP_FOR_ATTRIBUTES:
        case SET_RTT_ENABLED: {
        case SET_RTT_ENABLED:
        case SET_ALLOWED_CAPTURE_POLICY: {
            if (!isServiceUid(IPCThreadState::self()->getCallingUid())) {
                ALOGW("%s: transaction %d received from PID %d unauthorized UID %d",
                      __func__, code, IPCThreadState::self()->getCallingPid(),
+0 −5
Original line number Diff line number Diff line
@@ -976,11 +976,6 @@ status_t AudioPolicyService::setAllowedCapturePolicy(uid_t uid, audio_flags_mask
        ALOGV("%s() mAudioPolicyManager == NULL", __func__);
        return NO_INIT;
    }
    uint_t callingUid = IPCThreadState::self()->getCallingUid();
    if (uid != callingUid) {
        ALOGD("%s() uid invalid %d != %d", __func__, uid, callingUid);
        return PERMISSION_DENIED;
    }
    return mAudioPolicyManager->setAllowedCapturePolicy(uid, capturePolicy);
}