Home
last modified time | relevance | path

Searched refs:utf8 (Results 1 – 16 of 16) sorted by relevance

/frameworks/base/libs/androidfw/
DUtil.cpp44 std::u16string Utf8ToUtf16(const StringPiece& utf8) { in Utf8ToUtf16() argument
46 utf8_to_utf16_length(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length()); in Utf8ToUtf16()
53 utf8_to_utf16(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length(), &*utf16.begin(), in Utf8ToUtf16()
64 std::string utf8; in Utf16ToUtf8() local
65 utf8.resize(utf8_length); in Utf16ToUtf8()
66 utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin(), utf8_length + 1); in Utf16ToUtf8()
67 return utf8; in Utf16ToUtf8()
DApkAssets.cpp82 unique_fd fd(base::utf8::open(path.c_str(), O_RDONLY | O_BINARY | O_CLOEXEC)); in CreateAssetFromFile()
/frameworks/base/tools/aapt2/util/
DUtil.cpp300 std::u16string Utf8ToUtf16(const StringPiece& utf8) { in Utf8ToUtf16() argument
302 reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length()); in Utf8ToUtf16()
309 utf8_to_utf16(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length(), in Utf8ToUtf16()
320 std::string utf8; in Utf16ToUtf8() local
321 utf8.resize(utf8_length); in Utf16ToUtf8()
322 utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin(), utf8_length + 1); in Utf16ToUtf8()
323 return utf8; in Utf16ToUtf8()
DFiles.cpp111 int result = ::android::base::utf8::mkdir(parent_path.c_str(), mode); in mkdirs()
117 return ::android::base::utf8::mkdir(path.c_str(), mode) == 0 || errno == EEXIST; in mkdirs()
176 unique_fd fd(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), flags))); in MmapPath()
DUtil.h201 std::u16string Utf8ToUtf16(const android::StringPiece& utf8);
/frameworks/base/media/jni/
Dandroid_media_MediaScanner.cpp64 unsigned char utf8 = *(bytes++); in isValidUtf8() local
66 switch (utf8 >> 4) { in isValidUtf8()
90 utf8 = *(bytes++); in isValidUtf8()
91 if ((utf8 & 0xc0) != 0x80) { in isValidUtf8()
98 utf8 = *(bytes++); in isValidUtf8()
99 if ((utf8 & 0xc0) != 0x80) { in isValidUtf8()
/frameworks/base/tools/aapt2/
DStringPool.cpp367 static bool EncodeString(const std::string& str, const bool utf8, BigBuffer* out, in EncodeString() argument
369 if (utf8) { in EncodeString()
383 EncodeString(kStringTooLarge, utf8, out, diag); in EncodeString()
409 EncodeString(kStringTooLarge, utf8, out, diag); in EncodeString()
434 bool StringPool::Flatten(BigBuffer* out, const StringPool& pool, bool utf8, in Flatten() argument
443 if (utf8) { in Flatten()
457 no_error = EncodeString(entry->value, utf8, out, diag) && no_error; in Flatten()
462 no_error = EncodeString(entry->value, utf8, out, diag) && no_error; in Flatten()
DStringPool.h211 static bool Flatten(BigBuffer* out, const StringPool& pool, bool utf8, IDiagnostics* diag);
/frameworks/wilhelm/tests/native-media/jni/
Dnative-media-jni.c346 const char *utf8 = (*env)->GetStringUTFChars(env, filename, NULL); in Java_com_example_nativemedia_NativeMedia_createStreamingMediaPlayer() local
347 assert(NULL != utf8); in Java_com_example_nativemedia_NativeMedia_createStreamingMediaPlayer()
350 file = fopen(utf8, "rb"); in Java_com_example_nativemedia_NativeMedia_createStreamingMediaPlayer()
352 ALOGE("Failed to open %s", utf8); in Java_com_example_nativemedia_NativeMedia_createStreamingMediaPlayer()
394 (*env)->ReleaseStringUTFChars(env, filename, utf8); in Java_com_example_nativemedia_NativeMedia_createStreamingMediaPlayer()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/anqp/
DNAIRealmData.java76 boolean utf8 = (payload.get() & NAI_ENCODING_UTF8_MASK) != 0; in parse()
80 payload, utf8 ? StandardCharsets.UTF_8 : StandardCharsets.US_ASCII); in parse()
/frameworks/base/libs/androidfw/include/androidfw/
DStringPiece.h299 std::string utf8; variable
300 utf8.resize(static_cast<size_t>(utf8_len));
301 utf16_to_utf8(str.data(), str.size(), &*utf8.begin(), utf8_len + 1);
302 return out << utf8;
DUtil.h114 std::u16string Utf8ToUtf16(const StringPiece& utf8);
/frameworks/base/tools/aapt2/io/
DFileStream.cpp43 fd_.reset(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode))); in FileInputStream()
114 owned_fd_.reset(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode, 0666))); in FileOutputStream()
/frameworks/base/tools/aapt2/format/
DArchive.cpp65 file_ = {::android::base::utf8::fopen(full_path.c_str(), "wb"), fclose}; in StartEntry()
130 file_ = {::android::base::utf8::fopen(path.to_string().c_str(), "w+b"), fclose}; in Open()
/frameworks/base/tools/aapt/
DStringPool.h85 explicit StringPool(bool utf8 = false);
DStringPool.cpp125 StringPool::StringPool(bool utf8) : in StringPool() argument
126 mUTF8(utf8), mValues(-1) in StringPool()