Enforce permission in notifyPictureProfileHandleSelection
The `IMediaQualityManager.notifyPictureProfileHandleSelection` method lacked an authorization check against the global picture quality service permission. This vulnerability allowed any unprivileged app to bypass permission checks, send arbitrary picture profile parameters to the vendor display HAL, and alter the device-global picture pipeline state.
This commit fixes the issue by validating the caller's UID and PID via `hasGlobalPictureQualityServicePermission()`. If validation fails, an error is reported and the method terminates. Additionally, the database query, HAL tracking modification, and IPC notification are now wrapped in a `synchronized (mPictureProfileLock)` block to ensure thread safety and maintain state consistency in `MediaQualityService`.
Bug: 514738229
Flag: EXEMPT BUGFIX
Test: atest
This was autogenerated by MendIt (go/androidmendit)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:78aaddbc99cad2016d141e8ac75c678d9e33a1f5
Merged-In: Idf6389f4725027dfe8583abcca5b5338a92fd77e
Change-Id: Idf6389f4725027dfe8583abcca5b5338a92fd77e
1 file changed