Update URI permission granting logic in Intent Redirection Hardening

Updating the Intent URI Grant Permission logic to require explicit authorization from both callingUid and the intentCreatorUid.
Only if both parties are successfully authorized does the system proceed to use the caller's intent grants to access the requested URI. This maintains compatibility with the pre-hardening workflow as well.


For more detailed, please refer go/intent-redirection-2.

Bug: 477024345
Test: Manually test exploit app won't work
Flag: EXEMPT BUGFIX
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:73db64658dd35ab3ef781fc73983f1ee694111f0
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:0160b0a69e16852212b2cf19111d998781982e7c
Merged-In: Ica84e8733595bd2dced557bade0811feacbded19
Change-Id: Ica84e8733595bd2dced557bade0811feacbded19
3 files changed