From 97bb33f58d742539f3382583d7978fca71ffa2d5 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Fri, 12 Dec 2014 16:23:43 -0800 Subject: Fix permission check for audio recording Define input types covering the different usecases for audio recording, and check the corresponding permissions when starting to record. Move the permission check from audio flinger to audio policy, as only the policy has the information to determine which permission to enforce. Fix missing permission when an application records audio and the audio is injected by an external policy. Bug 18736417 Change-Id: If7ec040502242c990ac8ea464db484339bdce573 --- services/audioflinger/AudioFlinger.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'services/audioflinger/AudioFlinger.cpp') diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 8acfc07..ccc05a1 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -1433,13 +1433,6 @@ sp AudioFlinger::openRecord( goto Exit; } - if (deviceRequiresCaptureAudioOutputPermission(thread->inDevice()) - && !captureAudioOutputAllowed()) { - ALOGE("openRecord() permission denied: capture not allowed"); - lStatus = PERMISSION_DENIED; - goto Exit; - } - pid_t pid = IPCThreadState::self()->getCallingPid(); client = registerPid(pid); -- cgit v1.1