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
This commit is contained in:
Lorenzo Colitti 2025-07-04 21:34:32 +09:00
commit 17f43ced83

View file

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