diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2010-12-29 15:37:46 -0800 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2010-12-29 17:02:54 -0800 |
commit | 4eb40450720f6cc1ed07fa181b22677461fa96bd (patch) | |
tree | 30c1f5241b75513f41231f9450abfcd108fe5421 /telephony | |
parent | 303f38c4d36d9e51ce5c471b65fbd176ff05508f (diff) | |
download | frameworks_base-4eb40450720f6cc1ed07fa181b22677461fa96bd.zip frameworks_base-4eb40450720f6cc1ed07fa181b22677461fa96bd.tar.gz frameworks_base-4eb40450720f6cc1ed07fa181b22677461fa96bd.tar.bz2 |
Get rid of setupDataCallWithProtocol.
setupDataCallWithProtocol was introduced to introduce a
protocol parameter to setupDataCall without having to
modify its callers. This is not very useful, as there are
only two callers. Get rid of it and make setupDataCall take
the protocol parameter itself.
For now, hardcode IPv4 connectivity. When we add the
protocol field to ApnSettings, it will be fetched from
there.
Change-Id: I1a1adc616ffd9ac68be6911f054790da48e472d6
Diffstat (limited to 'telephony')
7 files changed, 31 insertions, 27 deletions
diff --git a/telephony/java/com/android/internal/telephony/CommandsInterface.java b/telephony/java/com/android/internal/telephony/CommandsInterface.java index c7da3d4..5e4c136 100644 --- a/telephony/java/com/android/internal/telephony/CommandsInterface.java +++ b/telephony/java/com/android/internal/telephony/CommandsInterface.java @@ -1327,11 +1327,15 @@ public interface CommandsInterface { * the password for APN, or NULL * @param authType * 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 * Callback message */ - public void setupDataCall(String radioTechnology, String profile, String apn, - String user, String password, String authType, Message result); + public void setupDataCall(String radioTechnology, String profile, + String apn, String user, String password, String authType, + String protocol, Message result); /** * Deactivate packet data connection diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java index c97ba6e..e8beeb5 100644 --- a/telephony/java/com/android/internal/telephony/RIL.java +++ b/telephony/java/com/android/internal/telephony/RIL.java @@ -1269,22 +1269,10 @@ public final class RIL extends BaseCommands implements CommandsInterface { return 1; } - /** - * The preferred new alternative to setupDefaultPDP that is - * CDMA-compatible. - * - */ public void setupDataCall(String radioTechnology, String profile, String apn, - String user, String password, String authType, Message result) { - setupDataCallWithProtocol(radioTechnology, profile, apn, user, password, - authType, "IP", result); - } - - public void - setupDataCallWithProtocol(String radioTechnology, String profile, - String apn, String user, String password, String authType, - String protocolType, Message result) { + String user, String password, String authType, String protocol, + Message result) { RILRequest rr = RILRequest.obtain(RIL_REQUEST_SETUP_DATA_CALL, result); @@ -1296,12 +1284,12 @@ public final class RIL extends BaseCommands implements CommandsInterface { rr.mp.writeString(user); rr.mp.writeString(password); rr.mp.writeString(authType); - rr.mp.writeString(protocolType); + rr.mp.writeString(protocol); if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + radioTechnology + " " + profile + " " + apn + " " + user + " " - + password + " " + authType + " " + protocolType); + + password + " " + authType + " " + protocol); send(rr); } diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index 305e15f..49a633e 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -92,10 +92,15 @@ public interface RILConstants { int SETUP_DATA_TECH_CDMA = 0; int SETUP_DATA_TECH_GSM = 1; int SETUP_DATA_AUTH_NONE = 0; + int SETUP_DATA_AUTH_PAP = 1; int SETUP_DATA_AUTH_CHAP = 2; 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"; + /* Deactivate data call reasons */ int DEACTIVATE_REASON_NONE = 0; int DEACTIVATE_REASON_RADIO_OFF = 1; diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java index c645da5..bba450a 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java @@ -89,9 +89,12 @@ public class CdmaDataConnection extends DataConnection { // msg.obj will be returned in AsyncResult.userObj; Message msg = obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE, cp); msg.obj = cp; - phone.mCM.setupDataCall(Integer.toString(RILConstants.SETUP_DATA_TECH_CDMA), - Integer.toString(dataProfile), null, null, - null, Integer.toString(RILConstants.SETUP_DATA_AUTH_PAP_CHAP), msg); + phone.mCM.setupDataCall( + Integer.toString(RILConstants.SETUP_DATA_TECH_CDMA), + Integer.toString(dataProfile), + null, null, null, + RILConstants.SETUP_DATA_PROTOCOL_IP, + Integer.toString(RILConstants.SETUP_DATA_AUTH_PAP_CHAP), msg); } @Override diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java index dfba8d6..cad360c 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java @@ -110,9 +110,12 @@ public class GsmDataConnection extends DataConnection { 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), msg); + phone.mCM.setupDataCall( + Integer.toString(RILConstants.SETUP_DATA_TECH_GSM), + Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), + apn.apn, apn.user, apn.password, + RILConstants.SETUP_DATA_PROTOCOL_IP, + Integer.toString(authType), msg); } @Override diff --git a/telephony/java/com/android/internal/telephony/sip/SipCommandInterface.java b/telephony/java/com/android/internal/telephony/sip/SipCommandInterface.java index 2e729fe..1939f95 100644 --- a/telephony/java/com/android/internal/telephony/sip/SipCommandInterface.java +++ b/telephony/java/com/android/internal/telephony/sip/SipCommandInterface.java @@ -186,7 +186,7 @@ class SipCommandInterface extends BaseCommands implements CommandsInterface { public void setupDataCall(String radioTechnology, String profile, String apn, String user, String password, String authType, - Message result) { + String protcol, Message result) { } public void deactivateDataCall(int cid, int reason, Message result) { diff --git a/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java b/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java index c2f88e5..37867b2 100644 --- a/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java +++ b/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java @@ -954,8 +954,9 @@ public final class SimulatedCommands extends BaseCommands unimplemented(response); } - public void setupDataCall(String radioTechnology, String profile, String apn, String user, - String password, String authType, Message result) { + public void setupDataCall(String radioTechnology, String profile, + String apn, String user, String password, String authType, + String protocol, Message result) { unimplemented(result); } |