admin 管理员组

文章数量: 887016

[DESCRIPTION]  Android7.0版本信号格上偶尔显示感叹号,参考下图红框处。       [SOLUTION] 这是Android7.0上才会出现的现象   原因是因为应用会调用ConnectivityManager.reportNetworkConnectivity()方法去检查网络连接 (从目前遇到状况来看都是GMS应用发起的,如下面的UID 10013) 11-10 14:20:35.284912   920   935 I am_pss  : [21026,10013,com.google.android.gms,17689600,11747328,240640]   11-10 14:20:35.209009   920  4643 D NetworkMonitor/NetworkAgentInfo [MOBILE (HSPA+) - 100]: Forcing reevaluation for UID 10013 11-10 14:20:35.257828 327 21390 D libc-netbsd: res_queryN name = captive.apple succeed
11-10 14:20:35.259380 920 4643 D NetworkMonitor/NetworkAgentInfo [MOBILE (HSPA+) - 100]: PROBE_DNS OK 50ms, captive.apple=104.100.98.138 11-10 14:20:35.762046   920  4643 D NetworkMonitor/NetworkAgentInfo [MOBILE (HSPA+) - 100]: PROBE_HTTP http://captive.apple/generate_204 time=502ms ret=200 headers={null=[HTTP/1.1 200 OK], Connection=[close], Content-Length=[68], Content-Type=[text/html], Date=[Thu, 10 Nov 2016 06:20:36 GMT], X-Android-Received-Millis=[1478758835761], X-Android-Response-Source=[NETWORK 200], X-Android-Selected-Protocol=[http/1.1], X-Android-Sent-Millis=[1478758835481]}   Android7.0默认连接server:captive.apple 正常状态下连接这个server正常(参考下图)   状态栏拿到的inetCondition值为1,则不会显示感叹号 11-10 14:20:59.546099 21081 21182 D NetworkController.MobileSignalController(1): mCurrentState.inetCondition = 1   当连接captive.apple出现异常时,比如如下状况 11-10 14:36:51.740333 920 4643 D NetworkMonitor/NetworkAgentInfo [MOBILE (HSPA) - 100]: Forcing reevaluation for UID 10013
11-10 14:36:51.758350 920 4643 D NetworkMonitor/NetworkAgentInfo [MOBILE (HSPA) - 100]: PROBE_DNS OK 18ms, captive.apple=23.66.236.14
11-10 14:37:01.777573 920 4643 D NetworkMonitor/NetworkAgentInfo [MOBILE (HSPA) - 100]: Probably not a portal: exception java.SocketTimeoutException: connect timed out
11-10 14:37:01.778654 920 1531 D ConnectivityService: NetworkAgentInfo [MOBILE (HSPA) - 100] validation failed   net log看到的状况是连接23.66.236.14这个地址connection timeout   这种情况下就会导致状态栏拿到的mCurrentState.inetCondition为0,将显示感叹号。 11-10 14:37:01.793066 22688 22733 D NetworkController.MobileSignalController(1): mCurrentState.inetCondition = 0   如果贵司不希望显示感叹号,可以参考如下方法修改:   如果需要分析感叹号出现的原因,则需要完整的Mtlog来分析跟captive.apple的连接状况。  

本文标签: 感叹号 状态栏 信号