diff options
author | Wink Saville <wink@google.com> | 2009-04-22 14:52:11 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2009-04-22 14:52:11 -0700 |
commit | a14f47f975064816df3008e66055d41ddb9d7353 (patch) | |
tree | 0c0cc3ae2b2aa49cde04c6fe564dc6d8c7e292ae /telephony | |
parent | 44ff0514c2c8b8917ef81182c8f9d84a1617ec57 (diff) | |
download | frameworks_base-a14f47f975064816df3008e66055d41ddb9d7353.zip frameworks_base-a14f47f975064816df3008e66055d41ddb9d7353.tar.gz frameworks_base-a14f47f975064816df3008e66055d41ddb9d7353.tar.bz2 |
Changes for new ril.h.
These allow RIL.java to assume ril.cpp is interfacing
to the new CDMA capable vendor ril. At the moment we
don't have a full CDMA capabile ril so thre are some
NEWRIL:TODO's in the code base to identify these areas.
Diffstat (limited to 'telephony')
7 files changed, 48 insertions, 17 deletions
diff --git a/telephony/java/com/android/internal/telephony/DriverCall.java b/telephony/java/com/android/internal/telephony/DriverCall.java index 6c4e71f..0d9a60f 100644 --- a/telephony/java/com/android/internal/telephony/DriverCall.java +++ b/telephony/java/com/android/internal/telephony/DriverCall.java @@ -44,8 +44,11 @@ public class DriverCall implements Comparable { public String number; public int TOA; public boolean isVoice; + public boolean isVoicePrivacy; public int als; public int numberPresentation; + public String name; + public int namePresentation; /** returns null on error */ static DriverCall @@ -101,11 +104,15 @@ public class DriverCall implements Comparable { public String toString() { return "id=" + index + "," - + (isMT ? "mt" : "mo") + "," + state + "," - + (isVoice ? "voice" : "no_voc") + "," + + "toa=" + TOA + "," + (isMpty ? "conf" : "norm") + "," - + TOA + "," + als + ",cli " + numberPresentation; + + (isMT ? "mt" : "mo") + "," + + als + "," + + (isVoice ? "voc" : "nonvoc") + "," + + (isVoicePrivacy ? "evp" : "noevp") + "," + /*+ "number=" + number */ + ",cli=" + numberPresentation + "," + /*+ "name="+ name */ + "," + namePresentation; } public static State diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java index 636a223..289be6e 100644 --- a/telephony/java/com/android/internal/telephony/RIL.java +++ b/telephony/java/com/android/internal/telephony/RIL.java @@ -2625,8 +2625,16 @@ public final class RIL extends BaseCommands implements CommandsInterface { dc.als = p.readInt(); voiceSettings = p.readInt(); dc.isVoice = (0 == voiceSettings) ? false : true; + + //dc.isVoicePrivacy = (0 != p.readInt()); + int voicePrivacy = p.readInt(); + dc.isVoicePrivacy = (0 != voicePrivacy); + dc.number = p.readString(); - dc.numberPresentation = DriverCall.presentationFromCLIP(p.readInt()); + int np = p.readInt(); + dc.numberPresentation = DriverCall.presentationFromCLIP(np); + dc.name = p.readString(); + dc.namePresentation = p.readInt(); // Make sure there's a leading + on addresses with a TOA // of 145 @@ -2664,7 +2672,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { PDPContextState pdp = new PDPContextState(); pdp.cid = p.readInt(); - pdp.active = p.readInt() == 0 ? false : true; + pdp.active = p.readInt(); pdp.type = p.readString(); pdp.apn = p.readString(); pdp.address = p.readString(); diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java index 6f344b9..d5cad1c 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java @@ -485,13 +485,17 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { -1, //[3] baseStationLongitude 0, //[4] cssIndicator; init with 0, because it is treated as a boolean -1, //[5] systemId - -1 //[6] networkId + -1, //[6] networkId + -1, //[7] TSB-58 Roaming indicator // NEWRIL:TODO UNUSED + -1, //[8] Indicates if current system is in PRL // NEWRIL:TODO UNUSED + -1, //[9] Is default roaming indicator from PRL // NEWRIL:TODO UNUSED + -1, //[10] If registration state is 3 this is reason for denial // NEWRIL:TODO UNUSED }; if (states.length > 0) { try { this.mRegistrationState = Integer.parseInt(states[0]); - if (states.length == 10) { + if (states.length >= 10) { for(int i = 0; i < states.length - offset; i++) { if (states[i + offset] != null && states[i + offset].length() > 0) { @@ -536,7 +540,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { case EVENT_POLL_STATE_OPERATOR_CDMA: String opNames[] = (String[])ar.result; - if (opNames != null && opNames.length >= 4) { + if (opNames != null && opNames.length >= 3) { newSS.setOperatorName (opNames[0], opNames[1], opNames[2]); } break; diff --git a/telephony/java/com/android/internal/telephony/cdma/RuimRecords.java b/telephony/java/com/android/internal/telephony/cdma/RuimRecords.java index 13408cf..b18a3f1 100644 --- a/telephony/java/com/android/internal/telephony/cdma/RuimRecords.java +++ b/telephony/java/com/android/internal/telephony/cdma/RuimRecords.java @@ -53,6 +53,7 @@ public final class RuimRecords extends IccRecords { String mdn = null; // My mobile number String h_sid; String h_nid; + String min2_min1; // 10 digit MIN value MIN2+MIN1 NEWRIL:TODO currently unused // is not initialized @@ -214,6 +215,9 @@ public final class RuimRecords extends IccRecords { mdn = localTemp[0]; h_sid = localTemp[1]; h_nid = localTemp[2]; + if (localTemp.length >= 3) { // NEWRIL:TODO remove when new ril always returns min2_min1 + min2_min1 = localTemp[3]; + } Log.d(LOG_TAG, "MDN: " + mdn); diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java index b889704..71ffe74 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java @@ -790,7 +790,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { private boolean pdpStatesHasActiveCID (ArrayList<PDPContextState> states, int cid) { for (int i = 0, s = states.size() ; i < s ; i++) { - if (states.get(i).cid == cid) return states.get(i).active; + if (states.get(i).cid == cid) return (states.get(i).active != 0); } return false; diff --git a/telephony/java/com/android/internal/telephony/gsm/PDPContextState.java b/telephony/java/com/android/internal/telephony/gsm/PDPContextState.java index feb78f8..31cdacf 100644 --- a/telephony/java/com/android/internal/telephony/gsm/PDPContextState.java +++ b/telephony/java/com/android/internal/telephony/gsm/PDPContextState.java @@ -21,7 +21,7 @@ package com.android.internal.telephony.gsm; */ public class PDPContextState { public int cid; - public boolean active; + public int active; public String type; public String apn; public String address; diff --git a/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java b/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java index 3e53654..cb09cea 100644 --- a/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java +++ b/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java @@ -832,22 +832,30 @@ public final class SimulatedCommands extends BaseCommands } /** - * response.obj.result is an String[3] - * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2 - * response.obj.result[1] is LAC if registered or NULL if not - * response.obj.result[2] is CID if registered or NULL if not - * valid LAC are 0x0000 - 0xffff - * valid CID are 0x00000000 - 0xffffffff + * response.obj.result is an String[14] + * See ril.h for details * * Please note that registration state 4 ("unknown") is treated * as "out of service" above */ public void getRegistrationState (Message result) { - String ret[] = new String[3]; + String ret[] = new String[14]; ret[0] = "5"; // registered roam ret[1] = null; ret[2] = null; + ret[3] = null; + ret[4] = null; + ret[5] = null; + ret[6] = null; + ret[7] = null; + ret[8] = null; + ret[9] = null; + ret[10] = null; + ret[11] = null; + ret[12] = null; + ret[13] = null; + ret[14] = null; resultSuccess(result, ret); } |