diff options
author | jianzhou <jianzhou@codeaurora.org> | 2015-11-04 14:00:11 +0800 |
---|---|---|
committer | jianzhou <jianzhou@codeaurora.org> | 2015-11-04 16:34:17 +0800 |
commit | 07c620a49326fe94ee19d3eb92dba416bae05421 (patch) | |
tree | 1e6ded70e795f1ec98e55d25cc0d70d738c559e0 | |
parent | 31632b5326af6ebf58e75feae7802cfc5322e856 (diff) | |
download | packages_apps_Settings-07c620a49326fe94ee19d3eb92dba416bae05421.zip packages_apps_Settings-07c620a49326fe94ee19d3eb92dba416bae05421.tar.gz packages_apps_Settings-07c620a49326fe94ee19d3eb92dba416bae05421.tar.bz2 |
Settings: Set the default protocol as "PROTOCOL_IPV4V6" when created
Set the default protocol as "IPV4V6" when created, take it as a
common requirement.
Change-Id: I3564c499a1a8898c1b9b13a7ef631a51e02c4457
-rw-r--r-- | src/com/android/settings/ApnEditor.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/settings/ApnEditor.java b/src/com/android/settings/ApnEditor.java index 013d754..a131510 100644 --- a/src/com/android/settings/ApnEditor.java +++ b/src/com/android/settings/ApnEditor.java @@ -60,6 +60,8 @@ public class ApnEditor extends InstrumentedPreferenceActivity private final static String KEY_BEARER_MULTI = "bearer_multi"; private final static String KEY_MVNO_TYPE = "mvno_type"; + private final static String PROTOCOL_IPV4V6= "IPV4V6"; + private static final int MENU_DELETE = Menu.FIRST; private static final int MENU_SAVE = Menu.FIRST + 1; private static final int MENU_CANCEL = Menu.FIRST + 2; @@ -216,7 +218,10 @@ public class ApnEditor extends InstrumentedPreferenceActivity mUri = intent.getData(); } else if (action.equals(Intent.ACTION_INSERT)) { if (mFirstTime || icicle.getInt(SAVED_POS) == 0) { - mUri = getContentResolver().insert(intent.getData(), new ContentValues()); + ContentValues values = new ContentValues(); + values.put(Telephony.Carriers.PROTOCOL, PROTOCOL_IPV4V6); + values.put(Telephony.Carriers.ROAMING_PROTOCOL, PROTOCOL_IPV4V6); + mUri = getContentResolver().insert(intent.getData(), values); } else { mUri = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, icicle.getInt(SAVED_POS)); |