summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jordan Liu <jminjie@google.com> 2017-11-01 23:20:39 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-11-01 23:20:39 +0000
commitc173c93c1ca84652a102ed12b95e0c3b5b63d69c (patch)
tree8cef9a81f12c26b60147e479ca54c1bebc31ca9f
parentf1167ced38b51b887a4c3e24a5539ab30dd0044e (diff)
parentcf94c67dc0e8aff3cdb069d382a64c4e1ea36ec9 (diff)
Merge "Added interface to get the decimal digit from hex ICCID."
-rw-r--r--telephony/java/com/android/internal/telephony/uicc/IccUtils.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
index 62d570c80043..99a82ad00d25 100644
--- a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
+++ b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
@@ -567,4 +567,12 @@ public class IccUtils {
} while (valueIndex < endIndex);
return result;
}
+
+ public static String getDecimalSubstring(String iccId) {
+ int position;
+ for (position = 0; position < iccId.length(); position ++) {
+ if (!Character.isDigit(iccId.charAt(position))) break;
+ }
+ return iccId.substring( 0, position );
+ }
}