Replace ConnectivityManager.isNetworkTypeMobile usage in NSS
ConnectivityManager is a part of connectivity mainline. The hidden methods dependency in ConnectivityManager should be removed to make it a moudle. NSS use isNetworkTypeMobile to check if the NetworkState belongs to a cellular network or not. It should be replaced by the NetworkCapabilities inside the NetworkState. The result of isNetworkTypeMobile relies on the legacy network type. The legacy network type comes from the network type of its network info. The replacement should consider VPN active case because the network type will not be TYPE_MOBILE. Thus, replace it with Networkcapabilities.getDisplayTransport() to get a transport that can be used to classify a network when displaying its info to users, i.e. it will return TRANSPORT_VPN for a vpn network on cellular network. Bug: 172183305 Test: atest FrameworksNetTests Change-Id: I2132a7288a93e4430cbd9efabc33ae56ce8bdd9b
Loading
Please register or sign in to comment