예제 #1
0
    public void interfaceLinkStateChanged(String iface, boolean up) {
      if (mIface.equals(iface) && mLinkUp != up) {
        Log.d(TAG, "Interface " + iface + " link " + (up ? "up" : "down"));
        mLinkUp = up;

        // use DHCP
        if (up) {
          mTracker.reconnect();
        } else {
          NetworkUtils.stopDhcp(mIface);
          mTracker.mNetworkInfo.setIsAvailable(false);
          mTracker.mNetworkInfo.setDetailedState(DetailedState.DISCONNECTED, null, null);
        }
      }
    }
예제 #2
0
 public void interfaceRemoved(String iface) {
   mTracker.interfaceRemoved(iface);
 }
예제 #3
0
 public void interfaceAdded(String iface) {
   mTracker.interfaceAdded(iface);
 }