Skip to content

Commit

Permalink
Remove SoLoaderShim, use SoLoader
Browse files Browse the repository at this point in the history
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 facebook/fresco#1989

Reviewed By: erikandre

Differential Revision: D6556420

Pulled By: foghina

fbshipit-source-id: ffc3faef6452294b4d781258c64ef57e08d107b5
  • Loading branch information
foghina authored and facebook-github-bot committed Jan 16, 2018
1 parent 1f5bb37 commit fc6dd78
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
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;
Expand Down Expand Up @@ -100,9 +99,6 @@ public void initialize() {
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());
}
Expand Down Expand Up @@ -186,11 +182,4 @@ public void onHostDestroy() {
Fresco.getImagePipeline().clearMemoryCaches();
}
}

private static class FrescoHandler implements SoLoaderShim.Handler {
@Override
public void loadLibrary(String libraryName) {
SoLoader.loadLibrary(libraryName);
}
}
}

0 comments on commit fc6dd78

Please sign in to comment.