fix: Use permission check for contact URI validation
Changed the validation logic in onActivityResult for contact data.
Instead of comparing user IDs, the code now verifies if the caller
has explicit read permission for the returned URI using
checkContentUriPermission.
This ensures proper access control based on granted permissions.
Throws SecurityException on denial for better error reporting.
Flag: EXEMPT security fix
Bug: 337785563
Test: manual - steps for manual test
1. remove sim
2. sign into personal/test acct
3. create a pin for the personal acct
4. create a work profile via adb cmd
5. add pin for work profile
6. add a work profile contact
7. open PoC app
Change-Id: Ic5634fdc08c817a8ddac9eee7310d808782e2c08
(cherry picked from commit 9eb57535ecb11f271ace6e138b84594474a6e244)
1 file changed