summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hoisie <hoisie@google.com>2024-01-23 00:25:35 +0000
committerMichael Hoisie <hoisie@google.com>2024-01-31 17:39:06 +0000
commit14e81d2d23aaaea56f3d737a63407e4a877d4a99 (patch)
tree19717eed4d437916251adbd7ab778b74006bd647
parentfb8bc17f2f8f8225c57deaba4b31edbcfae9ab7b (diff)
downloadbase-14e81d2d23aaaea56f3d737a63407e4a877d4a99.tar.gz
Change the system property used for the ICU default language tag
Change the system property from 'robolectric.nativeruntime.languageTag' to 'icu.locale.default'. The latter is what has been upstreamed to the LayoutLib main branch. Bug: 321740537 Test: m robolectric_native_runtime dist Change-Id: I7c0ffffe9f8deefc3027b8105f0a58501bf01042
-rw-r--r--core/jni/RobolectricNativeRuntime.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/jni/RobolectricNativeRuntime.cpp b/core/jni/RobolectricNativeRuntime.cpp
index 762b5c3f7f5d..5e86e1a28c03 100644
--- a/core/jni/RobolectricNativeRuntime.cpp
+++ b/core/jni/RobolectricNativeRuntime.cpp
@@ -136,8 +136,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
// Set the default locale, which is required for e.g. SQLite's 'COLLATE UNICODE'.
auto stringLanguageTag =
(jstring)env->CallStaticObjectMethod(system, getPropertyMethod,
- env->NewStringUTF(
- "robolectric.nativeruntime.languageTag"),
+ env->NewStringUTF("icu.locale.default"),
env->NewStringUTF(""));
int languageTagLength = env->GetStringLength(stringLanguageTag);
const char* languageTag = env->GetStringUTFChars(stringLanguageTag, 0);