+1
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Change captureAudioOutputAllowed to check client pid. Check calling uid with AID_AUDIOSERVER instead of calling pid with own pid. This is consistent, and works if AudioFlinger and AudioPolicyManager exist as different processes. Remove getpid_cached since getpid() is very fast. This removes any initialization issues. Replace getuid() with AID_AUDIOSERVER to remove ambiguity of multiple native audio services for multiple users. Only one exists regardless of users. Do not use multiuser UID checks for certain native services that do not spawn for multiple users to prevent accidently exposure. Move permission checks to use ServiceUtilities for control and consistency. Rename isTrustedCallingUid to isAudioServerOrMediaServerUid so that permission check is explicitly known to caller. Update MediaLogService to use ServiceUtilities. Test: Basic sanity Test: AudioTrackTest, AudioRecordTest, SoundPool, SoundTrigger Bug: 79485140 Change-Id: Ib8ccb36929a9b4806c01626f32fa023a046d6020