android NetworkMonitor和ConnectivityService记录"/>
android NetworkMonitor和ConnectivityService记录
一、NetworkMonitor
packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
网络上都叫网络可用性校验,在WIFI和数据(以太网切换中使用)
有多个状态机
方法:isCaptivePortal
11-03 12:01:17.885 2535 4681 D NetworkMonitor/100: isCaptivePortal: isSuccessful()=false isPortal()=false RedirectUrl=null isPartialConnectivity()=false Time=23029ms
类 EvaluationState下的reportEvaluationResult
父类下的notifyNetworkTested,会将校验结果发送给ConnectivityService
private final INetworkMonitorCallbacks mCallback;
private void notifyNetworkTested(NetworkTestResultParcelable result) {mCallback.notifyNetworkTested(getLegacyTestResult(result.result, result.probesSucceeded),result.redirectUrl);
}
更多推荐
android NetworkMonitor和ConnectivityService记录
发布评论