Lines Matching refs:iface

176         // TODO - remove and rely on real notifications of the current iface
208 public void interfaceStatusChanged(String iface, boolean up) {
209 if (VDBG) Log.d(TAG, "interfaceStatusChanged " + iface + ", " + up);
213 if (isWifi(iface)) {
215 } else if (isUsb(iface)) {
218 } else if (isBluetooth(iface)) {
223 TetherInterfaceSM sm = mIfaces.get(iface);
226 sm = new TetherInterfaceSM(iface, mLooper, usb);
227 mIfaces.put(iface, sm);
231 if (isUsb(iface)) {
234 if (VDBG) Log.d(TAG, "ignore interface down for " + iface);
237 mIfaces.remove(iface);
243 public void interfaceLinkStateChanged(String iface, boolean up) {
244 if (VDBG) Log.d(TAG, "interfaceLinkStateChanged " + iface + ", " + up);
245 interfaceStatusChanged(iface, up);
248 private boolean isUsb(String iface) {
251 if (iface.matches(regex)) return true;
257 public boolean isWifi(String iface) {
260 if (iface.matches(regex)) return true;
266 public boolean isBluetooth(String iface) {
269 if (iface.matches(regex)) return true;
275 public void interfaceAdded(String iface) {
276 if (VDBG) Log.d(TAG, "interfaceAdded " + iface);
280 if (isWifi(iface)) {
283 if (isUsb(iface)) {
287 if (isBluetooth(iface)) {
291 if (VDBG) Log.d(TAG, iface + " is not a tetherable iface, ignoring");
295 TetherInterfaceSM sm = mIfaces.get(iface);
297 if (VDBG) Log.d(TAG, "active iface (" + iface + ") reported as added, ignoring");
300 sm = new TetherInterfaceSM(iface, mLooper, usb);
301 mIfaces.put(iface, sm);
306 public void interfaceRemoved(String iface) {
307 if (VDBG) Log.d(TAG, "interfaceRemoved " + iface);
309 TetherInterfaceSM sm = mIfaces.get(iface);
312 Log.e(TAG, "attempting to remove unknown iface (" + iface + "), ignoring");
317 mIfaces.remove(iface);
321 public void limitReached(String limitName, String iface) {}
325 public int tether(String iface) {
326 if (DBG) Log.d(TAG, "Tethering " + iface);
329 sm = mIfaces.get(iface);
332 Log.e(TAG, "Tried to Tether an unknown iface :" + iface + ", ignoring");
336 Log.e(TAG, "Tried to Tether an unavailable iface :" + iface + ", ignoring");
343 public int untether(String iface) {
344 if (DBG) Log.d(TAG, "Untethering " + iface);
347 sm = mIfaces.get(iface);
350 Log.e(TAG, "Tried to Untether an unknown iface :" + iface + ", ignoring");
354 Log.e(TAG, "Tried to Untethered an errored iface :" + iface + ", ignoring");
361 public int getLastTetherError(String iface) {
364 sm = mIfaces.get(iface);
366 Log.e(TAG, "Tried to getLastTetherError on an unknown iface :" + iface +
393 for (Object iface : ifaces) {
394 TetherInterfaceSM sm = mIfaces.get(iface);
397 erroredList.add((String)iface);
399 availableList.add((String)iface);
401 if (isUsb((String)iface)) {
403 } else if (isWifi((String)iface)) {
405 } else if (isBluetooth((String)iface)) {
408 activeList.add((String)iface);
532 for (String iface : ifaces) {
533 if (isUsb(iface)) {
534 int result = (enable ? tether(iface) : untether(iface));
555 for (String iface : ifaces) {
556 if (isUsb(iface)) {
559 ifcg = mNMService.getInterfaceConfig(iface);
569 mNMService.setInterfaceConfig(iface, ifcg);
572 Log.e(TAG, "Error configuring interface " + iface, e);
1289 String iface = null;
1295 Log.d(TAG, "chooseUpstreamType has upstream iface types:");
1348 iface = linkProperties.getInterfaceName();
1371 notifyTetheredOfNewUpstreamIface(iface);
1375 if (DBG) Log.d(TAG, "notifying tethered with iface =" + ifaceName);