summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2009-10-26 13:11:55 -0700
committerJaikumar Ganesh <jaikumar@google.com>2009-10-26 13:11:55 -0700
commit2811f1625ebdb7f7483b8b866694474f89112d8c (patch)
tree23df2dcdc15ab95d7941e63cf32da3a5f81170f8 /telephony
parentf702f1f33fb5490854579a1f5ce61c70ea7fd768 (diff)
downloadframeworks_base-2811f1625ebdb7f7483b8b866694474f89112d8c.zip
frameworks_base-2811f1625ebdb7f7483b8b866694474f89112d8c.tar.gz
frameworks_base-2811f1625ebdb7f7483b8b866694474f89112d8c.tar.bz2
Add Authentication Type field to the APN settings.
Use auth type to setup data connection. This value defaults to -1 (unset) to maintain compatibility. When the value is -1, the auth type gets set to 0 (if no user is specified) or 3. Bug: 181700
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/ApnSetting.java7
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java1
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/PdpConnection.java8
3 files changed, 11 insertions, 5 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/ApnSetting.java b/telephony/java/com/android/internal/telephony/gsm/ApnSetting.java
index dc6f92d..8d807fd 100644
--- a/telephony/java/com/android/internal/telephony/gsm/ApnSetting.java
+++ b/telephony/java/com/android/internal/telephony/gsm/ApnSetting.java
@@ -31,6 +31,7 @@ public class ApnSetting {
String mmsPort;
String user;
String password;
+ int authType;
String[] types;
int id;
String numeric;
@@ -38,7 +39,7 @@ public class ApnSetting {
ApnSetting(int id, String numeric, String carrier, String apn, String proxy, String port,
String mmsc, String mmsProxy, String mmsPort,
- String user, String password, String[] types) {
+ String user, String password, int authType, String[] types) {
this.id = id;
this.numeric = numeric;
this.carrier = carrier;
@@ -50,6 +51,7 @@ public class ApnSetting {
this.mmsPort = mmsPort;
this.user = user;
this.password = password;
+ this.authType = authType;
this.types = types;
}
@@ -63,7 +65,8 @@ public class ApnSetting {
.append(", ").append(mmsc)
.append(", ").append(mmsProxy)
.append(", ").append(mmsPort)
- .append(", ").append(port);
+ .append(", ").append(port)
+ .append(", ").append(authType);
for (String t : types) {
sb.append(", ").append(t);
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index ffd6dd3..d014a7e 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -556,6 +556,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPORT)),
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.USER)),
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PASSWORD)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.AUTH_TYPE)),
types);
result.add(apn);
} while (cursor.moveToNext());
diff --git a/telephony/java/com/android/internal/telephony/gsm/PdpConnection.java b/telephony/java/com/android/internal/telephony/gsm/PdpConnection.java
index 224419e..cb85002 100644
--- a/telephony/java/com/android/internal/telephony/gsm/PdpConnection.java
+++ b/telephony/java/com/android/internal/telephony/gsm/PdpConnection.java
@@ -84,9 +84,11 @@ public class PdpConnection extends DataConnection {
lastFailCause = FailCause.NONE;
receivedDisconnectReq = false;
- int authType = (apn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP :
- RILConstants.SETUP_DATA_AUTH_NONE;
-
+ int authType = apn.authType;
+ if (authType == -1) {
+ authType = (apn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP :
+ RILConstants.SETUP_DATA_AUTH_NONE;
+ }
phone.mCM.setupDataCall(Integer.toString(RILConstants.SETUP_DATA_TECH_GSM),
Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), apn.apn, apn.user,
apn.password, Integer.toString(authType),