mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-13 17:37:16 +01:00
80 lines
2.7 KiB
Java
80 lines
2.7 KiB
Java
package com.facebook.soloader;
|
|
|
|
import android.content.Context;
|
|
import android.os.StrictMode;
|
|
import com.amazon.alexa.ra.core.ui.markdown.parser.formatter.MarkdownConstants;
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
import java.util.Collection;
|
|
import javax.annotation.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes7.dex */
|
|
public class ApplicationSoSource extends SoSource implements RecoverableSoSource {
|
|
private final int flags;
|
|
private DirectorySoSource soSource;
|
|
|
|
public ApplicationSoSource(Context context, int i) {
|
|
this.flags = i;
|
|
this.soSource = new DirectorySoSource(getNativeLibDirFromContext(context), i);
|
|
}
|
|
|
|
private static File getNativeLibDirFromContext(Context context) {
|
|
return new File(context.getApplicationInfo().nativeLibraryDir);
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
public void addToLdLibraryPath(Collection<String> collection) {
|
|
this.soSource.addToLdLibraryPath(collection);
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
@Nullable
|
|
public String[] getLibraryDependencies(String str) throws IOException {
|
|
return this.soSource.getLibraryDependencies(str);
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
@Nullable
|
|
public String getLibraryPath(String str) throws IOException {
|
|
return this.soSource.getLibraryPath(str);
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
public String getName() {
|
|
return "ApplicationSoSource";
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
@Nullable
|
|
public File getSoFileByName(String str) throws IOException {
|
|
return this.soSource.getSoFileByName(str);
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
public int loadLibrary(String str, int i, StrictMode.ThreadPolicy threadPolicy) throws IOException {
|
|
return this.soSource.loadLibrary(str, i, threadPolicy);
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
public void prepare(int i) throws IOException {
|
|
this.soSource.prepare(i);
|
|
}
|
|
|
|
@Override // com.facebook.soloader.RecoverableSoSource
|
|
public SoSource recover(Context context) {
|
|
this.soSource = new DirectorySoSource(getNativeLibDirFromContext(context), this.flags | 1);
|
|
return this;
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
public String toString() {
|
|
return getName() + MarkdownConstants.LEFT_BRACKET + this.soSource.toString() + MarkdownConstants.RIGHT_BRACKET;
|
|
}
|
|
|
|
@Override // com.facebook.soloader.SoSource
|
|
@Nullable
|
|
public File unpackLibrary(String str) throws IOException {
|
|
return this.soSource.unpackLibrary(str);
|
|
}
|
|
}
|