Fix callForwarding logic by considering responseIntArrayList

Test: cts; https://paste.googleplex.com/5496201279438848
Bug: 149791269
Change-Id: I29000c9586bf3d5fc998862d58aec815598607b3
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 4eb1788..c5512ea 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -908,12 +908,13 @@
                     request = (MainThreadRequest) ar.userObj;
                     int callForwardingStatus = TelephonyManager.CALL_WAITING_STATUS_UNKNOWN_ERROR;
                     if (ar.exception == null && ar.result != null) {
-                        ArrayList<Integer> callForwardResults = (ArrayList<Integer>) ar.result;
+                        int[] callForwardResults = (int[]) ar.result;
                         // Service Class is a bit mask per 3gpp 27.007.
                         // Search for any service for voice call.
-                        if ((callForwardResults.get(1)
-                                & CommandsInterface.SERVICE_CLASS_VOICE) > 0) {
-                            callForwardingStatus = callForwardResults.get(0) == 0
+                        if (callForwardResults.length > 1
+                                && ((callForwardResults[1]
+                                        & CommandsInterface.SERVICE_CLASS_VOICE) > 0)) {
+                            callForwardingStatus = callForwardResults[0] == 0
                                     ? TelephonyManager.CALL_WAITING_STATUS_INACTIVE
                                             : TelephonyManager.CALL_WAITING_STATUS_ACTIVE;
                         } else {