Loading telephony/java/com/android/internal/telephony/uicc/IccUtils.java +8 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.graphics.Bitmap; import android.graphics.Color; import android.os.Build; import android.telephony.UiccPortInfo; import android.text.TextUtils; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.GsmAlphabet; Loading Loading @@ -933,6 +934,13 @@ public class IccUtils { return s == null ? null : s.replaceAll("(?i)f*$", ""); } /** * Strip all the trailing 'F' characters of a string if exists and compare. */ public static boolean compareIgnoreTrailingFs(String a, String b) { return TextUtils.equals(a, b) || TextUtils.equals(stripTrailingFs(a), stripTrailingFs(b)); } /** * Converts a character of [0-9a-fA-F] to its hex value in a byte. If the character is not a * hex number, 0 will be returned. Loading Loading
telephony/java/com/android/internal/telephony/uicc/IccUtils.java +8 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.graphics.Bitmap; import android.graphics.Color; import android.os.Build; import android.telephony.UiccPortInfo; import android.text.TextUtils; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.GsmAlphabet; Loading Loading @@ -933,6 +934,13 @@ public class IccUtils { return s == null ? null : s.replaceAll("(?i)f*$", ""); } /** * Strip all the trailing 'F' characters of a string if exists and compare. */ public static boolean compareIgnoreTrailingFs(String a, String b) { return TextUtils.equals(a, b) || TextUtils.equals(stripTrailingFs(a), stripTrailingFs(b)); } /** * Converts a character of [0-9a-fA-F] to its hex value in a byte. If the character is not a * hex number, 0 will be returned. Loading