ethernet: remove support for default interface ip config
Support for default IpConfiguration was removed from EthernetConfigStore
in change Ifb82a5d7fa13d17ea8fd3a42a19cd020cb95e26a. This code has since
been a noop.
Test: atest EthernetTracker
Bug: 236280707
Change-Id: I6b9a2fa1af5f6ab7454d523d28daf4ee383d3560
diff --git a/service-t/src/com/android/server/ethernet/EthernetConfigStore.java b/service-t/src/com/android/server/ethernet/EthernetConfigStore.java
index e4445d0..17abbab 100644
--- a/service-t/src/com/android/server/ethernet/EthernetConfigStore.java
+++ b/service-t/src/com/android/server/ethernet/EthernetConfigStore.java
@@ -18,7 +18,6 @@
import static com.android.net.module.util.DeviceConfigUtils.TETHERING_MODULE_NAME;
-import android.annotation.Nullable;
import android.content.ApexEnvironment;
import android.net.IpConfiguration;
import android.os.Environment;
@@ -47,7 +46,6 @@
private IpConfigStore mStore = new IpConfigStore();
private final ArrayMap<String, IpConfiguration> mIpConfigurations;
- private IpConfiguration mIpConfigurationForDefaultInterface;
private final Object mSync = new Object();
public EthernetConfigStore() {
@@ -144,9 +142,4 @@
return new ArrayMap<>(mIpConfigurations);
}
}
-
- @Nullable
- public IpConfiguration getIpConfigurationForDefaultInterface() {
- return null;
- }
}
diff --git a/service-t/src/com/android/server/ethernet/EthernetTracker.java b/service-t/src/com/android/server/ethernet/EthernetTracker.java
index 97d7cbf..7f353a3 100644
--- a/service-t/src/com/android/server/ethernet/EthernetTracker.java
+++ b/service-t/src/com/android/server/ethernet/EthernetTracker.java
@@ -134,7 +134,6 @@
private int mTetheringInterfaceMode = INTERFACE_MODE_CLIENT;
// Tracks whether clients were notified that the tethered interface is available
private boolean mTetheredInterfaceWasAvailable = false;
- private volatile IpConfiguration mIpConfigForDefaultInterface;
private int mEthernetState = ETHERNET_STATE_ENABLED;
@@ -255,8 +254,6 @@
mFactory.register();
mConfigStore.read();
- // Default interface is just the first one we want to track.
- mIpConfigForDefaultInterface = mConfigStore.getIpConfigurationForDefaultInterface();
final ArrayMap<String, IpConfiguration> configs = mConfigStore.getIpConfigurations();
for (int i = 0; i < configs.size(); i++) {
mIpConfigurations.put(configs.keyAt(i), configs.valueAt(i));
@@ -670,11 +667,6 @@
mTetheringInterface = iface;
}
- if (mIpConfigForDefaultInterface != null) {
- updateIpConfiguration(iface, mIpConfigForDefaultInterface);
- mIpConfigForDefaultInterface = null;
- }
-
addInterface(iface);
broadcastInterfaceStateChange(iface);