Ejemplo n.º 1
0
  private void interfaceAdded(String iface) {
    if (!iface.matches(sIfaceMatch)) return;

    Log.d(TAG, "Adding " + iface);

    synchronized (mIface) {
      if (!mIface.isEmpty()) return;
      mIface = iface;
    }

    mNetworkInfo.setIsAvailable(true);
    Message msg = mCsHandler.obtainMessage(EVENT_CONFIGURATION_CHANGED, mNetworkInfo);
    msg.sendToTarget();

    runDhcp();
  }
Ejemplo n.º 2
0
 /** Re-enable connectivity to a network after a {@link #teardown()}. */
 public boolean reconnect() {
   mTeardownRequested.set(false);
   runDhcp();
   return true;
 }