Merge "Fix error response handling for RIL request"
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index e96fd7e..c4a669d 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -756,7 +756,9 @@
if (ar.exception == null && ar.result != null) {
request.result = ar.result; // Integer
} else {
- request.result = null;
+ // request.result must be set to something non-null
+ // for the calling thread to unblock
+ request.result = new int[]{-1};
if (ar.result == null) {
loge("getPreferredNetworkType: Empty response");
} else if (ar.exception instanceof CommandException) {