Support i18n apex in Microdroid environment
The i18n APEX expects the ANDROID_I18N_ROOT and ANDROID_TZDATA_ROOT
variables to be configured.
The ANDROID_I18N_ROOT should be set to /apex/com.android.i18n, since
this is where i18n libs are located. It is no-op if i18n APEX is not
mounted.
For now the ANDROID_TZDATA_ROOT is set to a non-existent path, since
libicu seem to work correctly without it. We might need to also add
tzdata APEX to support APIS that depend on tzdata.
Bug: 390557313
Test: atest MicrodroidTests
Change-Id: Id89bd26a9bcb7b6d0aa0935171be4a4bdf916a20
diff --git a/tests/testapk/Android.bp b/tests/testapk/Android.bp
index 99300e2..284d706 100644
--- a/tests/testapk/Android.bp
+++ b/tests/testapk/Android.bp
@@ -47,6 +47,7 @@
],
jni_libs: [
"MicrodroidTestNativeLib",
+ "MicrodroidTestNativeLibWithLibIcu",
"MicrodroidIdleNativeLib",
"MicrodroidEmptyNativeLib",
"MicrodroidExitNativeLib",
@@ -188,6 +189,17 @@
}
cc_library_shared {
+ name: "MicrodroidTestNativeLibWithLibIcu",
+ defaults: ["MicrodroidTestNativeLibDefaults"],
+ shared_libs: [
+ "libicu",
+ ],
+ cflags: [
+ "-D__MICRODROID_TEST_PAYLOAD_USES_LIBICU__",
+ ],
+}
+
+cc_library_shared {
name: "MicrodroidTestNativeLibSub",
defaults: ["avf_build_flags_cc"],
srcs: ["src/native/testlib.cpp"],