Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ff1c6735 authored by lucaslin's avatar lucaslin Committed by Android Build Coastguard Worker
Browse files

Skip sending VpnManager events for Settings VPNs

This change early-exits from the sendEventToVpnManagerApp()
method if the profile was not a VPN app.

Otherwise the sendEventToVpnManagerApp() will call
getRedactedNetworkCapabilities() which will call
AppOpsManager#checkPackage() eventually.
And AppOpsManager#checkPackage() will check if the given package
is the same as the given uid. In this case, VPN sends
"[Legacy VPN]" as the package and sends 1000 as the uid, but
there is no package named "[Legacy VPN], so the SecurityException
is thrown.

Bug: 236315805
Test: atest FrameworksNetTests:VpnTest
Change-Id: I486398111106b1a9551fb29f92ba7b4fe85f68c1
Merged-In: I486398111106b1a9551fb29f92ba7b4fe85f68c1
Merged-In: I228f62a5e09017dbf985a614f2e42434238a220c
(cherry picked from commit a7ec0cbe)
Merged-In: I486398111106b1a9551fb29f92ba7b4fe85f68c1
parent f600ab43
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment