diff options
author | Robert Greenwalt <robdroid@android.com> | 2011-09-14 13:41:10 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-14 13:41:10 -0700 |
commit | 11fed2b218eae1ea94e7c1055a49562efef87a90 (patch) | |
tree | fc0d1681cb60013467f647960da364a3021ea733 /telephony/tests | |
parent | e5847ada7bdf99386dc13471a7d4f08bf779531b (diff) | |
parent | 723facc20b6545b7ac4e65883be096d517fb3c10 (diff) | |
download | frameworks_base-11fed2b218eae1ea94e7c1055a49562efef87a90.zip frameworks_base-11fed2b218eae1ea94e7c1055a49562efef87a90.tar.gz frameworks_base-11fed2b218eae1ea94e7c1055a49562efef87a90.tar.bz2 |
Merge "Add OTADM feature for Verizon requirement. - GsmDataConnectionTracker.java <in function createApnList> : modify parameter type for new ApnSetting. (carrierEnabled has changed to boolean from integer, BEARER has changed to integer from string). <in function createAllApnList> : modify telephony db query statement using carrierEnabled. (carrier_enabled: 1 enable apn, 0: disabled apn) <in function buildWaitingApns> : modify apn management code when current RAT (radio access technology) is LTE or EHRPD. add internal function named needToCheckApnBearer to check current RAT is LTE or EHRPD. - ApnSetting.java : add two member variable (carrierEnabled: apn enable/disable , bearer : Radio Access Technology) - Telephony.java : add two static string CARRIER_ENABLED & BEARER. - ApnSettingTest.java : add two assertEquals in function assertApnSettingEqual. add CARRIER_ENABLED & BEARER parameters."
Diffstat (limited to 'telephony/tests')
-rwxr-xr-x[-rw-r--r--] | telephony/tests/telephonytests/src/com/android/internal/telephony/ApnSettingTest.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/telephony/tests/telephonytests/src/com/android/internal/telephony/ApnSettingTest.java b/telephony/tests/telephonytests/src/com/android/internal/telephony/ApnSettingTest.java index 1032074..ac8c4c1 100644..100755 --- a/telephony/tests/telephonytests/src/com/android/internal/telephony/ApnSettingTest.java +++ b/telephony/tests/telephonytests/src/com/android/internal/telephony/ApnSettingTest.java @@ -44,6 +44,8 @@ public class ApnSettingTest extends TestCase { for (i = 0; i < a1.types.length; i++) { assertEquals(a1.types[i], a2.types[i]); } + assertEquals(a1.carrierEnabled, a2.carrierEnabled); + assertEquals(a1.bearer, a2.bearer); } @SmallTest @@ -58,21 +60,21 @@ public class ApnSettingTest extends TestCase { testString = "Vodafone IT,web.omnitel.it,,,,,,,,,222,10,,DUN"; expected_apn = new ApnSetting( -1, "22210", "Vodafone IT", "web.omnitel.it", "", "", - "", "", "", "", "", 0, dunTypes, "IP", "IP"); + "", "", "", "", "", 0, dunTypes, "IP", "IP",true,0); assertApnSettingEqual(expected_apn, ApnSetting.fromString(testString)); // A v2 string. - testString = "[ApnSettingV2] Name,apn,,,,,,,,,123,45,,mms|*,IPV6,IP"; + testString = "[ApnSettingV2] Name,apn,,,,,,,,,123,45,,mms|*,IPV6,IP,true,14"; expected_apn = new ApnSetting( -1, "12345", "Name", "apn", "", "", - "", "", "", "", "", 0, mmsTypes, "IPV6", "IP"); + "", "", "", "", "", 0, mmsTypes, "IPV6", "IP",true,14); assertApnSettingEqual(expected_apn, ApnSetting.fromString(testString)); // A v2 string with spaces. - testString = "[ApnSettingV2] Name,apn, ,,,,,,,,123,45,,mms|*,IPV4V6, IP"; + testString = "[ApnSettingV2] Name,apn, ,,,,,,,,123,45,,mms|*,IPV4V6, IP,true,14"; expected_apn = new ApnSetting( -1, "12345", "Name", "apn", "", "", - "", "", "", "", "", 0, mmsTypes, "IPV4V6", "IP"); + "", "", "", "", "", 0, mmsTypes, "IPV4V6", "IP",true,14); assertApnSettingEqual(expected_apn, ApnSetting.fromString(testString)); // Return null if insufficient fields given. @@ -83,11 +85,11 @@ public class ApnSettingTest extends TestCase { assertEquals(null, ApnSetting.fromString(testString)); // Parse (incorrect) V2 format without the tag as V1. - testString = "Name,apn,,,,,,,,,123, 45,,mms|*,IPV6"; + testString = "Name,apn,,,,,,,,,123, 45,,mms|*,IPV6,true,14"; String[] incorrectTypes = {"mms|*", "IPV6"}; expected_apn = new ApnSetting( -1, "12345", "Name", "apn", "", "", - "", "", "", "", "", 0, incorrectTypes, "IP", "IP"); + "", "", "", "", "", 0, incorrectTypes, "IP", "IP",true,14); assertApnSettingEqual(expected_apn, ApnSetting.fromString(testString)); } @@ -98,11 +100,10 @@ public class ApnSettingTest extends TestCase { ApnSetting apn = new ApnSetting( 99, "12345", "Name", "apn", "proxy", "port", "mmsc", "mmsproxy", "mmsport", "user", "password", 0, - types, "IPV4V6", "IP"); + types, "IPV4V6", "IP", true, 14); String expected = "[ApnSettingV2] Name, 99, 12345, apn, proxy, " + "mmsc, mmsproxy, mmsport, port, 0, default | *, " + - "IPV4V6, IP"; + "IPV4V6, IP, true, 14"; assertEquals(expected, apn.toString()); } } - |