android NetworkMonitor和ConnectivityService记录

编程入门 行业动态 更新时间:2024-10-10 03:26:29

<a href=https://www.elefans.com/category/jswz/34/1771384.html style=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记录

本文发布于:2023-11-17 11:50:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642790.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:android   NetworkMonitor   ConnectivityService

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!