Add support for MNC=00
This adds support for operators with MNC (Mobile Network Code) zero
to add customized resources. For example, it makes it possible to
add a folder called "/res/values-mnc00/" in an application. This will
cause resources in that folder to be used when MNC is zero.
(There is a total of 14 countries that have an operator with MNC
zero.)
Without this fix, the resource framework gets confused, because MNC 0
is normally used when the MNC is undefined (not set).
Bug: 7170488
Change-Id: Icfd39fd0c739216e89446252ea0e7ceba6f002c6
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 2149190..3797b49 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -934,6 +934,9 @@
if (out) {
out->mnc = atoi(val);
+ if (out->mnc == 0) {
+ out->mnc = ACONFIGURATION_MNC_ZERO;
+ }
}
return true;