Created
November 5, 2013 10:20
-
-
Save iamben/7316882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /home/iamben/android/maguro.build/frameworks/base/services/java/com/android/server/ConnectivityService.java 2013-06-03 11:30:11.448177348 +0800 | |
+++ ConnectivityService.java 2013-06-03 11:29:49.018166056 +0800 | |
@@ -209,6 +209,10 @@ | |
private INetworkManagementService mNetd; | |
private INetworkPolicyManager mPolicyManager; | |
+ private static final int CMT_DISABLED = 0; | |
+ private static final int CMT_ENABLED = 1; | |
+ private int mCMTCapable = SystemProperties.getInt("persist.net.cmt", CMT_DISABLED); | |
+ | |
private static final int ENABLED = 1; | |
private static final int DISABLED = 0; | |
@@ -2008,8 +2012,11 @@ | |
// if this is a default net and other default is running | |
// kill the one not preferred | |
+ // additionally, if we are working in CMT mode | |
+ // then don't teardown anything | |
if (mNetConfigs[newNetType].isDefault()) { | |
- if (mActiveDefaultNetwork != -1 && mActiveDefaultNetwork != newNetType) { | |
+ if (mActiveDefaultNetwork != -1 && mActiveDefaultNetwork != newNetType | |
+ && mCMTCapable != CMT_ENABLED) { | |
if (isNewNetTypePreferredOverCurrentNetType(newNetType)) { | |
// tear down the other | |
NetworkStateTracker otherNet = |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment