Pass EthernetPort to stopTrackingInterface

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Ia96d35041cbfedb3fd4f67d43bb7238bfdd86d40
This commit is contained in:
Patrick Rohr 2025-06-05 14:11:17 -07:00
commit 88fdbf3093

View file

@ -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;