diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-07 02:22:31 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-07 02:22:31 +0000 |
commit | a1ba87358e58a90512ab427585f6661e44a2e318 (patch) | |
tree | 58bc595e9502c931db57bedce3d790b9d619a41c | |
parent | c2dff191db4772d70f53ced7a354921065471d7f (diff) | |
parent | fcb75079d4200f6afb334bca2bd20a3b109634f3 (diff) | |
download | minikin-android11-security-release.tar.gz |
Merge cherrypicks of [19981385, 20100213] into security-aosp-rvc-release.android-security-11.0.0_r76android-security-11.0.0_r75android-security-11.0.0_r74android-security-11.0.0_r73android-security-11.0.0_r72android-security-11.0.0_r71android-security-11.0.0_r70android-security-11.0.0_r69android-security-11.0.0_r68android-security-11.0.0_r67android-security-11.0.0_r66android-security-11.0.0_r65android-security-11.0.0_r64android-security-11.0.0_r63android-security-11.0.0_r62android11-security-release
Change-Id: I7c5478f7472d92d218cb19cd32165319cee57783
-rw-r--r-- | libs/minikin/LocaleListCache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/minikin/LocaleListCache.cpp b/libs/minikin/LocaleListCache.cpp index 15156cd..f0efda2 100644 --- a/libs/minikin/LocaleListCache.cpp +++ b/libs/minikin/LocaleListCache.cpp @@ -42,7 +42,7 @@ static size_t toLanguageTag(char* output, size_t outSize, const StringPiece& loc size_t outLength = 0; UErrorCode uErr = U_ZERO_ERROR; outLength = uloc_canonicalize(localeString.c_str(), output, outSize, &uErr); - if (U_FAILURE(uErr)) { + if (U_FAILURE(uErr) || (uErr == U_STRING_NOT_TERMINATED_WARNING)) { // unable to build a proper locale identifier ALOGD("uloc_canonicalize(\"%s\") failed: %s", localeString.c_str(), u_errorName(uErr)); output[0] = '\0'; @@ -62,7 +62,7 @@ static size_t toLanguageTag(char* output, size_t outSize, const StringPiece& loc char likelyChars[ULOC_FULLNAME_CAPACITY]; uErr = U_ZERO_ERROR; uloc_addLikelySubtags(output, likelyChars, ULOC_FULLNAME_CAPACITY, &uErr); - if (U_FAILURE(uErr)) { + if (U_FAILURE(uErr) || (uErr == U_STRING_NOT_TERMINATED_WARNING)) { // unable to build a proper locale identifier ALOGD("uloc_addLikelySubtags(\"%s\") failed: %s", output, u_errorName(uErr)); output[0] = '\0'; @@ -71,7 +71,7 @@ static size_t toLanguageTag(char* output, size_t outSize, const StringPiece& loc uErr = U_ZERO_ERROR; outLength = uloc_toLanguageTag(likelyChars, output, outSize, FALSE, &uErr); - if (U_FAILURE(uErr)) { + if (U_FAILURE(uErr) || (uErr == U_STRING_NOT_TERMINATED_WARNING)) { // unable to build a proper locale identifier ALOGD("uloc_toLanguageTag(\"%s\") failed: %s", likelyChars, u_errorName(uErr)); output[0] = '\0'; |