Add support for BCP-47

- Switch to BCP-47 was to move away from hideous java locale toString
 - mnc1 padded to mnc01
 - mnc10 padded to mnc010
This commit is contained in:
Connor Tumbleson 2014-11-21 07:47:27 -06:00
parent 5b3db86e6c
commit 0150835bb0

View File

@ -144,7 +144,12 @@ public class ResConfigFlags {
ret.append("-mcc").append(String.format("%03d", mcc));
if (mcc != MNC_ZERO) {
if (mnc != 0 && mnc != -1) {
ret.append("-mnc").append(mnc);
ret.append("-mnc");
if (mnc > 0 && mnc < 10) {
ret.append(String.format("%02d", mnc));
} else {
ret.append(String.format("%03d", mnc));
}
}
}
}
@ -430,8 +435,8 @@ public class ResConfigFlags {
public final static int DENSITY_XHIGH = 320;
public final static int DENSITY_XXHIGH = 480;
public final static int DENSITY_XXXHIGH = 640;
public final static int DENSITY_ANY = 0xFE;
public final static int DENSITY_NONE = 0xFF;
public final static int DENSITY_ANY = 0xFFFE;
public final static int DENSITY_NONE = 0xFFFF;
public final static int MNC_ZERO = 0xFF;