Use SystemProperties to setup ICU and keyboard paths
This directly puts values in the native Android system properties, so
that they can be queried natively without having to go through JNI.
Bug: 322360037
Test: N/A
Change-Id: I6a6fe3e4910ca8ad2e0f57445c6000458180b7a1
diff --git a/bridge/src/com/android/layoutlib/bridge/Bridge.java b/bridge/src/com/android/layoutlib/bridge/Bridge.java
index ce0fb2d..cf6ee80 100644
--- a/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -334,6 +334,8 @@
for (Entry<String, String> property : sPlatformProperties.entrySet()) {
SystemProperties.set(property.getKey(), property.getValue());
}
+ SystemProperties.set("ro.icu.data.path", Bridge.getIcuDataPath());
+ SystemProperties.set("ro.keyboard.paths", String.join(",", sKeyboardPaths));
}
/**
@@ -800,10 +802,8 @@
NativeConfig.CORE_CLASS_NATIVES));
System.setProperty("graphics_native_classes", String.join(",",
NativeConfig.GRAPHICS_CLASS_NATIVES));
- System.setProperty("icu.data.path", Bridge.getIcuDataPath());
System.setProperty("use_bridge_for_logging", "true");
System.setProperty("register_properties_during_load", "true");
- System.setProperty("keyboard_paths", String.join(",", sKeyboardPaths));
for (String library : getNativeLibraries()) {
String path = new File(nativeLibDir, library).getAbsolutePath();
System.load(path);