am 6158038a: Merge change I2811f162 into eclair

Merge commit '6158038a09069bc178970160d4b3667573bfc655' into eclair-mr2

* commit '6158038a09069bc178970160d4b3667573bfc655':
  Add Authentication Type field to the APN settings.
This commit is contained in:
Jaikumar Ganesh
2009-10-28 10:30:11 -07:00
committed by Android Git Automerger
4 changed files with 13 additions and 5 deletions

View File

@ -1669,6 +1669,8 @@ public final class Telephony {
public static final String NUMERIC = "numeric";
public static final String AUTH_TYPE = "authtype";
public static final String TYPE = "type";
public static final String CURRENT = "current";

View File

@ -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);
}

View File

@ -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());

View File

@ -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 :
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),