aapt: add option for stricter symbol generation

Adds an option that prevents generating java symbols for string
resources that don't have a default localization.

Bug: 21537397
Change-Id: Ifafa942b24d5cdbed93651cde363e859be13d395
diff --git a/tools/aapt/ResourceTable.h b/tools/aapt/ResourceTable.h
index 9644224..2c1bec1 100644
--- a/tools/aapt/ResourceTable.h
+++ b/tools/aapt/ResourceTable.h
@@ -235,8 +235,10 @@
                        const ConfigDescription* config = NULL);
 
     status_t assignResourceIds();
-    status_t addSymbols(const sp<AaptSymbols>& outSymbols = NULL);
+    status_t addSymbols(const sp<AaptSymbols>& outSymbols = NULL,
+                        bool skipSymbolsWithoutDefaultLocalization = false);
     void addLocalization(const String16& name, const String8& locale, const SourcePos& src);
+    void addDefaultLocalization(const String16& name);
     status_t validateLocalizations(void);
 
     status_t flatten(Bundle* bundle, const sp<const ResourceFilter>& filter,
@@ -588,6 +590,8 @@
 
     // key = string resource name, value = set of locales in which that name is defined
     std::map<String16, std::map<String8, SourcePos>> mLocalizations;
+    // set of string resources names that have a default localization
+    std::set<String16> mHasDefaultLocalization;
     std::queue<CompileResourceWorkItem> mWorkQueue;
 };