Return APDU status code on tramsit channel command failure.

Change-Id: Ib4a3ea5e6d87db27533fc31e710ef31fd2a7c49e
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 16e39e5..b392815 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1607,16 +1607,12 @@
                 new IccAPDUArgument(channel, cla, command, p1, p2, p3, data));
         if (DBG) log("iccTransmitApduLogicalChannel: " + response);
 
-        // If the payload is null, there was an error. Indicate that by returning
-        // an empty string.
-        if (response.payload == null) {
-          return "";
-        }
-
         // Append the returned status code to the end of the response payload.
         String s = Integer.toHexString(
                 (response.sw1 << 8) + response.sw2 + 0x10000).substring(1);
-        s = IccUtils.bytesToHexString(response.payload) + s;
+        if (response.payload != null) {
+            s = IccUtils.bytesToHexString(response.payload) + s;
+        }
         return s;
     }
 
@@ -1634,16 +1630,12 @@
                 new IccAPDUArgument(0, cla, command, p1, p2, p3, data));
         if (DBG) log("iccTransmitApduBasicChannel: " + response);
 
-        // If the payload is null, there was an error. Indicate that by returning
-        // an empty string.
-        if (response.payload == null) {
-          return "";
-        }
-
         // Append the returned status code to the end of the response payload.
         String s = Integer.toHexString(
                 (response.sw1 << 8) + response.sw2 + 0x10000).substring(1);
-        s = IccUtils.bytesToHexString(response.payload) + s;
+        if (response.payload != null) {
+            s = IccUtils.bytesToHexString(response.payload) + s;
+        }
         return s;
     }