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

Commit 4e4fd6dd authored by Michael Bestas's avatar Michael Bestas
Browse files

fixup! audioflinger: Fix audio for WifiDisplay

Required after 23f552f2

Change-Id: I716fb3290b1a3249c3b4fb896efb7954afe31fbb
parent 6f38b4dd
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -614,7 +614,8 @@ Status AudioPolicyService::getInputForAttr(const media::AudioAttributesInternal&
    // type is API_INPUT_MIX_EXT_POLICY_REROUTE and by AudioService if a media projection
    // is used and input type is API_INPUT_MIX_PUBLIC_CAPTURE_PLAYBACK
    // - ECHO_REFERENCE source is controlled by captureAudioOutputAllowed()
    if (!isAudioServerOrMediaServerUid(callingUid) && !(recordingAllowed(attributionSource, inputSource)
    if (!isAudioServerOrMediaServerUid(attributionSource.uid)
            && !(recordingAllowed(attributionSource, inputSource)
            || inputSource == AUDIO_SOURCE_FM_TUNER
            || inputSource == AUDIO_SOURCE_REMOTE_SUBMIX
            || inputSource == AUDIO_SOURCE_ECHO_REFERENCE)) {
@@ -695,7 +696,7 @@ Status AudioPolicyService::getInputForAttr(const media::AudioAttributesInternal&
                // FIXME: use the same permission as for remote submix for now.
                FALLTHROUGH_INTENDED;
            case AudioPolicyInterface::API_INPUT_MIX_CAPTURE:
                if (!isAudioServerOrMediaServerUid(callingUid) && !canCaptureOutput) {
                if (!isAudioServerOrMediaServerUid(attributionSource.uid) && !canCaptureOutput) {
                    ALOGE("%s permission denied: capture not allowed", __func__);
                    status = PERMISSION_DENIED;
                }
@@ -780,8 +781,8 @@ Status AudioPolicyService::startInput(int32_t portIdAidl)
    msg << "Audio recording on session " << client->session;

    // check calling permissions
    if (!isAudioServerOrMediaServerUid(IPCThreadState::self()->getCallingUid()) &&
            !(startRecording(client->attributionSource, String16(msg.str().c_str()),
    if (!isAudioServerOrMediaServerUid(client->attributionSource.uid)
            && !(startRecording(client->attributionSource, String16(msg.str().c_str()),
                         client->attributes.source)
            || client->attributes.source == AUDIO_SOURCE_FM_TUNER
            || client->attributes.source == AUDIO_SOURCE_REMOTE_SUBMIX