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

Commit 5cd1f1d9 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

startAudioSource should be created using the calling uid

Bug: 128850122
Test: dumpsys media.audio_policy
Change-Id: I374b528164bbe3168a5a0c730b34dc07b5694b40
parent 32ebca36
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1127,9 +1127,10 @@ status_t AudioPolicyService::startAudioSource(const struct audio_port_config *so
    if (mAudioPolicyManager == NULL) {
        return NO_INIT;
    }
    // startAudioSource should be created as the calling uid
    const uid_t callingUid = IPCThreadState::self()->getCallingUid();
    AutoCallerClear acc;
    return mAudioPolicyManager->startAudioSource(source, attributes, portId,
                                                 IPCThreadState::self()->getCallingUid());
    return mAudioPolicyManager->startAudioSource(source, attributes, portId, callingUid);
}

status_t AudioPolicyService::stopAudioSource(audio_port_handle_t portId)