Use package name, pid, uid to check permission of capturing hotword.

Package name will be cached in ModuleClient when attaching a client. It
will be used when querying permission of capturing hotword.

Test: test with logging.
Bug: 74078996
Bug: 122721589
Change-Id: Icd2911f5d331d243c9eb5d58003ce5525c70c81e
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
index b2a2344..b8036bb 100644
--- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
+++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
@@ -385,7 +385,7 @@
         return PERMISSION_DENIED;
     }
 
-    bool canCaptureHotword = captureHotwordAllowed(pid, uid);
+    bool canCaptureHotword = captureHotwordAllowed(opPackageName, pid, uid);
     if ((attr->source == AUDIO_SOURCE_HOTWORD) && !canCaptureHotword) {
         return BAD_VALUE;
     }