From 3079c6c74b2060423dbe2fa91e7b4eca76493b64 Mon Sep 17 00:00:00 2001 From: Victor Chang Date: Tue, 24 Sep 2019 14:55:02 +0100 Subject: [PATCH] Check ANDROID_I18N_ROOT when starting the runtime Bug: 137009149 Test: treehugger Change-Id: I0f34d433c73a44c051724769067bd6ccf5d4a0db --- core/jni/AndroidRuntime.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 7df621daea13..23334b9222b0 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -1169,6 +1169,12 @@ void AndroidRuntime::start(const char* className, const Vector& 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."); -- 2.11.0