diff options
author | 2024-05-14 15:54:12 -0700 | |
---|---|---|
committer | 2024-05-14 16:00:55 -0700 | |
commit | 91ab113544c3c08ac8d55564ed57879be45b7f9e (patch) | |
tree | 16fdd32cd5afee010db35ff3033c1741f4f370fa /ravenwood/runtime-helper-src | |
parent | 19d146b43a4a9d795adca5914b75c2d1623e5c01 (diff) |
Support Color and ColorSpace on Ravenwood
- Moved Color's JNI methods out of Shader.cpp, so Ravenwood
can enable it without enabling other shader native methods.
- Also, leaned up the Matrix native methods while I'm here.
Bug: 337110712
Test: atest CtsGraphicsTestCases
Test: atest CtsGraphicsTestCasesRavenwood
Test: Boot the device
Change-Id: I0e99fb56ef581b4f59944994d07fd5253208dc31
Diffstat (limited to 'ravenwood/runtime-helper-src')
-rw-r--r-- | ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/runtimehelper/ClassLoadHook.java | 13 |
1 files changed, 8 insertions, 5 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 96b7057d25ec..69ff262fe915 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 @@ -162,20 +162,23 @@ public class ClassLoadHook { android.graphics.Interpolator.class, android.graphics.Matrix.class, android.graphics.Path.class, + android.graphics.Color.class, + android.graphics.ColorSpace.class, }; /** - * @return if a given class has any native method or not. + * @return if a given class and its nested classes, if any, have any native method or not. */ private static boolean hasNativeMethod(Class<?> clazz) { - for (var method : clazz.getDeclaredMethods()) { - if (Modifier.isNative(method.getModifiers())) { - return true; + for (var nestedClass : clazz.getNestMembers()) { + for (var method : nestedClass.getDeclaredMethods()) { + if (Modifier.isNative(method.getModifiers())) { + return true; + } } } return false; } - /** * Create a list of classes as comma-separated that require JNI methods to be set up from * a given class list, ignoring classes with no native methods. |