From 17f43ced836679b405c8a477c1ea21b0abd03d3d Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Fri, 4 Jul 2025 21:34:32 +0900 Subject: [PATCH] Update ethernetlegacycode to take and ignore the listener flags. The legacy ethernet code did not understand the flags parameter. Just ignore it; the only things the flags can do is ask the callbacks to report new interface types like NCM which the legacy code doesn't support anyway. Test: None Flag: EXEMPT refactor Change-Id: I8e78f0fb202ccbe38548f60d4e33b3ec12c77f84 --- .../com/android/server/ethernetlegacy/EthernetServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service-t/src/com/android/server/ethernetlegacy/EthernetServiceImpl.java b/service-t/src/com/android/server/ethernetlegacy/EthernetServiceImpl.java index dd0729bd2e..30ab22d2c2 100644 --- a/service-t/src/com/android/server/ethernetlegacy/EthernetServiceImpl.java +++ b/service-t/src/com/android/server/ethernetlegacy/EthernetServiceImpl.java @@ -144,8 +144,9 @@ public class EthernetServiceImpl extends IEthernetManager.Stub { /** * Adds a listener. * @param listener A {@link IEthernetServiceListener} to add. + * @param unused Ignored because the legacy code does not support listener flags. */ - public void addListener(IEthernetServiceListener listener) throws RemoteException { + public void addListener(IEthernetServiceListener listener, int unused) throws RemoteException { Objects.requireNonNull(listener, "listener must not be null"); PermissionUtils.enforceAccessNetworkStatePermission(mContext, TAG); mTracker.addListener(listener, hasUseRestrictedNetworksPermission());