move YGSetLogger and YGConfigFree with global ref to vanilla jni
Summary: Move YGSetLogger and YGConfigFree methods to vanilla JNI Reviewed By: amir-shalem Differential Revision: D17754999 fbshipit-source-id: 8dfcf1a54e4d54ebf91e38c6513e6a703a40ae92
This commit is contained in:
committed by
Facebook Github Bot
parent
2ef674edd3
commit
d6591439d1
@@ -10,7 +10,7 @@ public abstract class YogaConfigJNIBase extends YogaConfig {
|
||||
|
||||
long mNativePointer;
|
||||
private YogaLogger mLogger;
|
||||
private boolean useVanillaJNI = false;
|
||||
protected boolean useVanillaJNI = false;
|
||||
|
||||
private YogaConfigJNIBase(long nativePointer) {
|
||||
if (nativePointer == 0) {
|
||||
@@ -85,7 +85,10 @@ public abstract class YogaConfigJNIBase extends YogaConfig {
|
||||
|
||||
public void setLogger(YogaLogger logger) {
|
||||
mLogger = logger;
|
||||
YogaNative.jni_YGConfigSetLogger(mNativePointer, logger);
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGConfigSetLoggerJNI(mNativePointer, logger);
|
||||
else
|
||||
YogaNative.jni_YGConfigSetLogger(mNativePointer, logger);
|
||||
}
|
||||
|
||||
public YogaLogger getLogger() {
|
||||
|
Reference in New Issue
Block a user