soundtrigger: require RECORD_AUDIO permission for DSP hotword
Check android.permission.RECORD_AUDIO permission in addition to
android.permission.CAPTURE_AUDIO_HOTWORD for DSP hotword operations
as those require access to device microphone.
Bug: 62265680
Test: check "OK Google" detection with and without DSP
Change-Id: Icba2520331164bcd618e91916ca701e677d419b8
diff --git a/services/audioflinger/ServiceUtilities.h b/services/audioflinger/ServiceUtilities.h
index 8b1bc00..04cb9cd 100644
--- a/services/audioflinger/ServiceUtilities.h
+++ b/services/audioflinger/ServiceUtilities.h
@@ -22,7 +22,7 @@
bool isTrustedCallingUid(uid_t uid);
bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid);
bool captureAudioOutputAllowed(pid_t pid, uid_t uid);
-bool captureHotwordAllowed();
+bool captureHotwordAllowed(pid_t pid, uid_t uid);
bool settingsAllowed();
bool modifyAudioRoutingAllowed();
bool dumpAllowed();