diff options
author | Adam Lesinski <adamlesinski@google.com> | 2015-04-24 19:19:30 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2015-05-04 16:43:24 -0700 |
commit | 24aad163bc88cb10d2275385e9afc3de7f342d65 (patch) | |
tree | 361fc0b3fbef5f68a16f357ae9d2bed5e93efbf5 /tools/aapt2/StringPool.h | |
parent | ab2581398c812917145088590bd18eb83f3a2ea6 (diff) |
Add namespace handling in attribute values
Previously, you could only reference namespace prefixes in attribute names:
<View xmlns:appcompat="http://schemas.android.com/apk/res/android.support.v7.appcompat"
appcompat:name="hey"
...
Now you can also reference them in resource names within an attribute value:
...
android:text="@appcompat:string/confirm"
...
Which will be treated as "@android.support.v7.appcompat:string/confirm".
Change-Id: Ib076e867a990c80cf877a704eb77cd1ef0b23b52
Diffstat (limited to 'tools/aapt2/StringPool.h')
-rw-r--r-- | tools/aapt2/StringPool.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/aapt2/StringPool.h b/tools/aapt2/StringPool.h index 64772a4ae487..14304a6e6b1a 100644 --- a/tools/aapt2/StringPool.h +++ b/tools/aapt2/StringPool.h @@ -127,7 +127,7 @@ public: using const_iterator = std::vector<std::unique_ptr<Entry>>::const_iterator; static bool flattenUtf8(BigBuffer* out, const StringPool& pool); - static bool flatten(BigBuffer* out, const StringPool& pool); + static bool flattenUtf16(BigBuffer* out, const StringPool& pool); StringPool() = default; StringPool(const StringPool&) = delete; @@ -193,6 +193,8 @@ private: friend const_iterator begin(const StringPool& pool); friend const_iterator end(const StringPool& pool); + static bool flatten(BigBuffer* out, const StringPool& pool, bool utf8); + Ref makeRefImpl(const StringPiece16& str, const Context& context, bool unique); std::vector<std::unique_ptr<Entry>> mStrings; |