java – DetailedState. VERIFYING_ POOR_ What does link stand for

In juice, the enumeration detailedstate adds a new state named

/** Link has poor connectivity. */
        VERIFYING_POOR_LINK

But what is the state's position?

After searching the entire item, I found this:

WifiStateMachine. Subclass verifyinglinkstate in Java

class VerifyingLinkState extends State {
    @Override
    public void enter() {
        if (DBG) log(getName() + "\n");
        EventLog.writeEvent(EVENTLOG_WIFI_STATE_CHANGED,getName());
        setNetworkDetailedState(DetailedState.VERIFYING_POOR_LINK);
        mWifiConfigStore.updateStatus(mLastNetworkId,DetailedState.VERIFYING_POOR_LINK);
        sendNetworkStateChangeBroadcast(mLastBssid);
    }
    @Override
    public boolean processMessage(Message message) {
        switch (message.what) {
            case WifiWatchdogStateMachine.POOR_LINK_DETECTED:
                //stay here
                break;
            case WifiWatchdogStateMachine.GOOD_LINK_DETECTED:
                try {
                    mNwService.enableIpv6(mInterfaceName);
                } catch (remoteexception re) {
                    loge("Failed to enable IPv6: " + re);
                } catch (IllegalStateException e) {
                    loge("Failed to enable IPv6: " + e);
                }

                setNetworkDetailedState(DetailedState.CONNECTED);
                mWifiConfigStore.updateStatus(mLastNetworkId,DetailedState.CONNECTED);
                sendNetworkStateChangeBroadcast(mLastBssid);
                transitionTo(mConnectedState);
                break;
            default:
                return NOT_HANDLED;
        }
        return HANDLED;
    }
}

When verifying the link state, in the enter () function, it sets detailedstate to

DetailedState.VERIFYING_POOR_LINK

When the connection is really good, this will cause users to be confused by the status message shown in the figure below

Although this message only stays for a while, it is quickly replaced with "connected" But what is the goal of this state? If I don't set detailedstate to verifying in the enter() function_ POOR_ Link, what are the risks

Solution

Verifying some Samsung devices_ POOR_ Link is part of the Wi Fi intelligent network switch, which allows mobile data to remain connected through Wi Fi in case of poor conditions For Samsung devices, when you see the detailed status, please go from connected to verifying_ POOR_ LINK.

Most logic can be in: http://androidxref.com/4.3_r2.1/xref/frameworks/base/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java Found in

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>