Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
12
返回列表 发新帖
楼主: zangcf
打印 上一主题 下一主题

再次追踪RJ45插入流程

[复制链接]

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
11#
 楼主| 发表于 2016-4-11 22:00:56 | 只看该作者
本帖最后由 zangcf 于 2016-4-11 22:05 编辑

                case NetworkStateTracker.EVENT_CONFIGURATION_CHANGED:
                    info = (NetworkInfo) msg.obj;
                    // TODO: Temporary allowing network configuration
                    //       change not resetting sockets.
                    //       @see bug/4455071
                    handleConnectivityChange(info.getType(), false);
                    break;

=====================================
这句话怎么好像没有执行一样,没有log信息打印出来
=====================================
有在执行,打印出来如下信息:
D/zcfdebug ConnectivityService(  460): handleConnectivityChange: changed linkProperty[9]: doReset=false resetMask=0
D/zcfdebug ConnectivityService(  460):    curLp=null
D/zcfdebug ConnectivityService(  460):    newLp=LinkAddresses: [] Routes: [] DnsAddresses: []
D/zcfdebug ConnectivityService(  460): net Type is ConnectivityManager.TYPE_ETHERNET 9 Setting mGlobalProxy

回复 支持 反对

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
12#
 楼主| 发表于 2016-4-11 22:07:37 | 只看该作者
下面执行到?
                case NetworkStateTracker.EVENT_STATE_CHANGED:
                    log("zcfdebug handle EVENT_STATE_CHANGED message!");    //zcfdebug++

                    info = (NetworkInfo) msg.obj;
                    int type = info.getType();
                    NetworkInfo.State state = info.getState();

                    Xlog.e("zcfdebug", "The NetworkInfo.State state is "+ state);

                    if (VDBG || (state == NetworkInfo.State.CONNECTED) ||
                            (state == NetworkInfo.State.DISCONNECTED)) {
                        log("ConnectivityChange for " +
                            info.getTypeName() + ": " +
                            state + "/" + info.getDetailedState());
                    }

                    EventLogTags.writeConnectivityStateChanged(
                            info.getType(), info.getSubtype(), info.getDetailedState().ordinal());

                    if (info.getDetailedState() ==
                            NetworkInfo.DetailedState.FAILED) {
                        handleConnectionFailure(info);
                    } else if (info.getDetailedState() ==
                            DetailedState.CAPTIVE_PORTAL_CHECK) {
                        handleCaptivePortalTrackerCheck(info);
                    } else if (state == NetworkInfo.State.DISCONNECTED) {
                        handleDisconnect(info);
                    } else if (state == NetworkInfo.State.SUSPENDED) {
                        // TODO: need to think this over.
                        // the logic here is, handle SUSPENDED the same as
                        // DISCONNECTED. The only difference being we are
                        // broadcasting an intent with NetworkInfo that's
                        // suspended. This allows the applications an
                        // opportunity to handle DISCONNECTED and SUSPENDED
                        // differently, or not.
                        Slog.d(TAG, "Change to Suspend_State due to reason=" + info.getReason() + " with network=" + info.getSubtypeName()) ;
                        if (((info.getReason() != null) && info.getReason().equals(Phone.REASON_VOICE_CALL_STARTED))
                                && (info.getSubtype() == TelephonyManager.NETWORK_TYPE_GPRS
                                        || info.getSubtype() == TelephonyManager.NETWORK_TYPE_EDGE
                                        || info.getSubtype() == TelephonyManager.NETWORK_TYPE_UNKNOWN)) {
                            Xlog.e(MTK_TAG, "Suspend PS TX/RX Temporarily without deactivating PDP context");
                            sendSuspendedBroadcast(info);
                        } else {
                            Xlog.e(MTK_TAG, "Switch to Suspend:invoke handleDisconnect()");
                            handleDisconnect(info);
                        }
                    } else if (state == NetworkInfo.State.CONNECTED) {
                        handleConnect(info);
                    }
                    if (mLockdownTracker != null) {
                        mLockdownTracker.onNetworkInfoChanged(info);
                    }
                    break;
=================这个msg和上面的有什么差别呢?

回复 支持 反对

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
13#
 楼主| 发表于 2016-4-11 22:18:35 | 只看该作者
E/zcfdebug EthernetStateTracker(  460): Ethernet connect in EthernetStateTracker!
D/zcfdebug EthernetStateTracker(  460): Send Message to EVENT_STATE_CHANGED
V/ActivityManager(  460): Broadcast sticky: Intent { act=android.net.conn.TETHER_STATE_CHANGED flg=0x28000010 (has extras) } ordered=false userid=-1 callerApp=ProcessRecord{4146d450 460:system/1000}
D/zcfdebug ConnectivityService(  460): handleConnectivityChange: changed linkProperty[9]: doReset=false resetMask=0
D/zcfdebug ConnectivityService(  460):    curLp=null
D/zcfdebug ConnectivityService(  460):    newLp=LinkAddresses: [] Routes: [] DnsAddresses: []
D/zcfdebug ConnectivityService(  460): net Type is ConnectivityManager.TYPE_ETHERNET 9 Setting mGlobalProxy
D/zcfdebug ConnectivityService(  460): zcfdebug handle EVENT_STATE_CHANGED message!
E/zcfdebug(  460): The NetworkInfo.State state is CONNECTED
D/zcfdebug ConnectivityService(  460): ConnectivityChange for ETH: CONNECTED/CONNECTED
D/zcfdebug ConnectivityService(  460): zcfdebug in handleConnect!
D/zcfdebug ConnectivityService(  460): zcfdebug newNetType value is 9
D/zcfdebug ConnectivityService(  460): zcfdebug in mNetConfigs[newNetType].isDefault()
D/zcfdebug ConnectivityService(  460): zcfdebug ConnectivityService newNetType value is 9 mActiveDefaultNetwork = newNetType
D/zcfdebug ConnectivityService(  460): zcfdebug ConnectivityService mActiveDefaultNetwork is 9
D/zcfdebug ConnectivityService(  460): Setting TCP values: [4096,87380,524288,4096,16384,524288] which comes from [net.tcp.buffersize.default]
D/zcfdebug Tethering(  460): sendTetherStateChangedBroadcast 1, 0, 0
D/zcfdebug ConnectivityService(  460): MTU is only applied to mobile/MMS
D/zcfdebug Tethering(  460): Skip the state:0
D/zcfdebug Tethering(  460): we will broadcast rj45 plug in!
V/ActivityManager(  460): Broadcast sticky: Intent { act=android.hardware.rj45.action.PLUG_IN flg=0x10 } ordered=false userid=-1 callerApp=ProcessRecord{4146d450 460:system/1000}
D/BroadcastQueue(  460): BDC-Delivered broadcast: Intent { act=android.hardware.rj45.action.PLUG_IN flg=0x10 cmp=com.mediatek.oobe/.RJ45PlugInReceiver }, ordered=true, app=ProcessRecord{4126f338 748:com.mediatek.oobe/1000}, receiver=android.os.BinderProxy@4133e6c0
D/zcfdebug ConnectivityService(  460): handleConnectivityChange: changed linkProperty[9]: doReset=false resetMask=0
D/zcfdebug ConnectivityService(  460):    curLp=LinkAddresses: [] Routes: [] DnsAddresses: []
D/zcfdebug ConnectivityService(  460):    newLp=LinkAddresses: [] Routes: [] DnsAddresses: []
D/zcfdebug ConnectivityService(  460): handleConnectivityChange: address are the same reset per doReset linkProperty[9]: resetMask=0
D/zcfdebug ConnectivityService(  460): net Type is ConnectivityManager.TYPE_ETHERNET 9 Setting mGlobalProxy
V/Provider/Settings(  460):  from settings cache , name = connectivity_change_delay , value = null
D/zcfdebug ConnectivityService(  460): sendStickyBroadcast: action=android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE
V/ActivityManager(  460): Broadcast sticky: Intent { act=android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE flg=0x8000010 (has extras) } ordered=false userid=-1 callerApp=ProcessRecord{4146d450 460:system/1000}
D/zcfdebug ConnectivityService(  460): sendStickyBroadcastDelayed: delayMs=3000, action=android.net.conn.CONNECTIVITY_CHANGE
================
这个地方是有毛病的,好像执行了两次这个东西
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, 2025-12-16 02:47 , Processed in 0.012434 second(s), 6 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表