OSDN Git Service

Allow 15 strings in RIL_REQUEST_VOICE_REGISTRATION_STATE response
authorNaveen Kalla <nkalla@quicinc.com>
Mon, 15 Aug 2011 22:40:46 +0000 (15:40 -0700)
committerWink Saville <wink@google.com>
Thu, 25 Aug 2011 19:34:00 +0000 (12:34 -0700)
RIL interface contains 15 strings in response to
RIL_REQUEST_VOICE_REGISTRATION_STATE. CdmaServiceStateTracker
throws an exception if response contains more than 14 strings.
Fix needed to comply with RIL interface.

Bug: 5204605
Change-Id: I6f266eb38b2bc52610999cd92449b8dc58dd3274

telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java

index 2cf4b88..0aed77e 100755 (executable)
@@ -545,7 +545,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
             int defaultRoamingIndicator = 0;  //[12] Is default roaming indicator from PRL
             int reasonForDenial = 0;       //[13] Denial reason if registrationState = 3
 
-            if (states.length == 14) {
+            if (states.length >= 14) {
                 try {
                     if (states[0] != null) {
                         registrationState = Integer.parseInt(states[0]);
@@ -593,8 +593,8 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
                 }
             } else {
                 throw new RuntimeException("Warning! Wrong number of parameters returned from "
-                                     + "RIL_REQUEST_REGISTRATION_STATE: expected 14 got "
-                                     + states.length);
+                                     + "RIL_REQUEST_REGISTRATION_STATE: expected 14 or more "
+                                     + "strings and got " + states.length + " strings");
             }
 
             mRegistrationState = registrationState;