Deprecate NetworkInfo
Currently NetworkInfo is used by Apps to get information of network. However, to get such information, Apps need to poll NetworkInfo frequently from ConnectivityService. In order to increase the stability and reduce the maintain effort, all functionalities provided by NetworkInfo are targeted to be replaced or removed entirely. Apps should use ConnectivityManager.NetworkCallback instead, to get faster and more detailed updates from connectivity changes. Or, apps could use getNetworkCapabilities or getLinkProperties to get information synchronously, but should not mix the callbacks and synchronous methods together. Bug: 113629330 Test: atest FrameworksNetTests Change-Id: Ie8faf620958c3fa0a4a2f233b35b825de0e99ffc
Loading
Please register or sign in to comment