Fixes a few minor problems with AAPT

- Fixes casting problems with stricter compilers
- Adds a couple of missing ifdef guards

This is a first step toward being able to generate APKs on the fly on the device.

Bug: 2766918
Change-Id: Icaaee5a4032afa313256add321b447443861dd85
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 755b93b..f40a877 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -2366,7 +2366,7 @@
         if (configSet.count(defaultLocale) == 0) {
             fprintf(stdout, "aapt: warning: string '%s' has no default translation in %s; found:",
                     String8(nameIter->first).string(), mBundle->getResourceSourceDirs()[0]);
-            for (set<String8>::iterator locales = configSet.begin();
+            for (set<String8>::const_iterator locales = configSet.begin();
                  locales != configSet.end();
                  locales++) {
                 fprintf(stdout, " %s", (*locales).string());