diff --git a/java/com/facebook/soloader/DirectSplitSoSourceWithImplicitLoads.java b/java/com/facebook/soloader/DirectSplitSoSourceLoadByName.java similarity index 73% rename from java/com/facebook/soloader/DirectSplitSoSourceWithImplicitLoads.java rename to java/com/facebook/soloader/DirectSplitSoSourceLoadByName.java index 391e401..17f0a1d 100644 --- a/java/com/facebook/soloader/DirectSplitSoSourceWithImplicitLoads.java +++ b/java/com/facebook/soloader/DirectSplitSoSourceLoadByName.java @@ -19,30 +19,26 @@ import android.annotation.SuppressLint; import android.content.Context; -public class DirectSplitSoSourceWithImplicitLoads extends DirectSplitSoSource +public class DirectSplitSoSourceLoadByName extends DirectSplitSoSource implements RecoverableSoSource { - public DirectSplitSoSourceWithImplicitLoads(String splitName) { + public DirectSplitSoSourceLoadByName(String splitName) { super(splitName); } @Override @SuppressLint("MissingSoLoaderLibrary") protected int loadLibraryImpl(String soName, int loadFlags) { - if ((loadFlags & LOAD_FLAG_ALLOW_IMPLICIT_PROVISION) != 0) { - return LOAD_RESULT_IMPLICITLY_PROVIDED; - } - System.loadLibrary(soName.substring(3, soName.length() - 3)); return LOAD_RESULT_LOADED; } @Override public String getName() { - return "DirectSplitSoSourceWithImplicitLoads"; + return "DirectSplitSoSourceLoadByName"; } @Override public SoSource recover(Context context) { - return new DirectSplitSoSourceWithStrictPathControl(mSplitName, mManifest, mLibs); + return new DirectSplitSoSourceLoadByPath(mSplitName, mManifest, mLibs); } } diff --git a/java/com/facebook/soloader/DirectSplitSoSourceWithStrictPathControl.java b/java/com/facebook/soloader/DirectSplitSoSourceLoadByPath.java similarity index 85% rename from java/com/facebook/soloader/DirectSplitSoSourceWithStrictPathControl.java rename to java/com/facebook/soloader/DirectSplitSoSourceLoadByPath.java index 4e112d4..3c15d84 100644 --- a/java/com/facebook/soloader/DirectSplitSoSourceWithStrictPathControl.java +++ b/java/com/facebook/soloader/DirectSplitSoSourceLoadByPath.java @@ -20,8 +20,8 @@ import java.util.Set; import javax.annotation.Nullable; -public class DirectSplitSoSourceWithStrictPathControl extends DirectSplitSoSource { - public DirectSplitSoSourceWithStrictPathControl( +public class DirectSplitSoSourceLoadByPath extends DirectSplitSoSource { + public DirectSplitSoSourceLoadByPath( String splitName, @Nullable Manifest manifest, @Nullable Set libs) { super(splitName, manifest, libs); } @@ -35,6 +35,6 @@ protected int loadLibraryImpl(String soName, int loadFlags) { @Override public String getName() { - return "DirectSplitSoSourceWithStrictPathControl"; + return "DirectSplitSoSourceLoadByPath"; } } diff --git a/java/com/facebook/soloader/SoLoader.java b/java/com/facebook/soloader/SoLoader.java index 22c80e1..8aca9ea 100644 --- a/java/com/facebook/soloader/SoLoader.java +++ b/java/com/facebook/soloader/SoLoader.java @@ -356,7 +356,7 @@ private static void initSoSources(Context context, int flags) throws IOException addSystemLoadWrapperSoSource(context, soSources); } else if (isEnabledBaseApkSplitSource) { addSystemLibSoSource(soSources); - soSources.add(0, new DirectSplitSoSourceWithImplicitLoads("base")); + soSources.add(0, new DirectSplitSoSourceLoadByName("base")); } else { addSystemLibSoSource(soSources);