OSDN Git Service

telephony: Populate the User-to-user signaling info fields.
authorNaveen Kalla <nkalla@quicinc.com>
Fri, 4 Dec 2009 02:29:41 +0000 (18:29 -0800)
committerWink Saville <wink@google.com>
Tue, 22 Dec 2009 21:48:23 +0000 (13:48 -0800)
Since the RIL interface has been enhanced to support user-user signaling
information, we need to populate the fields for RIL_REQUEST_DIAL and
decode the fields in RIL_Call. Handle the default case when UUS Info is not
present so that the RIL interface change does not break the normal case.

telephony/java/com/android/internal/telephony/RIL.java

index 279f57f..1ffcf9b 100644 (file)
@@ -800,6 +800,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
 
         rr.mp.writeString(address);
         rr.mp.writeInt(clirMode);
+        rr.mp.writeInt(0); // UUS information is absent
 
         if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
 
@@ -2824,6 +2825,13 @@ public final class RIL extends BaseCommands implements CommandsInterface {
             dc.numberPresentation = DriverCall.presentationFromCLIP(np);
             dc.name = p.readString();
             dc.namePresentation = p.readInt();
+            int uusInfoPresent = p.readInt();
+            if (uusInfoPresent == 1) {
+                // TODO: Copy the data to dc to forward to the apps.
+                p.readInt();
+                p.readInt();
+                p.createByteArray();
+            }
 
             // Make sure there's a leading + on addresses with a TOA of 145
             dc.number = PhoneNumberUtils.stringFromStringAndTOA(dc.number, dc.TOA);