diff options
author | Adrian Roos <roosa@google.com> | 2015-06-01 17:59:41 -0700 |
---|---|---|
committer | Adrian Roos <roosa@google.com> | 2015-06-02 02:55:52 +0000 |
commit | 5892248580859620db90d5ef2e3c2f48531933fa (patch) | |
tree | 1aa8d618ee303c56fba94e636d53f46db6e221c9 /tools/aapt/ResourceTable.h | |
parent | 8a8ffd4e9b15a04d2af0909205658f08c76bd6b2 (diff) |
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
Diffstat (limited to 'tools/aapt/ResourceTable.h')
-rw-r--r-- | tools/aapt/ResourceTable.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/aapt/ResourceTable.h b/tools/aapt/ResourceTable.h index 96442248d296..2c1bec1fb128 100644 --- a/tools/aapt/ResourceTable.h +++ b/tools/aapt/ResourceTable.h @@ -235,8 +235,10 @@ public: 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 @@ private: // 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; }; |