ethernet: rename getInterfaces to getClientModeInterfaces
getInterfaces is a wrapper around EthernetTracker#getAvailableInterfaces
which only returns interfaces currently in client mode. Having this
function named getInterfaces() is confusing.
Test: TH
Bug: 269004812
Change-Id: Iaaaab5e4bed840e7ec101df87575ca1a14eac3a3
diff --git a/service-t/src/com/android/server/ethernet/EthernetServiceImpl.java b/service-t/src/com/android/server/ethernet/EthernetServiceImpl.java
index f6a55c8..e7af569 100644
--- a/service-t/src/com/android/server/ethernet/EthernetServiceImpl.java
+++ b/service-t/src/com/android/server/ethernet/EthernetServiceImpl.java
@@ -92,7 +92,7 @@
@Override
public String[] getAvailableInterfaces() throws RemoteException {
PermissionUtils.enforceAccessNetworkStatePermission(mContext, TAG);
- return mTracker.getInterfaces(checkUseRestrictedNetworksPermission());
+ return mTracker.getClientModeInterfaces(checkUseRestrictedNetworksPermission());
}
/**
diff --git a/service-t/src/com/android/server/ethernet/EthernetTracker.java b/service-t/src/com/android/server/ethernet/EthernetTracker.java
index 852cf42..bb08cf3 100644
--- a/service-t/src/com/android/server/ethernet/EthernetTracker.java
+++ b/service-t/src/com/android/server/ethernet/EthernetTracker.java
@@ -385,7 +385,7 @@
return mFactory.hasInterface(iface);
}
- String[] getInterfaces(boolean includeRestricted) {
+ String[] getClientModeInterfaces(boolean includeRestricted) {
return mFactory.getAvailableInterfaces(includeRestricted);
}
@@ -428,7 +428,7 @@
// Remote process has already died
return;
}
- for (String iface : getInterfaces(canUseRestrictedNetworks)) {
+ for (String iface : getClientModeInterfaces(canUseRestrictedNetworks)) {
unicastInterfaceStateChange(listener, iface);
}