Merge "Make setupDataCall take a protocol parameter." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
6987036fab
@@ -1350,11 +1350,15 @@ public interface CommandsInterface {
|
|||||||
* the password for APN, or NULL
|
* the password for APN, or NULL
|
||||||
* @param authType
|
* @param authType
|
||||||
* the PAP / CHAP auth type. Values is one of SETUP_DATA_AUTH_*
|
* the PAP / CHAP auth type. Values is one of SETUP_DATA_AUTH_*
|
||||||
|
* @param protocol
|
||||||
|
* one of the PDP_type values in TS 27.007 section 10.1.1.
|
||||||
|
* For example, "IP", "IPV6", "IPV4V6", or "PPP".
|
||||||
* @param result
|
* @param result
|
||||||
* Callback message
|
* Callback message
|
||||||
*/
|
*/
|
||||||
public void setupDataCall(String radioTechnology, String profile, String apn,
|
public void setupDataCall(String radioTechnology, String profile,
|
||||||
String user, String password, String authType, Message result);
|
String apn, String user, String password, String authType,
|
||||||
|
String protocol, Message result);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deactivate packet data connection
|
* Deactivate packet data connection
|
||||||
|
|||||||
@@ -1309,7 +1309,8 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
: RILConstants.SETUP_DATA_AUTH_NONE;
|
: RILConstants.SETUP_DATA_AUTH_NONE;
|
||||||
|
|
||||||
setupDataCall(Integer.toString(radioTechnology), profile, apn, user,
|
setupDataCall(Integer.toString(radioTechnology), profile, apn, user,
|
||||||
password, Integer.toString(authType), result);
|
password, Integer.toString(authType),
|
||||||
|
RILConstants.SETUP_DATA_PROTOCOL_IP, result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1321,18 +1322,14 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
deactivateDataCall(cid, result);
|
deactivateDataCall(cid, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The preferred new alternative to setupDefaultPDP that is
|
|
||||||
* CDMA-compatible.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public void
|
public void
|
||||||
setupDataCall(String radioTechnology, String profile, String apn,
|
setupDataCall(String radioTechnology, String profile, String apn,
|
||||||
String user, String password, String authType, Message result) {
|
String user, String password, String authType, String protocol,
|
||||||
|
Message result) {
|
||||||
RILRequest rr
|
RILRequest rr
|
||||||
= RILRequest.obtain(RIL_REQUEST_SETUP_DATA_CALL, result);
|
= RILRequest.obtain(RIL_REQUEST_SETUP_DATA_CALL, result);
|
||||||
|
|
||||||
rr.mp.writeInt(6);
|
rr.mp.writeInt(7);
|
||||||
|
|
||||||
rr.mp.writeString(radioTechnology);
|
rr.mp.writeString(radioTechnology);
|
||||||
rr.mp.writeString(profile);
|
rr.mp.writeString(profile);
|
||||||
@@ -1340,11 +1337,12 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
rr.mp.writeString(user);
|
rr.mp.writeString(user);
|
||||||
rr.mp.writeString(password);
|
rr.mp.writeString(password);
|
||||||
rr.mp.writeString(authType);
|
rr.mp.writeString(authType);
|
||||||
|
rr.mp.writeString(protocol);
|
||||||
|
|
||||||
if (RILJ_LOGD) riljLog(rr.serialString() + "> "
|
if (RILJ_LOGD) riljLog(rr.serialString() + "> "
|
||||||
+ requestToString(rr.mRequest) + " " + radioTechnology + " "
|
+ requestToString(rr.mRequest) + " " + radioTechnology + " "
|
||||||
+ profile + " " + apn + " " + user + " "
|
+ profile + " " + apn + " " + user + " "
|
||||||
+ password + " " + authType);
|
+ password + " " + authType + " " + protocol);
|
||||||
|
|
||||||
send(rr);
|
send(rr);
|
||||||
}
|
}
|
||||||
@@ -2963,7 +2961,11 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
dataCall.active = p.readInt();
|
dataCall.active = p.readInt();
|
||||||
dataCall.type = p.readString();
|
dataCall.type = p.readString();
|
||||||
dataCall.apn = p.readString();
|
dataCall.apn = p.readString();
|
||||||
dataCall.address = p.readString();
|
String address = p.readString();
|
||||||
|
if (address != null) {
|
||||||
|
address = address.split(" ")[0];
|
||||||
|
}
|
||||||
|
dataCall.address = address;
|
||||||
|
|
||||||
response.add(dataCall);
|
response.add(dataCall);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,11 +91,16 @@ public interface RILConstants {
|
|||||||
/* Setup a packet data connection. See ril.h RIL_REQUEST_SETUP_DATA_CALL */
|
/* Setup a packet data connection. See ril.h RIL_REQUEST_SETUP_DATA_CALL */
|
||||||
int SETUP_DATA_TECH_CDMA = 0;
|
int SETUP_DATA_TECH_CDMA = 0;
|
||||||
int SETUP_DATA_TECH_GSM = 1;
|
int SETUP_DATA_TECH_GSM = 1;
|
||||||
|
|
||||||
int SETUP_DATA_AUTH_NONE = 0;
|
int SETUP_DATA_AUTH_NONE = 0;
|
||||||
int SETUP_DATA_AUTH_PAP = 1;
|
int SETUP_DATA_AUTH_PAP = 1;
|
||||||
int SETUP_DATA_AUTH_CHAP = 2;
|
int SETUP_DATA_AUTH_CHAP = 2;
|
||||||
int SETUP_DATA_AUTH_PAP_CHAP = 3;
|
int SETUP_DATA_AUTH_PAP_CHAP = 3;
|
||||||
|
|
||||||
|
String SETUP_DATA_PROTOCOL_IP = "IP";
|
||||||
|
String SETUP_DATA_PROTOCOL_IPV6 = "IPV6";
|
||||||
|
String SETUP_DATA_PROTOCOL_IPV4V6 = "IPV4V6";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
cat include/telephony/ril.h | \
|
cat include/telephony/ril.h | \
|
||||||
egrep '^#define' | \
|
egrep '^#define' | \
|
||||||
|
|||||||
@@ -85,9 +85,12 @@ public class CdmaDataConnection extends DataConnection {
|
|||||||
// msg.obj will be returned in AsyncResult.userObj;
|
// msg.obj will be returned in AsyncResult.userObj;
|
||||||
Message msg = obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE, cp);
|
Message msg = obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE, cp);
|
||||||
msg.obj = cp;
|
msg.obj = cp;
|
||||||
phone.mCM.setupDataCall(Integer.toString(RILConstants.SETUP_DATA_TECH_CDMA),
|
phone.mCM.setupDataCall(
|
||||||
Integer.toString(dataProfile), null, null,
|
Integer.toString(RILConstants.SETUP_DATA_TECH_CDMA),
|
||||||
null, Integer.toString(RILConstants.SETUP_DATA_AUTH_PAP_CHAP), msg);
|
Integer.toString(dataProfile),
|
||||||
|
null, null, null,
|
||||||
|
Integer.toString(RILConstants.SETUP_DATA_AUTH_PAP_CHAP),
|
||||||
|
RILConstants.SETUP_DATA_PROTOCOL_IP, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -104,9 +104,11 @@ public class GsmDataConnection extends DataConnection {
|
|||||||
authType = (apn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP :
|
authType = (apn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP :
|
||||||
RILConstants.SETUP_DATA_AUTH_NONE;
|
RILConstants.SETUP_DATA_AUTH_NONE;
|
||||||
}
|
}
|
||||||
phone.mCM.setupDataCall(Integer.toString(RILConstants.SETUP_DATA_TECH_GSM),
|
phone.mCM.setupDataCall(
|
||||||
Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), apn.apn, apn.user,
|
Integer.toString(RILConstants.SETUP_DATA_TECH_GSM),
|
||||||
apn.password, Integer.toString(authType), msg);
|
Integer.toString(RILConstants.DATA_PROFILE_DEFAULT),
|
||||||
|
apn.apn, apn.user, apn.password, Integer.toString(authType),
|
||||||
|
RILConstants.SETUP_DATA_PROTOCOL_IP, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ class SipCommandInterface extends BaseCommands implements CommandsInterface {
|
|||||||
|
|
||||||
public void setupDataCall(String radioTechnology, String profile,
|
public void setupDataCall(String radioTechnology, String profile,
|
||||||
String apn, String user, String password, String authType,
|
String apn, String user, String password, String authType,
|
||||||
Message result) {
|
String protcol, Message result) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deactivateDataCall(int cid, Message result) {
|
public void deactivateDataCall(int cid, Message result) {
|
||||||
|
|||||||
@@ -960,8 +960,9 @@ public final class SimulatedCommands extends BaseCommands
|
|||||||
unimplemented(result);
|
unimplemented(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setupDataCall(String radioTechnology, String profile, String apn, String user,
|
public void setupDataCall(String radioTechnology, String profile,
|
||||||
String password, String authType, Message result) {
|
String apn, String user, String password, String authType,
|
||||||
|
String protocol, Message result) {
|
||||||
unimplemented(result);
|
unimplemented(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user