audio policy: protect capture from telephony RX path.

Add permission check if the capture device selected is telephony
RX path.

Bug: 23017158.
Change-Id: Iaa34d836e6cf46b7cbbf2483fcd4306dcd27ce90
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
index 65639c3..793c26a 100644
--- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
+++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
@@ -303,6 +303,8 @@
             switch (inputType) {
             case AudioPolicyInterface::API_INPUT_LEGACY:
                 break;
+            case AudioPolicyInterface::API_INPUT_TELEPHONY_RX:
+                // FIXME: use the same permission as for remote submix for now.
             case AudioPolicyInterface::API_INPUT_MIX_CAPTURE:
                 if (!captureAudioOutputAllowed()) {
                     ALOGE("getInputForAttr() permission denied: capture not allowed");