Only grant visibility to result reciever
This change modifies which package is made visible to the receiving end
of a startForResult call. Prior to this change it was the callingUid,
which, in the case of startActivityForResult was typically the same as
the recipient of the result (or the return of getCallingPackage()). It
didn't account for forwarded results or startIntentSenderForResult.
Instead, we now look up the uid of the resultTo ActivityRecord and grant
the recipient of the intent access to it.
Bug: 149810887
Test: atest AppEnumerationTests
Change-Id: I331db9e75ca70635da589d3620d8723668d26b60
1 file changed