Add permission checks to MediaQualityService
Missing permission checks in MediaQualityService Binder methods allowed unprivileged applications to read signature-gated TYPE_SYSTEM picture and sound profiles. This could leak sensitive device configuration parameters and unique UUIDs.
This commit adds MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE and MANAGE_GLOBAL_SOUND_QUALITY_SERVICE permission checks (via `hasGlobalPictureQualityServicePermission` and `hasGlobalSoundQualityServicePermission`) to several Binder methods in `MediaQualityService`. If an unauthorized caller attempts to access these profiles, the service now logs an error, sends an error notification, and returns safe default values (such as an empty list, `-1`, or `null`) to prevent the information leak.
Bug: 514738573
Flag: EXEMPT BUGFIX
Test: gambit
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:1c17b529207936a1b41d5cece5772cd2f4db0245
Merged-In: Ic8d9f4472b4a1c114aa105491c4f7182e5c47de9
Change-Id: Ic8d9f4472b4a1c114aa105491c4f7182e5c47de9
1 file changed