diff options
author | 2023-12-15 18:55:52 +0000 | |
---|---|---|
committer | 2024-03-04 23:05:44 +0000 | |
commit | 5b828730283cbc7b0a55dc8c68851260aa5f8ec5 (patch) | |
tree | 77ed5a879845516b024fd1644ad0b7336b58dc13 /ravenwood/runtime-helper-src | |
parent | 082e90eabc8e8d0e7ce6c8b4fd9676aee726ecc0 (diff) |
Make system property reading in LayoutlibLoader more DRY
The system properties can be stored in a std::unordered_map and can be
read in one fell swoop.
This reduces the amount of JNI boilerplate required to read individual
system properties.
Also remove the '**n/a**' magic string. LayoutLibLoader system property
logic is designed to support the empty string value.
This is effectively a cherry-pick of ag/25672148 but modified for
LayoutlibLoader in `main`.
Test: layoutlib-tests
Change-Id: I7562dc6eecada3199d8a3b20879b2e1b296cfb32
Diffstat (limited to 'ravenwood/runtime-helper-src')
-rw-r--r-- | ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/runtimehelper/ClassLoadHook.java | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/runtimehelper/ClassLoadHook.java b/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/runtimehelper/ClassLoadHook.java index cc94090d9ec7..9057d163957e 100644 --- a/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/runtimehelper/ClassLoadHook.java +++ b/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/runtimehelper/ClassLoadHook.java @@ -42,7 +42,6 @@ public class ClassLoadHook { public static final String KEYBOARD_PATHS = "keyboard_paths"; public static final String GRAPHICS_NATIVE_CLASSES = "graphics_native_classes"; - public static final String VALUE_N_A = "**n/a**"; public static final String LIBANDROID_RUNTIME_NAME = "android_runtime"; private static String sInitialDir = new File("").getAbsolutePath(); @@ -130,8 +129,6 @@ public class ClassLoadHook { } setProperty(CORE_NATIVE_CLASSES, jniClasses); setProperty(GRAPHICS_NATIVE_CLASSES, ""); - setProperty(ICU_DATA_PATH, VALUE_N_A); - setProperty(KEYBOARD_PATHS, VALUE_N_A); RavenwoodUtils.loadJniLibrary(LIBANDROID_RUNTIME_NAME); } |