速狼加速器 v1.3.05版本的 MD5 值为:16b5e8af5c3774d85c1aa8bd4f624d0b
以下内容为反编译后的 App.java 源代码,内容仅作参考
package com.lzz.youtu;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import cat.ereza.customactivityoncrash.config.CaocConfig;
import com.google.firebase.FirebaseApp;
import com.lzz.youtu.NetworkMonitor.NetWorkMonitorManager;
import com.lzz.youtu.NetworkMonitor.NetworkChangeNotification;
import com.lzz.youtu.VpnControl.VpnControlorV1;
import com.lzz.youtu.data.CLibUtils;
import com.lzz.youtu.data.IpUtils;
import com.lzz.youtu.data.LogUtils;
import com.lzz.youtu.interfase.CustomCrachListener;
import com.lzz.youtu.interfase.ScreenListener;
import com.lzz.youtu.network.LocalDataManager;
import com.lzz.youtu.pojo.UserInfo;
import com.lzz.youtu.ui.CrachActivity;
import com.lzz.youtu.ui.MainActivity;
import com.lzz.youtu.utils.ActivityUtil;
import com.lzz.youtu.utils.NotifyUtil;
import com.lzz.youtu.utils.Utils;
import java.net.SocketException;
import java.util.Locale;
import me.jessyan.autosize.AutoSize;
import me.jessyan.autosize.AutoSizeConfig;
import me.jessyan.autosize.onAdaptListener;
public class App extends Application {
private static App instance;
private static Context mAppContext;
private ActivityUtil.ActivityCallback activityCallback = new ActivityUtil.ActivityCallback() {
@Override
public void onStart() {
}
@Override
public void onAppExit() {
LogUtils.dLog(getClass().getName(), "[onAppExit]");
if (App.this.builder != null) {
App.this.builder.enabled(false);
}
if (!VpnControlorV1.getInstance().isStop()) {
VpnControlorV1.getInstance().stop();
}
App.this.onStopService();
NotifyUtil.getInstance().removeNotification();
LogUtils.releaseLog();
}
};
private CaocConfig.Builder builder;
private SCREEN_STATE screenState;
private long screenTime;
private Intent service;
public enum SCREEN_STATE {
ScreenOff,
ScreenOn,
UserPresent
}
public int testAdd(int i, int i2) {
return i + i2;
}
public void updateScreenSate(SCREEN_STATE screen_state) {
synchronized (this) {
this.screenState = screen_state;
this.screenTime = System.currentTimeMillis();
}
}
public SCREEN_STATE getScreenState() {
return this.screenState;
}
public long getLastScreenTime() {
return this.screenTime;
}
public void onStartService() {
this.service = new Intent(mAppContext, (Class<?>) MainService.class);
if (Utils.isServiceExisted(this, MainService.class.getName())) {
return;
}
this.service = new Intent(mAppContext, (Class<?>) MainService.class);
LogUtils.dLog(getClass().getName(), "[onStartService] [SDK_INT]:" + Build.VERSION.SDK_INT + "[VERSION_CODES.O]:26");
if (Build.VERSION.SDK_INT >= 26) {
startForegroundService(this.service);
} else {
startService(this.service);
}
}
public void onStopService() {
LogUtils.dLog(getClass().getName(), "[onStopService]");
Intent intent = this.service;
if (intent != null) {
stopService(intent);
this.service = null;
}
}
public static App getInstance() {
return instance;
}
public void test() {
LogUtils.dLog(getClass().getName(), "[test]: customerConfig:" + AppControl.EncryptStr("{\"type\": 2, \"value\":\"https://url.cn/ce420a23?_type=wpa&qidian=true\", \"sub_type\":1 }"));
}
public void EncryptNodes() {
LogUtils.eLog(getClass().getName(), "[EncryptNodes]:" + AppControl.EncryptStr("[\n {\n \"area_code\" : \"hk\",\n \"area_icon\" : \"hk\",\n \"area_name\" : \"China hongkong\",\n \"area_sort\" : 1,\n \"list\" : [\n {\n \"area\" : \"8\",\n \"bandwidth\" : \"131072000\",\n \"delay_add\" : \"0\",\n \"fav\" : 0,\n \"icon\" : \"hk\",\n \"id\" : \"28\",\n \"info\" : \"honhkong azure |can watch netflix\",\n \"ip\" : \"40.83.88.147\",\n \"key\" : \"112233!!@@#$%^%$\",\n \"load_add\" : \"0\",\n \"machine_id\" : \"634\",\n \"name\" : \"hongkong azure 01\",\n \"network_num\" : \"1\",\n \"node_id\" : \"634\",\n \"port\" : \"12682\",\n \"status\" : \"0\",\n \"type\" : \"1\",\n \"update_time\" : \"2021-02-16 14:05:54\"\n }]}]"));
}
@Override
public void onCreate() {
super.onCreate();
mAppContext = getApplicationContext();
instance = this;
ActivityUtil.activityCallback = this.activityCallback;
NetworkChangeNotification.getInstance();
NetWorkMonitorManager.getInstance().init(this);
updateScreenSate(SCREEN_STATE.ScreenOn);
if (!Utils.getChannel(this).equals("googletry")) {
FirebaseApp.initializeApp(getAppContext());
}
LocalDataManager.getInstance().init();
onStartService();
new ScreenListener(this).begin(new ScreenListener.ScreenStateListener() {
@Override
public void onUserPresent() {
LogUtils.dLog(getClass().getName(), "[onCreate][onUserPresent]");
App.this.updateScreenSate(SCREEN_STATE.UserPresent);
}
@Override
public void onScreenOn() {
LogUtils.dLog(getClass().getName(), "[onCreate][onScreenOn]");
App.this.updateScreenSate(SCREEN_STATE.ScreenOn);
}
@Override
public void onScreenOff() {
LogUtils.dLog(getClass().getName(), "[onCreate][onScreenOff]");
App.this.updateScreenSate(SCREEN_STATE.ScreenOff);
}
});
LogUtils.eLog(getClass().getName(), "[onCreate]");
NotifyUtil.getInstance().setTitle(getResources().getString(R.string.app_name)).setIcon(R.drawable.ic_launch).setPendingIntent(MainActivity.class);
config();
}
public static Context getAppContext() {
return mAppContext;
}
private void config() {
CaocConfig.Builder create = CaocConfig.Builder.create();
this.builder = create;
create.backgroundMode(0).enabled(true).showErrorDetails(false).showRestartButton(false).trackActivities(true).minTimeBetweenCrashesMs(2000).errorDrawable(Integer.valueOf(R.drawable.ic_launch)).restartActivity(MainActivity.class).errorActivity(CrachActivity.class).eventListener(new CustomCrachListener()).apply();
AutoSize.initCompatMultiProcess(this);
AutoSizeConfig.getInstance().setOnAdaptListener(new onAdaptListener() {
@Override
public void onAdaptBefore(Object obj, Activity activity) {
LogUtils.eLog(getClass().getSimpleName(), String.format(Locale.ENGLISH, "%s onAdaptBefore!", obj.getClass().getName()));
}
@Override
public void onAdaptAfter(Object obj, Activity activity) {
LogUtils.eLog(getClass().getSimpleName(), String.format(Locale.ENGLISH, "%s onAdaptAfter!", obj.getClass().getName()));
}
}).setUseDeviceSize(true);
String string = LocalDataManager.getInstance().getString(LocalDataManager.CacheKey.DEVICE_NAME);
if (string == null || string.isEmpty()) {
try {
string = Settings.Secure.getString(getContentResolver(), "bluetooth_name");
} catch (Exception unused) {
}
if (string == null || string.isEmpty()) {
string = Build.MODEL;
}
if (!string.isEmpty()) {
LocalDataManager.getInstance().setData(LocalDataManager.CacheKey.DEVICE_NAME, string);
}
}
CLibUtils.init(Utils.getApplicationLanguage(), Utils.getChannel(this), getIp(1000), Utils.getDeviceId(getAppContext()), Utils.getAppVersionName(mAppContext), !TextUtils.isEmpty(UserInfo.getInstance().getUser_id()) ? Integer.parseInt(UserInfo.getInstance().getUser_id().trim()) : 0);
String name = getClass().getName();
StringBuilder sb = new StringBuilder();
sb.append("[sign]:");
sb.append(CLibUtils.getSign("yuutto" + Utils.getAppVersionName(getAppContext())));
Log.d(name, sb.toString());
Log.d(getClass().getName(), "[dev_id]:" + Utils.getDeviceId(getAppContext()));
}
private String getIp(int i) {
final String[] strArr = {"127.0.0.1"};
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
strArr[0] = IpUtils.getLocalIPAddress();
} catch (SocketException e) {
e.printStackTrace();
}
}
});
try {
thread.start();
thread.join(i);
} catch (InterruptedException e) {
e.printStackTrace();
}
return strArr[0];
}
@Override
public void onTrimMemory(int i) {
if (i == 5) {
LogUtils.dLog(getClass().getName(), "[onTrimMemory]:TRIM_MEMORY_RUNNING_MODERATE 5");
} else if (i == 10) {
LogUtils.dLog(getClass().getName(), "[onTrimMemory]:TRIM_MEMORY_RUNNING_LOW 10");
} else if (i == 15) {
LogUtils.dLog(getClass().getName(), "[onTrimMemory]:TRIM_MEMORY_RUNNING_CRITICAL 15");
} else if (i == 20) {
LogUtils.dLog(getClass().getName(), "[onTrimMemory]:TRIM_MEMORY_UI_HIDDEN 20");
} else if (i == 40) {
LogUtils.dLog(getClass().getName(), "[onTrimMemory]:TRIM_MEMORY_BACKGROUND 40");
} else if (i == 60) {
LogUtils.dLog(getClass().getName(), "[onTrimMemory]:TRIM_MEMORY_MODERATE 60");
} else if (i == 80) {
LogUtils.dLog(getClass().getName(), "[onTrimMemory]:TRIM_MEMORY_COMPLETE 80");
}
super.onTrimMemory(i);
}
}