Merge "Use Uppercase instead of Lowercase for PLMN Decode"
am: e61215cab1
Change-Id: I8c75abbd7574072e9b6c501b5fabf61bf2148592
This commit is contained in:
@@ -105,7 +105,7 @@ public class IccUtils {
|
|||||||
/**
|
/**
|
||||||
* PLMN (MCC/MNC) is encoded as per 24.008 10.5.1.3
|
* PLMN (MCC/MNC) is encoded as per 24.008 10.5.1.3
|
||||||
* Returns a concatenated string of MCC+MNC, stripping
|
* Returns a concatenated string of MCC+MNC, stripping
|
||||||
* all invalid character 'f'
|
* all invalid character 'F'
|
||||||
*/
|
*/
|
||||||
public static String bcdPlmnToString(byte[] data, int offset) {
|
public static String bcdPlmnToString(byte[] data, int offset) {
|
||||||
if (offset + 3 > data.length) {
|
if (offset + 3 > data.length) {
|
||||||
@@ -117,9 +117,9 @@ public class IccUtils {
|
|||||||
trans[2] = (byte) ((data[2 + offset] & 0xF0) | ((data[1 + offset] >> 4) & 0xF));
|
trans[2] = (byte) ((data[2 + offset] & 0xF0) | ((data[1 + offset] >> 4) & 0xF));
|
||||||
String ret = bytesToHexString(trans);
|
String ret = bytesToHexString(trans);
|
||||||
|
|
||||||
// For a valid plmn we trim all character 'f'
|
// For a valid plmn we trim all character 'F'
|
||||||
if (ret.contains("f")) {
|
if (ret.contains("F")) {
|
||||||
ret = ret.replaceAll("f", "");
|
ret = ret.replaceAll("F", "");
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user