Remove SoLoaderShim, use SoLoader
Summary: SoLoader is more stable on older versions of Android. Switching to it should fix recurring issues that we get such as `UnsatisfiedLinkError` and so on. CI + run showcase app. Closes https://github.com/facebook/fresco/pull/1989 Reviewed By: erikandre Differential Revision: D6556420 Pulled By: foghina fbshipit-source-id: ffc3faef6452294b4d781258c64ef57e08d107b5
This commit is contained in:
parent
1f5bb374cd
commit
fc6dd78935
|
@ -15,7 +15,6 @@ import android.content.Context;
|
|||
import android.support.annotation.Nullable;
|
||||
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.common.soloader.SoLoaderShim;
|
||||
import com.facebook.drawee.backends.pipeline.Fresco;
|
||||
import com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory;
|
||||
import com.facebook.imagepipeline.core.ImagePipelineConfig;
|
||||
|
@ -100,9 +99,6 @@ public class FrescoModule extends ReactContextBaseJavaModule implements
|
|||
super.initialize();
|
||||
getReactApplicationContext().addLifecycleEventListener(this);
|
||||
if (!hasBeenInitialized()) {
|
||||
// Make sure the SoLoaderShim is configured to use our loader for native libraries.
|
||||
// This code can be removed if using Fresco from Maven rather than from source
|
||||
SoLoaderShim.setHandler(new FrescoHandler());
|
||||
if (mConfig == null) {
|
||||
mConfig = getDefaultConfig(getReactApplicationContext());
|
||||
}
|
||||
|
@ -186,11 +182,4 @@ public class FrescoModule extends ReactContextBaseJavaModule implements
|
|||
Fresco.getImagePipeline().clearMemoryCaches();
|
||||
}
|
||||
}
|
||||
|
||||
private static class FrescoHandler implements SoLoaderShim.Handler {
|
||||
@Override
|
||||
public void loadLibrary(String libraryName) {
|
||||
SoLoader.loadLibrary(libraryName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue