Fixes edge case where mnc = 1, with no mcc field. Fixes #1072

This commit is contained in:
Connor Tumbleson 2015-11-01 06:17:29 -06:00
parent a4b5c926f4
commit 5f5f50f6fd
3 changed files with 13 additions and 0 deletions

View File

@ -178,6 +178,10 @@ public class ResConfigFlags {
} else { } else {
ret.append("-mnc00"); ret.append("-mnc00");
} }
} else {
if (mnc != 0) {
ret.append("-mnc").append(mnc);
}
} }
ret.append(getLocaleString()); ret.append(getLocaleString());

View File

@ -187,6 +187,11 @@ public class BuildAndDecodeTest {
compareValuesFiles("values-mcc001-mnc01/strings.xml"); compareValuesFiles("values-mcc001-mnc01/strings.xml");
} }
@Test
public void shortMncHtcTest() throws BrutException {
compareValuesFiles("values-mnc1/strings.xml");
}
@Test @Test
public void anyDpiTest() throws BrutException, IOException { public void anyDpiTest() throws BrutException, IOException {
compareValuesFiles("values-watch/strings.xml"); compareValuesFiles("values-watch/strings.xml");

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="test1">test1</string>
</resources>