Loading services/core/java/com/android/server/connectivity/Tethering.java +8 −1 Original line number Diff line number Diff line Loading @@ -261,6 +261,13 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering return (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); } private boolean isIpv6TetheringEnabled() { int ipv6TetheringEnable = Settings.Global.getInt(mContext.getContentResolver(), "enable_aosp_v6_tethering", 0); return ipv6TetheringEnable == 1; } void updateConfiguration() { String[] tetherableUsbRegexs = mContext.getResources().getStringArray( com.android.internal.R.array.config_tether_usb_regexs); Loading Loading @@ -2178,7 +2185,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering private void trackNewTetherableInterface(String iface, int interfaceType) { TetherState tetherState; tetherState = new TetherState(new TetherInterfaceStateMachine(iface, mLooper, interfaceType, mNMService, mStatsService, this)); interfaceType, mNMService, mStatsService, this, isIpv6TetheringEnabled())); mTetherStates.put(iface, tetherState); tetherState.mStateMachine.start(); } Loading services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java +9 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class TetherInterfaceStateMachine extends StateMachine { private final String mIfaceName; private final int mInterfaceType; private final IPv6TetheringInterfaceServices mIPv6TetherSvc; private boolean mIpv6TetheringEnabled; private int mLastError; private String mMyUpstreamIfaceName; // may change over time Loading @@ -102,6 +103,7 @@ public class TetherInterfaceStateMachine extends StateMachine { mIfaceName = ifaceName; mInterfaceType = interfaceType; mIPv6TetherSvc = new IPv6TetheringInterfaceServices(mIfaceName, mNMService); mIpv6TetheringEnabled = false; mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR; mInitialState = new InitialState(); Loading @@ -114,6 +116,12 @@ public class TetherInterfaceStateMachine extends StateMachine { setInitialState(mInitialState); } public TetherInterfaceStateMachine(String ifaceName, Looper looper, int interfaceType, INetworkManagementService nMService, INetworkStatsService statsService, IControlsTethering tetherController,boolean Ipv6TetheringEnabled) { this(ifaceName,looper,interfaceType,nMService,statsService,tetherController); mIpv6TetheringEnabled = Ipv6TetheringEnabled; } public int interfaceType() { return mInterfaceType; } Loading Loading @@ -214,7 +222,7 @@ public class TetherInterfaceStateMachine extends StateMachine { return; } if (!mIPv6TetherSvc.start()) { if (mIpv6TetheringEnabled && !mIPv6TetherSvc.start()) { Log.e(TAG, "Failed to start IPv6TetheringInterfaceServices"); } Loading Loading
services/core/java/com/android/server/connectivity/Tethering.java +8 −1 Original line number Diff line number Diff line Loading @@ -261,6 +261,13 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering return (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); } private boolean isIpv6TetheringEnabled() { int ipv6TetheringEnable = Settings.Global.getInt(mContext.getContentResolver(), "enable_aosp_v6_tethering", 0); return ipv6TetheringEnable == 1; } void updateConfiguration() { String[] tetherableUsbRegexs = mContext.getResources().getStringArray( com.android.internal.R.array.config_tether_usb_regexs); Loading Loading @@ -2178,7 +2185,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering private void trackNewTetherableInterface(String iface, int interfaceType) { TetherState tetherState; tetherState = new TetherState(new TetherInterfaceStateMachine(iface, mLooper, interfaceType, mNMService, mStatsService, this)); interfaceType, mNMService, mStatsService, this, isIpv6TetheringEnabled())); mTetherStates.put(iface, tetherState); tetherState.mStateMachine.start(); } Loading
services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java +9 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class TetherInterfaceStateMachine extends StateMachine { private final String mIfaceName; private final int mInterfaceType; private final IPv6TetheringInterfaceServices mIPv6TetherSvc; private boolean mIpv6TetheringEnabled; private int mLastError; private String mMyUpstreamIfaceName; // may change over time Loading @@ -102,6 +103,7 @@ public class TetherInterfaceStateMachine extends StateMachine { mIfaceName = ifaceName; mInterfaceType = interfaceType; mIPv6TetherSvc = new IPv6TetheringInterfaceServices(mIfaceName, mNMService); mIpv6TetheringEnabled = false; mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR; mInitialState = new InitialState(); Loading @@ -114,6 +116,12 @@ public class TetherInterfaceStateMachine extends StateMachine { setInitialState(mInitialState); } public TetherInterfaceStateMachine(String ifaceName, Looper looper, int interfaceType, INetworkManagementService nMService, INetworkStatsService statsService, IControlsTethering tetherController,boolean Ipv6TetheringEnabled) { this(ifaceName,looper,interfaceType,nMService,statsService,tetherController); mIpv6TetheringEnabled = Ipv6TetheringEnabled; } public int interfaceType() { return mInterfaceType; } Loading Loading @@ -214,7 +222,7 @@ public class TetherInterfaceStateMachine extends StateMachine { return; } if (!mIPv6TetherSvc.start()) { if (mIpv6TetheringEnabled && !mIPv6TetherSvc.start()) { Log.e(TAG, "Failed to start IPv6TetheringInterfaceServices"); } Loading