Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ac434df authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AAPT2: Remove usage of u16string"

parents 9e29a175 d0f116b6
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -804,8 +804,14 @@ const char* ResStringPool::string8At(size_t idx, size_t* outLen) const
        if (off < (mStringPoolSize-1)) {
            const uint8_t* strings = (uint8_t*)mStrings;
            const uint8_t* str = strings+off;
            *outLen = decodeLength(&str);
            size_t encLen = decodeLength(&str);

            // Decode the UTF-16 length. This is not used if we're not
            // converting to UTF-16 from UTF-8.
            decodeLength(&str);

            const size_t encLen = decodeLength(&str);
            *outLen = encLen;

            if ((uint32_t)(str+encLen-strings) < mStringPoolSize) {
                return (const char*)str;
            } else {
+1 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ testSources := \
	java/JavaClassGenerator_test.cpp \
	java/ManifestClassGenerator_test.cpp \
	Locale_test.cpp \
	NameMangler_test.cpp \
	Resource_test.cpp \
	ResourceParser_test.cpp \
	ResourceTable_test.cpp \
+2 −2
Original line number Diff line number Diff line
@@ -31,12 +31,12 @@ struct AppInfo {
    /**
     * App's package name.
     */
    std::u16string package;
    std::string package;

    /**
     * The App's minimum SDK version.
     */
    Maybe<std::u16string> minSdkVersion;
    Maybe<std::string> minSdkVersion;
};

} // namespace aapt
+1 −2
Original line number Diff line number Diff line
@@ -16,10 +16,9 @@

#include "ConfigDescription.h"
#include "SdkConstants.h"

#include "test/Test.h"
#include "util/StringPiece.h"

#include <gtest/gtest.h>
#include <string>

namespace aapt {
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void Flags::usage(const StringPiece& command, std::ostream* out) {
        // Split the description by newlines and write out the argument (which is empty after
        // the first line) followed by the description line. This will make sure that multiline
        // descriptions are still right justified and aligned.
        for (StringPiece line : util::tokenize<char>(flag.description, '\n')) {
        for (StringPiece line : util::tokenize(flag.description, '\n')) {
            *out << " " << std::setw(kWidth) << std::left << argLine << line << "\n";
            argLine = " ";
        }
Loading