Lines Matching refs:uid
42 const String16& opPackageName, uid_t uid) { in resolveCallingPackage() argument
54 permissionController.getPackagesForUid(uid, packages); in resolveCallingPackage()
56 ALOGE("No packages for uid %d", uid); in resolveCallingPackage()
63 uid_t uid, bool start) { in checkRecordingInternal() argument
69 if (isAudioServerOrSystemServerOrRootUid(uid)) return true; in checkRecordingInternal()
75 const bool ok = permissionController.checkPermission(sAndroidPermissionRecordAudio, pid, uid); in checkRecordingInternal()
82 permissionController, opPackageName, uid); in checkRecordingInternal()
90 if (appOps.startOpNoThrow(op, uid, resolvedOpPackageName, /*startIfModeDefault*/ false) in checkRecordingInternal()
96 if (appOps.checkOp(op, uid, resolvedOpPackageName) != AppOpsManager::MODE_ALLOWED) { in checkRecordingInternal()
105 bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid) { in recordingAllowed() argument
106 return checkRecordingInternal(opPackageName, pid, uid, /*start*/ false); in recordingAllowed()
109 bool startRecording(const String16& opPackageName, pid_t pid, uid_t uid) { in startRecording() argument
110 return checkRecordingInternal(opPackageName, pid, uid, /*start*/ true); in startRecording()
113 void finishRecording(const String16& opPackageName, uid_t uid) { in finishRecording() argument
116 if (isAudioServerOrRootUid(uid)) return; in finishRecording()
120 permissionController, opPackageName, uid); in finishRecording()
127 appOps.finishOp(op, uid, resolvedOpPackageName); in finishRecording()
130 bool captureAudioOutputAllowed(pid_t pid, uid_t uid) { in captureAudioOutputAllowed() argument
131 if (isAudioServerOrRootUid(uid)) return true; in captureAudioOutputAllowed()
133 bool ok = PermissionCache::checkPermission(sCaptureAudioOutput, pid, uid); in captureAudioOutputAllowed()
138 bool captureMediaOutputAllowed(pid_t pid, uid_t uid) { in captureMediaOutputAllowed() argument
139 if (isAudioServerOrRootUid(uid)) return true; in captureMediaOutputAllowed()
141 bool ok = PermissionCache::checkPermission(sCaptureMediaOutput, pid, uid); in captureMediaOutputAllowed()
146 bool captureHotwordAllowed(const String16& opPackageName, pid_t pid, uid_t uid) { in captureHotwordAllowed() argument
148 bool ok = recordingAllowed(opPackageName, pid, uid); in captureHotwordAllowed()
153 ok = PermissionCache::checkPermission(sCaptureHotwordAllowed, pid, uid); in captureHotwordAllowed()
181 bool modifyDefaultAudioEffectsAllowed(pid_t pid, uid_t uid) { in modifyDefaultAudioEffectsAllowed() argument
187 bool ok = PermissionCache::checkPermission(sModifyDefaultAudioEffectsAllowed, pid, uid); in modifyDefaultAudioEffectsAllowed()
189 __func__, uid); in modifyDefaultAudioEffectsAllowed()
202 bool modifyPhoneStateAllowed(pid_t pid, uid_t uid) { in modifyPhoneStateAllowed() argument
203 bool ok = PermissionCache::checkPermission(sModifyPhoneState, pid, uid); in modifyPhoneStateAllowed()
209 bool bypassInterruptionPolicyAllowed(pid_t pid, uid_t uid) { in bypassInterruptionPolicyAllowed() argument
211 bool ok = PermissionCache::checkPermission(sModifyPhoneState, pid, uid) in bypassInterruptionPolicyAllowed()
212 || PermissionCache::checkPermission(sWriteSecureSettings, pid, uid) in bypassInterruptionPolicyAllowed()
213 || PermissionCache::checkPermission(sModifyAudioRouting, pid, uid); in bypassInterruptionPolicyAllowed()
258 std::optional<bool> MediaPackageManager::doIsAllowed(uid_t uid) { in doIsAllowed() argument
269 auto status = mPackageManager->getNamesForUids({(int32_t)uid}, &packageNames); in doIsAllowed()
272 "retrieved from the package manager: %s", __func__, uid, status.toString8().c_str()); in doIsAllowed()
277 "from the package manager: %s", __func__, uid, status.toString8().c_str()); in doIsAllowed()
284 "retrieved from the package manager: %s", __func__, uid, status.toString8().c_str()); in doIsAllowed()
289 " response size: %zu != %zu", __func__, uid, packageNames.size(), isAllowed.size()); in doIsAllowed()
294 Packages& packages = mDebugLog[uid]; in doIsAllowed()