OSDN Git Service

Check ANDROID_I18N_ROOT when starting the runtime
authorVictor Chang <vichang@google.com>
Tue, 24 Sep 2019 13:55:02 +0000 (14:55 +0100)
committerVictor Chang <vichang@google.com>
Tue, 24 Sep 2019 13:55:02 +0000 (14:55 +0100)
Bug: 137009149
Test: treehugger
Change-Id: I0f34d433c73a44c051724769067bd6ccf5d4a0db

core/jni/AndroidRuntime.cpp

index 7df621d..23334b9 100644 (file)
@@ -1169,6 +1169,12 @@ void AndroidRuntime::start(const char* className, const Vector<String8>& options
         return;
     }
 
+    const char* i18nRootDir = getenv("ANDROID_I18N_ROOT");
+    if (i18nRootDir == NULL) {
+        LOG_FATAL("No runtime directory specified with ANDROID_I18N_ROOT environment variable.");
+        return;
+    }
+
     const char* tzdataRootDir = getenv("ANDROID_TZDATA_ROOT");
     if (tzdataRootDir == NULL) {
         LOG_FATAL("No tz data directory specified with ANDROID_TZDATA_ROOT environment variable.");