X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/1423619ab908d03f8fcff4d4dd8ee359c4f2dddf..b935e64360db2f6f0159b879a810ad4428c87ce9:/ResourceTable.cpp diff --git a/ResourceTable.cpp b/ResourceTable.cpp index ab5e937..a2f085a 100644 --- a/ResourceTable.cpp +++ b/ResourceTable.cpp @@ -2527,9 +2527,11 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp& dest) const size_t N = mOrderedPackages.size(); size_t pi; + bool useUTF8 = !bundle->getWantUTF16() && bundle->isMinSdkAtLeast(SDK_FROYO); + // Iterate through all data, collecting all values (strings, // references, etc). - StringPool valueStrings = StringPool(false, bundle->getUTF8()); + StringPool valueStrings = StringPool(false, useUTF8); for (pi=0; pi p = mOrderedPackages.itemAt(pi); if (p->getTypes().size() == 0) { @@ -2537,8 +2539,8 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp& dest) continue; } - StringPool typeStrings = StringPool(false, bundle->getUTF8()); - StringPool keyStrings = StringPool(false, bundle->getUTF8()); + StringPool typeStrings = StringPool(false, useUTF8); + StringPool keyStrings = StringPool(false, useUTF8); const size_t N = p->getOrderedTypes().size(); for (size_t ti=0; ti