e3bcbc0ec7b874a1cbe2ea422ab06df35017d3a2
This commit changes agentConnect to set the owner UID as the mOwnerUid field instead of the Binder.getCallingUid(). Binder.getCallingUid() can return incorrect results for platform VPNs, as agentConnect() is called under a clean calling UID. Additionally, this relaxes the ownerUid sanitization check to allow a VPN network's owner to see it's own ownership information. Vpn.mOwnerUid is guaranteed to be correct, as all VPNs MUST have called prepareInternal() at some previous point, which sets mOwnerUid as the package's UID (or SYSTEM_UID if this is legacy VPN). Bug: 150135470 Test: CTS tests showing ownership information Change-Id: Ic979dad73983d722365849fbfb0becfd432b894c
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%