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(); }
/** Re-enable connectivity to a network after a {@link #teardown()}. */ public boolean reconnect() { mTeardownRequested.set(false); runDhcp(); return true; }