Remove InterfaceState and Role @IntDef from TetheredSettings.

@InterfaceState and @Role won't be exposed as module-lib APIs from
EthernetManager after migration, which are not visible for Settings
code, remove them as well.

Bug: 210586283
Test: m Settings
Change-Id: I49f0e8401681e66d6f5853c8eb3205fcef803c25
This commit is contained in:
Xiao Ma
2022-03-04 06:09:33 +00:00
parent d915b09e21
commit bb0a8f2523

View File

@@ -34,8 +34,6 @@ import android.content.IntentFilter;
import android.hardware.usb.UsbManager;
import android.net.ConnectivityManager;
import android.net.EthernetManager;
import android.net.EthernetManager.InterfaceState;
import android.net.EthernetManager.Role;
import android.net.IpConfiguration;
import android.net.TetheringManager;
import android.net.wifi.WifiManager;
@@ -650,8 +648,8 @@ public class TetherSettings extends RestrictedSettingsFragment
}
private final class EthernetListener implements EthernetManager.InterfaceStateListener {
public void onInterfaceStateChanged(@NonNull String iface, @InterfaceState int state,
@Role int role, @NonNull IpConfiguration configuration) {
public void onInterfaceStateChanged(@NonNull String iface, int state, int role,
@NonNull IpConfiguration configuration) {
if (state == EthernetManager.STATE_LINK_UP) {
mAvailableInterfaces.add(iface);
} else {