Fix a crash while printing ICCID because of alphabets in UICC.

Bug: 25401769
Change-Id: Ieda058817b8d3cb4b1696fd9932bd0f10da55573
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java
index e11c8d3..d1d6e0d 100644
--- a/telephony/java/android/telephony/SubscriptionInfo.java
+++ b/telephony/java/android/telephony/SubscriptionInfo.java
@@ -332,9 +332,24 @@
         return 0;
     }
 
+    /**
+     * @hide
+     */
+    public static String givePrintableIccid(String iccId) {
+        String iccIdToPrint = null;
+        if (iccId != null) {
+            if (iccId.length() > 9) {
+                iccIdToPrint = iccId.substring(0, 9) + "XXXXXXXXXXX";
+            } else {
+                iccIdToPrint = iccId;
+            }
+        }
+        return iccIdToPrint;
+    }
+
     @Override
     public String toString() {
-        String iccIdToPrint = mIccId != null ? mIccId.substring(0, 9) + "XXXXXXXXXXX" : null;
+        String iccIdToPrint = givePrintableIccid(mIccId);
         return "{id=" + mId + ", iccId=" + iccIdToPrint + " simSlotIndex=" + mSimSlotIndex
                 + " displayName=" + mDisplayName + " carrierName=" + mCarrierName
                 + " nameSource=" + mNameSource + " iconTint=" + mIconTint