From 9807816e094d716336a6061bff26521630082308 Mon Sep 17 00:00:00 2001 From: Milim Lee Date: Tue, 26 May 2020 03:11:29 +0900 Subject: [PATCH] Let only Ethernet manage ethernet interface up and down When LAN link is changed for using ethernet interface from Ethernet tethering to Ethernet, there is confiict as Ethernet Tethering is trying to make ethernet link down and Ethernet is trying to make ethernet link up. So, this would make Ethernet only manage ethernet interface link state. Test: manual Bug: 130840861 Change-Id: I1cd40ae764bdeecbb59e3889e9399b7f4b05f9cc --- Tethering/src/android/net/ip/IpServer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tethering/src/android/net/ip/IpServer.java b/Tethering/src/android/net/ip/IpServer.java index 1671dda4bd..4cc35b42d9 100644 --- a/Tethering/src/android/net/ip/IpServer.java +++ b/Tethering/src/android/net/ip/IpServer.java @@ -615,8 +615,9 @@ public class IpServer extends StateMachine { final Boolean setIfaceUp; if (mInterfaceType == TetheringManager.TETHERING_WIFI - || mInterfaceType == TetheringManager.TETHERING_WIFI_P2P) { - // The WiFi stack has ownership of the interface up/down state. + || mInterfaceType == TetheringManager.TETHERING_WIFI_P2P + || mInterfaceType == TetheringManager.TETHERING_ETHERNET) { + // The WiFi and Ethernet stack has ownership of the interface up/down state. // It is unclear whether the Bluetooth or USB stacks will manage their own // state. setIfaceUp = null;