正在查看: 万能钥匙 v1.1.23 应用的 J2V8Downloader.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 J2V8Downloader.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.finogeeks.lib.applet.service.j2v8.download;
import android.content.Context;
import com.finogeeks.lib.applet.f.c.a0;
import com.finogeeks.lib.applet.f.c.c0;
import com.finogeeks.lib.applet.f.c.d0;
import com.finogeeks.lib.applet.f.c.e;
import com.finogeeks.lib.applet.f.c.f;
import com.finogeeks.lib.applet.f.d.d;
import com.finogeeks.lib.applet.f.d.t;
import com.finogeeks.lib.applet.modules.log.FLog;
import com.finogeeks.lib.applet.net.FinHttpManager;
import com.finogeeks.lib.applet.utils.a1;
import com.finogeeks.lib.applet.utils.f1;
import com.finogeeks.lib.applet.utils.h1;
import java.io.File;
import java.io.IOException;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.n;
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0005\u0018\u00002\u00020\u0001:\u0001\u0012B\u000f\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0004\u0010\u0005J\r\u0010\u0007\u001a\u00020\u0006¢\u0006\u0004\b\u0007\u0010\bJ\u0015\u0010\u000b\u001a\u00020\u00062\u0006\u0010\n\u001a\u00020\t¢\u0006\u0004\b\u000b\u0010\fR\u0014\u0010\u0003\u001a\u00020\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0003\u0010\rR\u0014\u0010\u0011\u001a\u00020\u000e8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u000f\u0010\u0010¨\u0006\u0013"}, d2 = {"Lcom/finogeeks/lib/applet/service/j2v8/download/J2V8Downloader;", "", "Landroid/content/Context;", "context", "<init>", "(Landroid/content/Context;)V", "Llg0/e0;", "downloadJ2V8So", "()V", "Ljava/io/File;", "downloadingFile", "renameAndUnzipFile", "(Ljava/io/File;)V", "Landroid/content/Context;", "", "getJ2V8DownloadUrl", "()Ljava/lang/String;", "j2V8DownloadUrl", "Companion", "finapplet_release"}, k = 1, mv = {1, 4, 0})
public final class J2V8Downloader {
private final Context a;
public static final class a {
private a() {
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
public static final class b implements f {
public b() {
}
@Override
public void onFailure(e eVar, IOException iOException) {
n.j(eVar, "call");
n.j(iOException, "e");
FLog.e$default("J2V8Downloader", "J2V8 download failed", null, 4, null);
}
@Override
public void onResponse(e eVar, c0 c0Var) {
boolean z10;
n.j(eVar, "call");
n.j(c0Var, "response");
String a = a1.a(J2V8Downloader.this.a);
File file = new File(a);
if (!file.exists()) {
file.mkdirs();
}
File file2 = new File(a, "j2v8Downloading");
d dVar = null;
try {
if (file2.exists()) {
file2.delete();
}
t a2 = com.finogeeks.lib.applet.f.d.n.a(file2);
n.e(a2, "Okio.sink(downloadingFile)");
dVar = com.finogeeks.lib.applet.f.d.n.a(a2);
d0 a3 = c0Var.a();
if (a3 != null) {
dVar.a(a3.q());
}
dVar.close();
z10 = true;
} catch (Throwable th2) {
try {
FLog.e("J2V8Downloader", "save j2v8 failed", th2);
z10 = false;
} finally {
if (dVar != null) {
dVar.close();
}
}
}
if (z10) {
J2V8Downloader.this.a(file2);
}
}
}
public static final class c implements f1 {
@Override
public void onFailure(String str) {
FLog.d$default("J2V8Downloader", "j2v8 unzip failure", null, 4, null);
}
@Override
public void onSuccess() {
FLog.d$default("J2V8Downloader", "j2v8 unzip success", null, 4, null);
}
}
static {
new a(null);
}
public J2V8Downloader(Context context) {
n.j(context, "context");
this.a = context;
}
private final String b() {
String a2 = com.finogeeks.lib.applet.utils.n.a();
if (a2 != null) {
int hashCode = a2.hashCode();
if (hashCode != -806050265) {
if (hashCode != 117110) {
if (hashCode != 145444210) {
if (hashCode == 1431565292 && a2.equals("arm64-v8a")) {
return "https://www-cdn.finclip.com/sdk/j2v8/arm64-v8a.zip";
}
} else if (a2.equals("armeabi-v7a")) {
return "https://www-cdn.finclip.com/sdk/j2v8/armeabi-v7a.zip";
}
} else if (a2.equals("x86")) {
return "https://www-cdn.finclip.com/sdk/j2v8/x86.zip";
}
} else if (a2.equals("x86_64")) {
return "https://www-cdn.finclip.com/sdk/j2v8/x86_64.zip";
}
}
return "https://www-cdn.finclip.com/sdk/j2v8/arm64-v8a.zip";
}
public final void a() {
FinHttpManager.INSTANCE.getInstance().getOkhttpClient().a(new a0.a().b(b()).a()).a(new b());
}
public final void a(File file) {
n.j(file, "downloadingFile");
File file2 = new File(a1.a(this.a) + "j2v8Downloaded");
if (file2.exists()) {
file2.delete();
}
file.renameTo(file2);
String b2 = a1.b(this.a);
File file3 = new File(b2);
if (!file3.exists()) {
file3.mkdirs();
}
h1.a(file2.getPath(), b2, null, null, null, new c(), 28, null);
}
}