Move native methods to a single class
Summary: @public Moving all native methods in a single class provides the benefit of not having to load native bindings eagerly when just creating config objects in the startup paths, or setting Java-only values on them. Loading native bindings triggers additional class loads (`YogaConfig` / `YogaNode`), and can lead to problems in multi-dex scenarions. Reviewed By: pasqualeanatriello Differential Revision: D14560658 fbshipit-source-id: 14e31e3c3b560675b5a752a38ae75ab80a565ea1
This commit is contained in:
committed by
Facebook Github Bot
parent
ab3bf40c7d
commit
5bb2265083
@@ -30,9 +30,9 @@ public class YogaNodeTest {
|
||||
|
||||
@Test
|
||||
public void testInit() {
|
||||
final int refCount = YogaNodeJNIBase.jni_YGNodeGetInstanceCount();
|
||||
final int refCount = YogaNative.jni_YGNodeGetInstanceCount();
|
||||
final YogaNode node = createNode();
|
||||
assertEquals(refCount + 1, YogaNodeJNIBase.jni_YGNodeGetInstanceCount());
|
||||
assertEquals(refCount + 1, YogaNative.jni_YGNodeGetInstanceCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user