正在查看: 火箭TNT加速 v1.5.4 应用的 MainApplication.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 火箭TNT加速 v1.5.4 应用的 MainApplication.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.vortex;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.defaults.DefaultReactNativeHost;
import com.facebook.soloader.SoLoader;
import com.github.kr328.clash.common.Global;
import com.github.kr328.clash.common.compat.AppKt;
import com.vortex.remote.Remote;
import java.io.IOException;
import java.lang.Thread;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import kotlin.Metadata;
import kotlin.TuplesKt;
import kotlin.collections.ArraysKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.HttpUrl;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import org.json.JSONObject;
import rikka.preference.PreferenceProvider;
@Metadata(d1 = {"\u0000J\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0000\u0018\u00002\u00020\u00012\u00020\u0002B\u0005¢\u0006\u0002\u0010\u0003J\u0012\u0010\f\u001a\u00020\r2\b\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0014J\u0006\u0010\u0010\u001a\u00020\rJ\b\u0010\u0011\u001a\u00020\u000bH\u0002J\b\u0010\u0012\u001a\u00020\tH\u0016J\u0018\u0010\u0013\u001a\u00020\r2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u0017H\u0002J\u0010\u0010\u0018\u001a\u00020\u000b2\u0006\u0010\u0019\u001a\u00020\u000bH\u0002J\b\u0010\u001a\u001a\u00020\rH\u0016J\u0018\u0010\u001b\u001a\u00020\r2\u0006\u0010\u0016\u001a\u00020\u00172\u0006\u0010\u001c\u001a\u00020\u001dH\u0002R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0006\u001a\u0004\u0018\u00010\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\tX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u000bX\u0082D¢\u0006\u0002\n\u0000¨\u0006\u001e"}, d2 = {"Lcom/vortex/MainApplication;", "Landroid/app/Application;", "Lcom/facebook/react/ReactApplication;", "()V", "client", "Lokhttp3/OkHttpClient;", "jsonMediaType", "Lokhttp3/MediaType;", "mReactNativeHost", "Lcom/facebook/react/ReactNativeHost;", "version", HttpUrl.FRAGMENT_ENCODE_SET, "attachBaseContext", HttpUrl.FRAGMENT_ENCODE_SET, "base", "Landroid/content/Context;", "finalize", "getDeviceInformation", "getReactNativeHost", "handleUncaughtError", "t", "Ljava/lang/Thread;", "error", HttpUrl.FRAGMENT_ENCODE_SET, "md5", "input", "onCreate", "sendErrorReport", "isFatal", HttpUrl.FRAGMENT_ENCODE_SET, "cmfa-1.5.4_meta-alphaRelease"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class MainApplication extends Application implements ReactApplication {
private final OkHttpClient client = new OkHttpClient();
private final MediaType jsonMediaType = MediaType.INSTANCE.parse("application/json; charset=utf-8");
private final String version = "10504";
private final ReactNativeHost mReactNativeHost = new DefaultReactNativeHost(this) {
protected String getJSMainModuleName() {
return "index";
}
public boolean getUseDeveloperSupport() {
return false;
}
protected boolean isNewArchEnabled() {
return false;
}
{
super(this);
}
protected List<ReactPackage> getPackages() {
ArrayList packages = new PackageList((ReactNativeHost) this).getPackages();
packages.add(new ReactAppPackage());
Intrinsics.checkNotNullExpressionValue(packages, "PackageList(this).packag…pPackage())\n }");
return packages;
}
protected Boolean isHermesEnabled() {
return true;
}
};
public ReactNativeHost getMReactNativeHost() {
return this.mReactNativeHost;
}
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
Global.INSTANCE.init(this);
}
private final String getDeviceInformation() {
return AbstractJsonLexerKt.BEGIN_LIST + Build.MANUFACTURER + AbstractJsonLexerKt.END_LIST + Build.MODEL + "(Android-" + Build.VERSION.RELEASE + ')';
}
private final String md5(String input) {
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
byte[] bytes = input.getBytes(Charsets.UTF_8);
Intrinsics.checkNotNullExpressionValue(bytes, "this as java.lang.String).getBytes(charset)");
byte[] bytes2 = messageDigest.digest(bytes);
Intrinsics.checkNotNullExpressionValue(bytes2, "bytes");
return ArraysKt.joinToString$default(bytes2, (CharSequence) HttpUrl.FRAGMENT_ENCODE_SET, (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) new Function1<Byte, CharSequence>() {
public final CharSequence invoke(byte b) {
String format = String.format("%02x", Arrays.copyOf(new Object[]{Byte.valueOf(b)}, 1));
Intrinsics.checkNotNullExpressionValue(format, "format(this, *args)");
return format;
}
@Override
public CharSequence invoke(Byte b) {
return invoke(b.byteValue());
}
}, 30, (Object) null);
}
private final void sendErrorReport(Throwable error, boolean isFatal) {
StackTraceElement[] stackTrace = error.getStackTrace();
Intrinsics.checkNotNullExpressionValue(stackTrace, "error.stackTrace");
String obj = MapsKt.mapOf(TuplesKt.to("devInfo", getDeviceInformation()), TuplesKt.to("message", error.getLocalizedMessage()), TuplesKt.to("stack", ArraysKt.joinToString$default(stackTrace, "\n", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 62, (Object) null)), TuplesKt.to("isFatal", Boolean.valueOf(isFatal)), TuplesKt.to("version", this.version)).toString();
String md5 = md5(obj + "90Qt3%&*L7aD");
JSONObject jSONObject = new JSONObject();
jSONObject.put("sign", md5);
jSONObject.put("platform", "Android");
jSONObject.put(PreferenceProvider.EXTRA_DATA, obj);
RequestBody.Companion companion = RequestBody.INSTANCE;
MediaType mediaType = this.jsonMediaType;
String jSONObject2 = jSONObject.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "data.toString()");
this.client.newCall(new Request.Builder().url("https://log.vtx.team/-/crash_log").post(companion.create(mediaType, jSONObject2)).build()).enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
Intrinsics.checkNotNullParameter(call, "call");
Intrinsics.checkNotNullParameter(e, "e");
}
@Override
public void onResponse(Call call, Response response) {
Intrinsics.checkNotNullParameter(call, "call");
Intrinsics.checkNotNullParameter(response, "response");
}
});
}
private final void handleUncaughtError(Thread t, Throwable error) {
sendErrorReport(error, true);
}
@Override
public void onCreate() {
super.onCreate();
MainApplication mainApplication = this;
SoLoader.init(mainApplication, false);
ReactNativeFlipper.initializeFlipper(mainApplication, getMReactNativeHost().getReactInstanceManager());
if (Intrinsics.areEqual(AppKt.getCurrentProcessName(this), getPackageName())) {
Remote.INSTANCE.launch();
}
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public final void uncaughtException(Thread thread, Throwable th) {
MainApplication.m105onCreate$lambda0(MainApplication.this, thread, th);
}
});
}
public static final void m105onCreate$lambda0(MainApplication this$0, Thread thread, Throwable throwable) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullExpressionValue(thread, "thread");
Intrinsics.checkNotNullExpressionValue(throwable, "throwable");
this$0.handleUncaughtError(thread, throwable);
}
public final void finalize() {
Global.INSTANCE.destroy();
}
}