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

Commit f4a28339 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check voice call recording permission according to source." into pi-dev

parents ff5ab067 744be48d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -342,6 +342,13 @@ status_t AudioPolicyService::getInputForAttr(const audio_attributes_t *attr,
        return PERMISSION_DENIED;
    }

    if ((attr->source == AUDIO_SOURCE_VOICE_UPLINK ||
        attr->source == AUDIO_SOURCE_VOICE_DOWNLINK ||
        attr->source == AUDIO_SOURCE_VOICE_CALL) &&
        !captureAudioOutputAllowed(pid, uid)) {
        return PERMISSION_DENIED;
    }

    if ((attr->source == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed(pid, uid)) {
        return BAD_VALUE;
    }