Loading core/java/android/net/InterfaceConfiguration.java +8 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,14 @@ public class InterfaceConfiguration implements Parcelable { mFlags.add(FLAG_DOWN); } /** * Set flags so that no changes will be made to the up/down status. */ public void ignoreInterfaceUpDownStatus() { mFlags.remove(FLAG_UP); mFlags.remove(FLAG_DOWN); } public LinkAddress getLinkAddress() { return mAddr; } Loading services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java +10 −3 Original line number Diff line number Diff line Loading @@ -136,11 +136,18 @@ public class TetherInterfaceStateMachine extends StateMachine { if (ifcg != null) { InetAddress addr = NetworkUtils.numericToInetAddress(ipAsString); ifcg.setLinkAddress(new LinkAddress(addr, prefixLen)); if (mInterfaceType == ConnectivityManager.TETHERING_WIFI) { // The WiFi stack has ownership of the interface up/down state. // It is unclear whether the bluetooth or USB stacks will manage their own // state. ifcg.ignoreInterfaceUpDownStatus(); } else { if (enabled) { ifcg.setInterfaceUp(); } else { ifcg.setInterfaceDown(); } } ifcg.clearFlag("running"); mNMService.setInterfaceConfig(mIfaceName, ifcg); } Loading Loading
core/java/android/net/InterfaceConfiguration.java +8 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,14 @@ public class InterfaceConfiguration implements Parcelable { mFlags.add(FLAG_DOWN); } /** * Set flags so that no changes will be made to the up/down status. */ public void ignoreInterfaceUpDownStatus() { mFlags.remove(FLAG_UP); mFlags.remove(FLAG_DOWN); } public LinkAddress getLinkAddress() { return mAddr; } Loading
services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java +10 −3 Original line number Diff line number Diff line Loading @@ -136,11 +136,18 @@ public class TetherInterfaceStateMachine extends StateMachine { if (ifcg != null) { InetAddress addr = NetworkUtils.numericToInetAddress(ipAsString); ifcg.setLinkAddress(new LinkAddress(addr, prefixLen)); if (mInterfaceType == ConnectivityManager.TETHERING_WIFI) { // The WiFi stack has ownership of the interface up/down state. // It is unclear whether the bluetooth or USB stacks will manage their own // state. ifcg.ignoreInterfaceUpDownStatus(); } else { if (enabled) { ifcg.setInterfaceUp(); } else { ifcg.setInterfaceDown(); } } ifcg.clearFlag("running"); mNMService.setInterfaceConfig(mIfaceName, ifcg); } Loading