discord-jadx/app/src/main/java/b/f/m/a.java

90 lines
3.1 KiB
Java

package b.f.m;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Parcel;
import b.f.m.f;
import b.f.m.m;
import java.io.File;
import java.io.IOException;
/* compiled from: ApkSoSource */
public class a extends f {
public final int h;
/* compiled from: ApkSoSource */
/* renamed from: b.f.m.a$a reason: collision with other inner class name */
public class C0070a extends f.c {
public File n;
public final int o;
public C0070a(f fVar) throws IOException {
super(fVar);
this.n = new File(a.this.c.getApplicationInfo().nativeLibraryDir);
this.o = a.this.h;
}
}
public a(Context context, File file, String str, int i) {
super(context, str, file, "^lib/([^/]+)/([^/]+\\.so)$");
this.h = i;
}
/* JADX WARNING: Removed duplicated region for block: B:11:0x003a */
/* JADX WARNING: Removed duplicated region for block: B:13:0x0045 */
@Override // b.f.m.m
public byte[] g() throws IOException {
int i;
File canonicalFile = this.f.getCanonicalFile();
Parcel obtain = Parcel.obtain();
try {
obtain.writeByte((byte) 2);
obtain.writeString(canonicalFile.getPath());
obtain.writeLong(canonicalFile.lastModified());
Context context = this.c;
PackageManager packageManager = context.getPackageManager();
if (packageManager != null) {
try {
i = packageManager.getPackageInfo(context.getPackageName(), 0).versionCode;
} catch (PackageManager.NameNotFoundException | RuntimeException unused) {
}
obtain.writeInt(i);
if ((this.h & 1) != 0) {
obtain.writeByte((byte) 0);
return obtain.marshall();
}
String str = this.c.getApplicationInfo().nativeLibraryDir;
if (str == null) {
obtain.writeByte((byte) 1);
byte[] marshall = obtain.marshall();
obtain.recycle();
return marshall;
}
File canonicalFile2 = new File(str).getCanonicalFile();
if (!canonicalFile2.exists()) {
obtain.writeByte((byte) 1);
byte[] marshall2 = obtain.marshall();
obtain.recycle();
return marshall2;
}
obtain.writeByte((byte) 2);
obtain.writeString(canonicalFile2.getPath());
obtain.writeLong(canonicalFile2.lastModified());
byte[] marshall3 = obtain.marshall();
obtain.recycle();
return marshall3;
}
i = 0;
obtain.writeInt(i);
if ((this.h & 1) != 0) {
}
} finally {
obtain.recycle();
}
}
@Override // b.f.m.m
public m.f i() throws IOException {
return new C0070a(this);
}
}