Pass EthernetPort to stopTrackingInterface
Test: TH Flag: EXEMPT mainline Bug: 1000001 Change-Id: Ia96d35041cbfedb3fd4f67d43bb7238bfdd86d40
This commit is contained in:
parent
92077d1530
commit
88fdbf3093
1 changed files with 4 additions and 3 deletions
|
|
@ -238,7 +238,7 @@ public class EthernetTracker {
|
|||
|
||||
private void onDelLink(EthernetPort port) {
|
||||
Log.i(TAG, "onInterfaceRemoved: " + port);
|
||||
stopTrackingInterface(port.getInterfaceName());
|
||||
stopTrackingInterface(port);
|
||||
}
|
||||
|
||||
private void processRtNetlinkLinkMessage(RtNetlinkLinkMessage msg) {
|
||||
|
|
@ -536,7 +536,7 @@ public class EthernetTracker {
|
|||
for (EthernetPort port : getAllInterfaces()) {
|
||||
final String iface = port.getInterfaceName();
|
||||
if (shouldTrackInterface(iface)) continue;
|
||||
stopTrackingInterface(iface);
|
||||
stopTrackingInterface(port);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -654,7 +654,8 @@ public class EthernetTracker {
|
|||
maybeUpdateServerModeInterfaceState(iface, false);
|
||||
}
|
||||
|
||||
private void stopTrackingInterface(String iface) {
|
||||
private void stopTrackingInterface(EthernetPort port) {
|
||||
final String iface = port.getInterfaceName();
|
||||
removeInterface(iface);
|
||||
if (mTetheringInterface != null && iface.equals(mTetheringInterface.getInterfaceName())) {
|
||||
mTetheringInterface = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue