diff options
author | 2020-11-13 00:05:40 +0000 | |
---|---|---|
committer | 2020-11-13 00:05:40 +0000 | |
commit | c234812e275368f47d798112e1de49a8aad99753 (patch) | |
tree | 2c029a88ba773fa77936dc89ccd4f6328e2ece07 /tools/aapt2/Debug.cpp | |
parent | 8f8eaec80190bc4a35851b9efbef412dd63efb70 (diff) | |
parent | 5602dc9374934a42964e0f57faa3c0aad43003e1 (diff) |
Merge changes from topic "libaw-hardening"
* changes:
Do not cache bag parent stack until requested
Cache resolved theme values
libandroidfw hardening for IncFs
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r-- | tools/aapt2/Debug.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index 439f231193df..82da24959521 100644 --- a/tools/aapt2/Debug.cpp +++ b/tools/aapt2/Debug.cpp @@ -436,9 +436,9 @@ void Debug::DumpResStringPool(const android::ResStringPool* pool, text::Printer* for (size_t i=0; i<N; i++) { size_t len; if (pool->isUTF8()) { - uniqueStrings.add(pool->string8At(i, &len)); + uniqueStrings.add(UnpackOptionalString(pool->string8At(i), &len)); } else { - uniqueStrings.add(pool->stringAt(i, &len)); + uniqueStrings.add(UnpackOptionalString(pool->stringAt(i), &len)); } } @@ -450,8 +450,8 @@ void Debug::DumpResStringPool(const android::ResStringPool* pool, text::Printer* const size_t NS = pool->size(); for (size_t s=0; s<NS; s++) { - String8 str = pool->string8ObjectAt(s); - printer->Print(StringPrintf("String #%zd : %s\n", s, str.string())); + auto str = pool->string8ObjectAt(s); + printer->Print(StringPrintf("String #%zd : %s\n", s, str.has_value() ? str->string() : "")); } } |