diff options
| author | Nadav Bar <nadavbar@google.com> | 2020-03-05 11:58:52 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-05 11:58:52 +0000 |
| commit | a6544e3bf7de17f104d5fb509d6cb7f6d90dc79f (patch) | |
| tree | ee479d8aad59e8b6e78e83a789c187fe41798ecd | |
| parent | 06b7522331a2ba20ee63aabee21c29ecc7287394 (diff) | |
| parent | 56d4183046837973efe9daa210edb9444d97dfd4 (diff) | |
| download | frameworks_av-a6544e3bf7de17f104d5fb509d6cb7f6d90dc79f.tar.gz frameworks_av-a6544e3bf7de17f104d5fb509d6cb7f6d90dc79f.tar.bz2 frameworks_av-a6544e3bf7de17f104d5fb509d6cb7f6d90dc79f.zip | |
Merge "Check if calling uid is system uid for setAllowedPolicyCapture." into qt-qpr1-dev
| -rw-r--r-- | media/libaudioclient/IAudioPolicyService.cpp | 3 | ||||
| -rw-r--r-- | services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/media/libaudioclient/IAudioPolicyService.cpp b/media/libaudioclient/IAudioPolicyService.cpp index 64f0aca6cd..2fb9491a06 100644 --- a/media/libaudioclient/IAudioPolicyService.cpp +++ b/media/libaudioclient/IAudioPolicyService.cpp @@ -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(), diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp index fa8da8916e..20e1c9e8ba 100644 --- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp +++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp @@ -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); } |
