Manage VPN legacy state separately from NetworkInfo
This is mainly a cleanup, but is also necessary for the network selection project. This is for network selection ultimately because NetworkSelection needs NetworkAgents to use the newer API introduced in R rather than the legacy internal API. Using that API forbids communicating to ConnectivityService through NetworkInfo, and does not support the FAILED state because there is no usage in connectivity. In VPN, FAILED is used only to communicate a state to Settings and it does this through IConnectivityManager.getLegacyVpnInfo, which already is using an int to communicate this information. Splitting the legacy state from NetworkInfo not only is simpler ultimately because it's the format in which it's consumed, but also will allow removing NetworkInfo completely. Test: FrameworksNetTests NetworkStackTests Bug: 167544279 Change-Id: I8b95e020919e38a5166892221096db6271985574
Loading
Please register or sign in to comment