From ff317e73efb28c08305154d482503e4dd40d446e Mon Sep 17 00:00:00 2001 From: Patrick Rohr Date: Thu, 5 Jun 2025 14:47:19 -0700 Subject: [PATCH] Pass EthernetPort to updateInterfaceState Test: TH Flag: EXEMPT mainline Bug: 1000001 Change-Id: Id0c9cc4fd054f4e7096e0bf45ee3ffb5a9085698 --- .../src/com/android/server/ethernet/EthernetTracker.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service-t/src/com/android/server/ethernet/EthernetTracker.java b/service-t/src/com/android/server/ethernet/EthernetTracker.java index aeabc30780..419a09bfaf 100644 --- a/service-t/src/com/android/server/ethernet/EthernetTracker.java +++ b/service-t/src/com/android/server/ethernet/EthernetTracker.java @@ -233,7 +233,7 @@ public class EthernetTracker { maybeTrackInterface(port); } Log.i(TAG, "interfaceLinkStateChanged: " + port + ", up: " + linkUp); - updateInterfaceState(ifname, linkUp); + updateInterfaceState(port, linkUp); } private void onDelLink(EthernetPort port) { @@ -736,7 +736,8 @@ public class EthernetTracker { cb.onResult(iface); } - private void updateInterfaceState(String iface, boolean up) { + private void updateInterfaceState(EthernetPort port, boolean up) { + final String iface = port.getInterfaceName(); final int mode = getInterfaceMode(iface); if (mode == INTERFACE_MODE_SERVER) { // TODO: support tracking link state for interfaces in server mode.