Make StatusBar display all default networks.
The basic principle is: if an app's traffic could possibly go over a network without the app using the multinetwork APIs (hence "by default"), then the status bar should show that network's connectivity. In the normal case, app traffic only goes over the system's default network connection, so that's the only network returned. With a VPN in force, some app traffic may go into the VPN, and thus over whatever underlying networks the VPN specifies, while other app traffic may go over the system default network (e.g.: a split-tunnel VPN, or an app disallowed by the VPN), so the set of networks returned includes the VPN's underlying networks and the system default. Specifically: 1. Add a NETWORK_CAPABILITY_VALIDATED bit to NetworkCapabilities. 2. Add a hidden API to retrieve the NetworkCapabilities of all default networks for a given macro-user. 3. Modify the status bar code that used getActiveNetworkInfo to determine which network was active, and make it consider all validated networks instead. 4. Because the set of active networks depends on which VPN app the user is running, make the status bar re-evaluate the networking situation when the active user changes. Bug: 17460017 Change-Id: Ie4965f35fb5936b088e6060ee06e362c22297ab2
Loading
Please register or sign in to comment