ConnectivityManager: allow usage of TYPE_NONE
This patch allows to use TYPE_NONE for the legacy network type variable of NetworkInfo. This usage is "safe" with respect to legacy APIs using network types as most of them already returns null or do nothing for TYPE_NONE. Of the existing APIs in ConnectivityManager that accept a network type argument, those which were already returning null or doing nothing for TYPE_NONE are: getNetworkInfo(int) getNetworkForType(int) stopUsingNetworkFeature(int, String) networkCapabilitiesForType(int) requestRouteToHostAddress(int, InetAddress) reportInetCondition(int, int) isNetworkSupported(int) getLinkProperties(int) Only setProvisioningNotificationVisible needs an additional guard against TYPE_NONE. Bug: 30088447 Bug: 62844794 Test: runtest frameworks-net Change-Id: I4455f2726d06406047086368628c1f253d854d8d
Loading
Please register or sign in to comment