GalaxyVPN v1.2.3版本的 MD5 值为:642e5f69966a3849933084f3c0fba1d5
以下内容为反编译后的 MainActivity.java 源代码,内容仅作参考
package com.v2ray.ang.ui;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.net.Uri;
import android.net.VpnService;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.google.android.gms.common.internal.ImagesContract;
import com.google.android.material.navigation.NavigationView;
import com.neko.hostnamefinder.HostnameFinder;
import com.neko.hostpotproxy.ui.ProxySettings;
import com.neko.ip.location.IpLocation;
import com.neko.ipgeolocationhosttoip.HostToIp;
import com.neko.networkswitcher.NetworkSwitcher;
import com.neko.preference.About;
import com.neko.speedtest.SpeedTestActivity;
import com.tbruyelle.rxpermissions.RxPermissions;
import com.tencent.mmkv.MMKV;
import com.v2ray.ang.AppConfig;
import com.v2ray.ang.R;
import com.v2ray.ang.databinding.ActivityMainBinding;
import com.v2ray.ang.dto.EConfigType;
import com.v2ray.ang.dto.SubscriptionItem;
import com.v2ray.ang.extension._ExtKt;
import com.v2ray.ang.helper.SimpleItemTouchHelperCallback;
import com.v2ray.ang.service.V2RayServiceManager;
import com.v2ray.ang.util.AngConfigManager;
import com.v2ray.ang.util.MmkvManager;
import com.v2ray.ang.util.SpeedtestUtil;
import com.v2ray.ang.util.Utils;
import com.v2ray.ang.viewmodel.MainViewModel;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
import kotlin.Deprecated;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.io.CloseableKt;
import kotlin.io.TextStreamsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.text.Charsets;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.Dispatchers;
import me.drakeet.support.toast.ToastCompat;
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;
@Metadata(d1 = {"\u0000\u0088\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\t\n\u0002\u0010\b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\b\u0018\u00002\u00020\u00012\u00020\u0002B\u0005¢\u0006\u0002\u0010\u0003J\b\u0010\"\u001a\u00020#H\u0002J\u0006\u0010$\u001a\u00020#J\u001a\u0010%\u001a\u00020#2\b\u0010&\u001a\u0004\u0018\u00010'2\b\b\u0002\u0010(\u001a\u00020'J\u0006\u0010)\u001a\u00020*J\u0006\u0010+\u001a\u00020*J\u0006\u0010,\u001a\u00020*J\u0010\u0010-\u001a\u00020*2\b\u0010.\u001a\u0004\u0018\u00010'J\u0006\u0010/\u001a\u00020*J\u0006\u00100\u001a\u00020*J\u0010\u00101\u001a\u00020#2\b\u0010&\u001a\u0004\u0018\u00010'J\u0010\u00102\u001a\u00020#2\u0006\u00103\u001a\u000204H\u0002J\u000e\u00105\u001a\u00020*2\u0006\u00106\u001a\u00020*J\b\u00107\u001a\u00020#H\u0002J\b\u00108\u001a\u00020#H\u0017J\u0012\u00109\u001a\u00020#2\b\u0010:\u001a\u0004\u0018\u00010;H\u0014J\u0010\u0010<\u001a\u00020*2\u0006\u0010=\u001a\u00020>H\u0016J\u0018\u0010?\u001a\u00020*2\u0006\u0010@\u001a\u0002042\u0006\u0010A\u001a\u00020BH\u0016J\u0010\u0010C\u001a\u00020*2\u0006\u0010D\u001a\u00020EH\u0016J\u0010\u0010F\u001a\u00020*2\u0006\u0010D\u001a\u00020EH\u0016J\b\u0010G\u001a\u00020#H\u0016J\b\u0010H\u001a\u00020#H\u0016J\u0010\u0010I\u001a\u00020#2\u0006\u0010J\u001a\u00020KH\u0002J\u0006\u0010L\u001a\u00020#J\u0010\u0010M\u001a\u00020#2\b\u0010N\u001a\u0004\u0018\u00010'J\b\u0010O\u001a\u00020#H\u0002J\u0006\u0010P\u001a\u00020#J\b\u0010Q\u001a\u00020#H\u0002J\u0006\u0010R\u001a\u00020#R\u001b\u0010\u0004\u001a\u00020\u00058BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\b\u0010\t\u001a\u0004\b\u0006\u0010\u0007R\u000e\u0010\n\u001a\u00020\u000bX\u0082.¢\u0006\u0002\n\u0000R\u001c\u0010\f\u001a\u0010\u0012\f\u0012\n \u000f*\u0004\u0018\u00010\u000e0\u000e0\rX\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0010\u001a\u0004\u0018\u00010\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R#\u0010\u0012\u001a\n \u000f*\u0004\u0018\u00010\u00130\u00138BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0016\u0010\t\u001a\u0004\b\u0014\u0010\u0015R\u001b\u0010\u0017\u001a\u00020\u00188FX\u0086\u0084\u0002¢\u0006\f\n\u0004\b\u001b\u0010\t\u001a\u0004\b\u0019\u0010\u001aR\u001c\u0010\u001c\u001a\u0010\u0012\f\u0012\n \u000f*\u0004\u0018\u00010\u000e0\u000e0\rX\u0082\u0004¢\u0006\u0002\n\u0000R\u001c\u0010\u001d\u001a\u0010\u0012\f\u0012\n \u000f*\u0004\u0018\u00010\u000e0\u000e0\rX\u0082\u0004¢\u0006\u0002\n\u0000R\u001c\u0010\u001e\u001a\u0010\u0012\f\u0012\n \u000f*\u0004\u0018\u00010\u000e0\u000e0\rX\u0082\u0004¢\u0006\u0002\n\u0000R#\u0010\u001f\u001a\n \u000f*\u0004\u0018\u00010\u00130\u00138BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b!\u0010\t\u001a\u0004\b \u0010\u0015¨\u0006S"}, d2 = {"Lcom/v2ray/ang/ui/MainActivity;", "Lcom/v2ray/ang/ui/BaseActivity;", "Lcom/google/android/material/navigation/NavigationView$OnNavigationItemSelectedListener;", "()V", "adapter", "Lcom/v2ray/ang/ui/MainRecyclerAdapter;", "getAdapter", "()Lcom/v2ray/ang/ui/MainRecyclerAdapter;", "adapter$delegate", "Lkotlin/Lazy;", "binding", "Lcom/v2ray/ang/databinding/ActivityMainBinding;", "chooseFileForCustomConfig", "Landroidx/activity/result/ActivityResultLauncher;", "Landroid/content/Intent;", "kotlin.jvm.PlatformType", "mItemTouchHelper", "Landroidx/recyclerview/widget/ItemTouchHelper;", "mainStorage", "Lcom/tencent/mmkv/MMKV;", "getMainStorage", "()Lcom/tencent/mmkv/MMKV;", "mainStorage$delegate", "mainViewModel", "Lcom/v2ray/ang/viewmodel/MainViewModel;", "getMainViewModel", "()Lcom/v2ray/ang/viewmodel/MainViewModel;", "mainViewModel$delegate", "requestVpnPermission", "scanQRCodeForConfig", "scanQRCodeForUrlToCustomConfig", "settingsStorage", "getSettingsStorage", "settingsStorage$delegate", "copyAssets", "", "hideCircle", "importBatchConfig", "server", "", "subid", "importClipboard", "", "importConfigCustomClipboard", "importConfigCustomLocal", "importConfigCustomUrl", ImagesContract.URL, "importConfigCustomUrlClipboard", "importConfigViaSub", "importCustomizeConfig", "importManually", "createConfigType", "", "importQRcode", "forConfig", "migrateLegacy", "onBackPressed", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onCreateOptionsMenu", "menu", "Landroid/view/Menu;", "onKeyDown", "keyCode", NotificationCompat.CATEGORY_EVENT, "Landroid/view/KeyEvent;", "onNavigationItemSelected", "item", "Landroid/view/MenuItem;", "onOptionsItemSelected", "onPause", "onResume", "readContentFromUri", "uri", "Landroid/net/Uri;", "restartV2Ray", "setTestState", "content", "setupViewModel", "showCircle", "showFileChooser", "startV2Ray", "app_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class MainActivity extends BaseActivity implements NavigationView.OnNavigationItemSelectedListener {
private ActivityMainBinding binding;
private final ActivityResultLauncher<Intent> chooseFileForCustomConfig;
private ItemTouchHelper mItemTouchHelper;
private final Lazy mainViewModel$delegate;
private final ActivityResultLauncher<Intent> requestVpnPermission;
private final ActivityResultLauncher<Intent> scanQRCodeForConfig;
private final ActivityResultLauncher<Intent> scanQRCodeForUrlToCustomConfig;
private final Lazy adapter$delegate = LazyKt.lazy(new Function0<MainRecyclerAdapter>() {
{
super(0);
}
@Override
public final MainRecyclerAdapter invoke() {
return new MainRecyclerAdapter(MainActivity.this);
}
});
private final Lazy mainStorage$delegate = LazyKt.lazy(new Function0<MMKV>() {
@Override
public final MMKV invoke() {
return MMKV.mmkvWithID(MmkvManager.ID_MAIN, 2);
}
});
private final Lazy settingsStorage$delegate = LazyKt.lazy(new Function0<MMKV>() {
@Override
public final MMKV invoke() {
return MMKV.mmkvWithID(MmkvManager.ID_SETTING, 2);
}
});
public MainActivity() {
ActivityResultLauncher<Intent> registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
@Override
public final void onActivityResult(Object obj) {
MainActivity.requestVpnPermission$lambda$0(MainActivity.this, (ActivityResult) obj);
}
});
Intrinsics.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul…rtV2Ray()\n }\n }");
this.requestVpnPermission = registerForActivityResult;
final MainActivity mainActivity = this;
this.mainViewModel$delegate = new ViewModelLazy(Reflection.getOrCreateKotlinClass(MainViewModel.class), new Function0<ViewModelStore>() {
{
super(0);
}
@Override
public final ViewModelStore invoke() {
ViewModelStore viewModelStore = ComponentActivity.this.getViewModelStore();
Intrinsics.checkNotNullExpressionValue(viewModelStore, "viewModelStore");
return viewModelStore;
}
}, new Function0<ViewModelProvider.Factory>() {
{
super(0);
}
@Override
public final ViewModelProvider.Factory invoke() {
ViewModelProvider.Factory defaultViewModelProviderFactory = ComponentActivity.this.getDefaultViewModelProviderFactory();
Intrinsics.checkNotNullExpressionValue(defaultViewModelProviderFactory, "defaultViewModelProviderFactory");
return defaultViewModelProviderFactory;
}
}, new Function0<CreationExtras>() {
{
super(0);
}
@Override
public final CreationExtras invoke() {
CreationExtras creationExtras;
Function0 function0 = Function0.this;
if (function0 == null || (creationExtras = (CreationExtras) function0.invoke()) == null) {
CreationExtras defaultViewModelCreationExtras = mainActivity.getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullExpressionValue(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
return defaultViewModelCreationExtras;
}
return creationExtras;
}
});
ActivityResultLauncher<Intent> registerForActivityResult2 = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
@Override
public final void onActivityResult(Object obj) {
MainActivity.scanQRCodeForConfig$lambda$10(MainActivity.this, (ActivityResult) obj);
}
});
Intrinsics.checkNotNullExpressionValue(registerForActivityResult2, "registerForActivityResul…RESULT\"))\n }\n }");
this.scanQRCodeForConfig = registerForActivityResult2;
ActivityResultLauncher<Intent> registerForActivityResult3 = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
@Override
public final void onActivityResult(Object obj) {
MainActivity.scanQRCodeForUrlToCustomConfig$lambda$11(MainActivity.this, (ActivityResult) obj);
}
});
Intrinsics.checkNotNullExpressionValue(registerForActivityResult3, "registerForActivityResul…RESULT\"))\n }\n }");
this.scanQRCodeForUrlToCustomConfig = registerForActivityResult3;
ActivityResultLauncher<Intent> registerForActivityResult4 = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
@Override
public final void onActivityResult(Object obj) {
MainActivity.chooseFileForCustomConfig$lambda$13(MainActivity.this, (ActivityResult) obj);
}
});
Intrinsics.checkNotNullExpressionValue(registerForActivityResult4, "registerForActivityResul…mUri(uri)\n }\n }");
this.chooseFileForCustomConfig = registerForActivityResult4;
}
public static final void chooseFileForCustomConfig$lambda$13(MainActivity this$0, ActivityResult activityResult) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intent data = activityResult.getData();
Uri data2 = data != null ? data.getData() : null;
if (activityResult.getResultCode() != -1 || data2 == null) {
return;
}
this$0.readContentFromUri(data2);
}
private final void copyAssets() {
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), Dispatchers.getIO(), null, new MainActivity$copyAssets$1(this, Utils.INSTANCE.userAssetPath(this), null), 2, null);
}
private static void feedbackUrl(Context context) {
context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(AppConfig.v2rayNGIssues)));
}
public final MainRecyclerAdapter getAdapter() {
return (MainRecyclerAdapter) this.adapter$delegate.getValue();
}
private final MMKV getMainStorage() {
return (MMKV) this.mainStorage$delegate.getValue();
}
private final MMKV getSettingsStorage() {
return (MMKV) this.settingsStorage$delegate.getValue();
}
public static final void hideCircle$lambda$15(Function1 tmp0, Object obj) {
Intrinsics.checkNotNullParameter(tmp0, "$tmp0");
tmp0.invoke(obj);
}
public static void importBatchConfig$default(MainActivity mainActivity, String str, String str2, int i, Object obj) {
if ((i & 2) != 0) {
str2 = "";
}
mainActivity.importBatchConfig(str, str2);
}
private final void importManually(int i) {
startActivity(new Intent().putExtra("createConfigType", i).putExtra("subscriptionId", getMainViewModel().getSubscriptionId()).setClass(this, ServerActivity.class));
}
public static final void importQRcode$lambda$9(Function1 tmp0, Object obj) {
Intrinsics.checkNotNullParameter(tmp0, "$tmp0");
tmp0.invoke(obj);
}
private final void migrateLegacy() {
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), Dispatchers.getIO(), null, new MainActivity$migrateLegacy$1(this, null), 2, null);
}
private static void modderUrl(Context context) {
context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://t.me/hieusadboy")));
}
public static final void onCreate$lambda$1(MainActivity this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (Intrinsics.areEqual((Object) this$0.getMainViewModel().isRunning().getValue(), (Object) true)) {
Utils.INSTANCE.stopVService(this$0);
return;
}
MMKV settingsStorage = this$0.getSettingsStorage();
if (!Intrinsics.areEqual((settingsStorage == null || (r3 = settingsStorage.decodeString(AppConfig.PREF_MODE)) == null) ? "VPN" : "VPN", "VPN")) {
this$0.startV2Ray();
return;
}
Intent prepare = VpnService.prepare(this$0);
if (prepare == null) {
this$0.startV2Ray();
} else {
this$0.requestVpnPermission.launch(prepare);
}
}
public static final void onCreate$lambda$2(MainActivity this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (Intrinsics.areEqual((Object) this$0.getMainViewModel().isRunning().getValue(), (Object) true)) {
this$0.setTestState(this$0.getString(R.string.connection_test_testing));
this$0.getMainViewModel().testCurrentServerRealPing();
}
}
public static final void onCreate$lambda$4(Function1 tmp0, Object obj) {
Intrinsics.checkNotNullParameter(tmp0, "$tmp0");
tmp0.invoke(obj);
}
public static final void onOptionsItemSelected$lambda$6(MainActivity this$0, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
MmkvManager.INSTANCE.removeAllServer();
this$0.getMainViewModel().reloadServerList();
}
public static final void onOptionsItemSelected$lambda$7(MainActivity this$0, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.getMainViewModel().removeDuplicateServer();
}
public static final void onOptionsItemSelected$lambda$8(MainActivity this$0, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
MmkvManager.INSTANCE.removeInvalidServer();
this$0.getMainViewModel().reloadServerList();
}
private static void privacyUrl(Context context) {
context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(AppConfig.v2rayNGPrivacyPolicy)));
}
private static void promotionUrl(Context context) {
context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://ht4gvpn.com")));
}
private final void readContentFromUri(final Uri uri) {
Observable<Boolean> request = new RxPermissions(this).request(Build.VERSION.SDK_INT >= 33 ? "android.permission.READ_MEDIA_IMAGES" : "android.permission.READ_EXTERNAL_STORAGE");
final Function1<Boolean, Unit> function1 = new Function1<Boolean, Unit>() {
{
super(1);
}
@Override
public Unit invoke(Boolean bool) {
invoke2(bool);
return Unit.INSTANCE;
}
public final void invoke2(Boolean it) {
String str;
Intrinsics.checkNotNullExpressionValue(it, "it");
if (!it.booleanValue()) {
_ExtKt.toast(MainActivity.this, (int) R.string.toast_permission_denied);
return;
}
try {
InputStream openInputStream = MainActivity.this.getContentResolver().openInputStream(uri);
MainActivity mainActivity = MainActivity.this;
InputStream input = openInputStream;
if (input != null) {
Intrinsics.checkNotNullExpressionValue(input, "input");
InputStreamReader inputStreamReader = new InputStreamReader(input, Charsets.UTF_8);
str = TextStreamsKt.readText(inputStreamReader instanceof BufferedReader ? (BufferedReader) inputStreamReader : new BufferedReader(inputStreamReader, 8192));
} else {
str = null;
}
mainActivity.importCustomizeConfig(str);
Unit unit = Unit.INSTANCE;
CloseableKt.closeFinally(openInputStream, null);
} catch (Exception e) {
e.printStackTrace();
}
}
};
request.subscribe(new Action1() {
@Override
public final void call(Object obj) {
MainActivity.readContentFromUri$lambda$14(Function1.this, obj);
}
});
}
public static final void readContentFromUri$lambda$14(Function1 tmp0, Object obj) {
Intrinsics.checkNotNullParameter(tmp0, "$tmp0");
tmp0.invoke(obj);
}
public static final void requestVpnPermission$lambda$0(MainActivity this$0, ActivityResult activityResult) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (activityResult.getResultCode() == -1) {
this$0.startV2Ray();
}
}
public static final void restartV2Ray$lambda$5(Function1 tmp0, Object obj) {
Intrinsics.checkNotNullParameter(tmp0, "$tmp0");
tmp0.invoke(obj);
}
public static final void scanQRCodeForConfig$lambda$10(MainActivity this$0, ActivityResult activityResult) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (activityResult.getResultCode() == -1) {
Intent data = activityResult.getData();
importBatchConfig$default(this$0, data != null ? data.getStringExtra("SCAN_RESULT") : null, null, 2, null);
}
}
public static final void scanQRCodeForUrlToCustomConfig$lambda$11(MainActivity this$0, ActivityResult activityResult) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (activityResult.getResultCode() == -1) {
Intent data = activityResult.getData();
this$0.importConfigCustomUrl(data != null ? data.getStringExtra("SCAN_RESULT") : null);
}
}
private final void setupViewModel() {
MainActivity mainActivity = this;
getMainViewModel().getUpdateListAction().observe(mainActivity, new MainActivity$sam$androidx_lifecycle_Observer$0(new Function1<Integer, Unit>() {
{
super(1);
}
@Override
public Unit invoke(Integer num) {
invoke2(num);
return Unit.INSTANCE;
}
public final void invoke2(Integer index) {
MainRecyclerAdapter adapter;
MainRecyclerAdapter adapter2;
Intrinsics.checkNotNullExpressionValue(index, "index");
if (index.intValue() >= 0) {
adapter2 = MainActivity.this.getAdapter();
adapter2.notifyItemChanged(index.intValue());
return;
}
adapter = MainActivity.this.getAdapter();
adapter.notifyDataSetChanged();
}
}));
getMainViewModel().getUpdateTestResultAction().observe(mainActivity, new MainActivity$sam$androidx_lifecycle_Observer$0(new Function1<String, Unit>() {
{
super(1);
}
@Override
public Unit invoke(String str) {
invoke2(str);
return Unit.INSTANCE;
}
public final void invoke2(String str) {
MainActivity.this.setTestState(str);
}
}));
getMainViewModel().isRunning().observe(mainActivity, new MainActivity$sam$androidx_lifecycle_Observer$0(new Function1<Boolean, Unit>() {
{
super(1);
}
@Override
public Unit invoke(Boolean bool) {
invoke2(bool);
return Unit.INSTANCE;
}
public final void invoke2(Boolean isRunning) {
MainRecyclerAdapter adapter;
ActivityMainBinding activityMainBinding;
ActivityMainBinding activityMainBinding2;
ActivityMainBinding activityMainBinding3;
ActivityMainBinding activityMainBinding4;
ActivityMainBinding activityMainBinding5;
ActivityMainBinding activityMainBinding6;
adapter = MainActivity.this.getAdapter();
Intrinsics.checkNotNullExpressionValue(isRunning, "isRunning");
adapter.setRunning(isRunning.booleanValue());
ActivityMainBinding activityMainBinding7 = null;
if (isRunning.booleanValue()) {
if (!Utils.INSTANCE.getDarkModeStatus(MainActivity.this)) {
activityMainBinding6 = MainActivity.this.binding;
if (activityMainBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding6 = null;
}
activityMainBinding6.fab.setImageResource(R.drawable.ic_service_busy);
}
activityMainBinding4 = MainActivity.this.binding;
if (activityMainBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding4 = null;
}
activityMainBinding4.fab.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(MainActivity.this, R.color.fabColorSelected)));
MainActivity mainActivity2 = MainActivity.this;
mainActivity2.setTestState(mainActivity2.getString(R.string.connection_connected));
activityMainBinding5 = MainActivity.this.binding;
if (activityMainBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityMainBinding7 = activityMainBinding5;
}
activityMainBinding7.layoutTest.setFocusable(true);
} else {
if (!Utils.INSTANCE.getDarkModeStatus(MainActivity.this)) {
activityMainBinding3 = MainActivity.this.binding;
if (activityMainBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding3 = null;
}
activityMainBinding3.fab.setImageResource(R.drawable.ic_service_busy);
}
activityMainBinding = MainActivity.this.binding;
if (activityMainBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding = null;
}
activityMainBinding.fab.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(MainActivity.this, R.color.fabColorUnselected)));
MainActivity mainActivity3 = MainActivity.this;
mainActivity3.setTestState(mainActivity3.getString(R.string.connection_not_connected));
activityMainBinding2 = MainActivity.this.binding;
if (activityMainBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityMainBinding7 = activityMainBinding2;
}
activityMainBinding7.layoutTest.setFocusable(false);
}
MainActivity.this.hideCircle();
}
}));
getMainViewModel().startListenBroadcast();
}
private final void showFileChooser() {
Intent intent = new Intent("android.intent.action.GET_CONTENT");
intent.setType("*/*");
intent.addCategory("android.intent.category.OPENABLE");
try {
this.chooseFileForCustomConfig.launch(Intent.createChooser(intent, getString(R.string.title_file_chooser)));
} catch (ActivityNotFoundException unused) {
_ExtKt.toast(this, (int) R.string.toast_require_file_manager);
}
}
public void feedback(View view) {
feedbackUrl(this);
}
public final MainViewModel getMainViewModel() {
return (MainViewModel) this.mainViewModel$delegate.getValue();
}
public final void hideCircle() {
try {
Observable<Long> observeOn = Observable.timer(300L, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread());
final Function1<Long, Unit> function1 = new Function1<Long, Unit>() {
{
super(1);
}
@Override
public Unit invoke(Long l) {
invoke2(l);
return Unit.INSTANCE;
}
public final void invoke2(Long l) {
ActivityMainBinding activityMainBinding;
ActivityMainBinding activityMainBinding2;
try {
activityMainBinding = MainActivity.this.binding;
ActivityMainBinding activityMainBinding3 = null;
if (activityMainBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding = null;
}
if (activityMainBinding.fabProgressCircle.isShown()) {
activityMainBinding2 = MainActivity.this.binding;
if (activityMainBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityMainBinding3 = activityMainBinding2;
}
activityMainBinding3.fabProgressCircle.hide();
}
} catch (Exception e) {
Log.w("com.v2ray.ang", e);
}
}
};
observeOn.subscribe(new Action1() {
@Override
public final void call(Object obj) {
MainActivity.hideCircle$lambda$15(Function1.this, obj);
}
});
} catch (Exception e) {
Log.d("com.v2ray.ang", e.toString());
}
}
public final void importBatchConfig(String str, String subid) {
Intrinsics.checkNotNullParameter(subid, "subid");
String str2 = subid;
if (str2.length() == 0) {
subid = getMainViewModel().getSubscriptionId();
}
boolean z = str2.length() == 0;
int importBatchConfig = AngConfigManager.INSTANCE.importBatchConfig(str, subid, z);
if (importBatchConfig <= 0) {
AngConfigManager angConfigManager = AngConfigManager.INSTANCE;
Utils utils = Utils.INSTANCE;
Intrinsics.checkNotNull(str);
importBatchConfig = angConfigManager.importBatchConfig(utils.decode(str), subid, z);
}
if (importBatchConfig <= 0) {
_ExtKt.toast(this, (int) R.string.toast_failure);
return;
}
_ExtKt.toast(this, (int) R.string.toast_success);
getMainViewModel().reloadServerList();
}
public final boolean importClipboard() {
try {
importBatchConfig$default(this, Utils.INSTANCE.getClipboard(this), null, 2, null);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public final boolean importConfigCustomClipboard() {
try {
String clipboard = Utils.INSTANCE.getClipboard(this);
if (TextUtils.isEmpty(clipboard)) {
_ExtKt.toast(this, (int) R.string.toast_none_data_clipboard);
return false;
}
importCustomizeConfig(clipboard);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public final boolean importConfigCustomLocal() {
try {
showFileChooser();
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public final boolean importConfigCustomUrl(String str) {
try {
if (Utils.INSTANCE.isValidUrl(str)) {
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), Dispatchers.getIO(), null, new MainActivity$importConfigCustomUrl$1(str, this, null), 2, null);
return true;
}
_ExtKt.toast(this, (int) R.string.toast_invalid_url);
return false;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public final boolean importConfigCustomUrlClipboard() {
try {
String clipboard = Utils.INSTANCE.getClipboard(this);
if (TextUtils.isEmpty(clipboard)) {
_ExtKt.toast(this, (int) R.string.toast_none_data_clipboard);
return false;
}
return importConfigCustomUrl(clipboard);
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public final boolean importConfigViaSub() {
try {
_ExtKt.toast(this, (int) R.string.title_sub_update);
Iterator<T> it = MmkvManager.INSTANCE.decodeSubscriptions().iterator();
while (it.hasNext()) {
Pair pair = (Pair) it.next();
if (!TextUtils.isEmpty((CharSequence) pair.getFirst()) && !TextUtils.isEmpty(((SubscriptionItem) pair.getSecond()).getRemarks()) && !TextUtils.isEmpty(((SubscriptionItem) pair.getSecond()).getUrl()) && ((SubscriptionItem) pair.getSecond()).getEnabled()) {
String idnToASCII = Utils.INSTANCE.idnToASCII(((SubscriptionItem) pair.getSecond()).getUrl());
if (Utils.INSTANCE.isValidUrl(idnToASCII)) {
Log.d("com.v2ray.ang", idnToASCII);
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), Dispatchers.getIO(), null, new MainActivity$importConfigViaSub$1$1(idnToASCII, this, pair, null), 2, null);
}
}
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public final void importCustomizeConfig(String str) {
if (str != null) {
try {
if (!TextUtils.isEmpty(str)) {
getMainViewModel().appendCustomConfigServer(str);
getMainViewModel().reloadServerList();
_ExtKt.toast(this, (int) R.string.toast_success);
return;
}
} catch (Exception e) {
MainActivity mainActivity = this;
StringBuilder sb = new StringBuilder();
sb.append(getString(R.string.toast_malformed_josn));
sb.append(' ');
Throwable cause = e.getCause();
sb.append(cause != null ? cause.getMessage() : null);
ToastCompat.makeText((Context) mainActivity, (CharSequence) sb.toString(), 1).show();
e.printStackTrace();
return;
}
}
_ExtKt.toast(this, (int) R.string.toast_none_data);
}
public final boolean importQRcode(final boolean z) {
Observable<Boolean> request = new RxPermissions(this).request("android.permission.CAMERA");
final Function1<Boolean, Unit> function1 = new Function1<Boolean, Unit>() {
{
super(1);
}
@Override
public Unit invoke(Boolean bool) {
invoke2(bool);
return Unit.INSTANCE;
}
public final void invoke2(Boolean it) {
ActivityResultLauncher activityResultLauncher;
ActivityResultLauncher activityResultLauncher2;
Intrinsics.checkNotNullExpressionValue(it, "it");
if (!it.booleanValue()) {
_ExtKt.toast(this, (int) R.string.toast_permission_denied);
} else if (z) {
activityResultLauncher2 = this.scanQRCodeForConfig;
activityResultLauncher2.launch(new Intent(this, ScannerActivity.class));
} else {
activityResultLauncher = this.scanQRCodeForUrlToCustomConfig;
activityResultLauncher.launch(new Intent(this, ScannerActivity.class));
}
}
};
request.subscribe(new Action1() {
@Override
public final void call(Object obj) {
MainActivity.importQRcode$lambda$9(Function1.this, obj);
}
});
return true;
}
public boolean isStoragePermissionGranted() {
if (Build.VERSION.SDK_INT >= 23 && checkSelfPermission("android.permission.WRITE_EXTERNAL_STORAGE") != 0) {
ActivityCompat.requestPermissions(this, new String[]{"android.permission.WRITE_EXTERNAL_STORAGE"}, 1);
}
return false;
}
public void logcat(View view) {
startActivity(new Intent(this, LogcatActivity.class));
}
@Override
@Deprecated(message = "Deprecated in Java")
public void onBackPressed() {
ActivityMainBinding activityMainBinding = this.binding;
ActivityMainBinding activityMainBinding2 = null;
if (activityMainBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding = null;
}
if (!activityMainBinding.drawerLayout.isDrawerOpen(GravityCompat.START)) {
getOnBackPressedDispatcher().onBackPressed();
return;
}
ActivityMainBinding activityMainBinding3 = this.binding;
if (activityMainBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityMainBinding2 = activityMainBinding3;
}
activityMainBinding2.drawerLayout.closeDrawer(GravityCompat.START);
}
@Override
public void onCreate(Bundle bundle) {
isStoragePermissionGranted();
super.onCreate(bundle);
ActivityMainBinding inflate = ActivityMainBinding.inflate(getLayoutInflater());
Intrinsics.checkNotNullExpressionValue(inflate, "inflate(layoutInflater)");
this.binding = inflate;
ActivityMainBinding activityMainBinding = null;
if (inflate == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
inflate = null;
}
DrawerLayout root = inflate.getRoot();
Intrinsics.checkNotNullExpressionValue(root, "binding.root");
setContentView(root);
setTitle(getString(R.string.app_name));
ActivityMainBinding activityMainBinding2 = this.binding;
if (activityMainBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding2 = null;
}
setSupportActionBar(activityMainBinding2.toolbar);
ActivityMainBinding activityMainBinding3 = this.binding;
if (activityMainBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding3 = null;
}
activityMainBinding3.fab.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.onCreate$lambda$1(MainActivity.this, view);
}
});
ActivityMainBinding activityMainBinding4 = this.binding;
if (activityMainBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding4 = null;
}
activityMainBinding4.layoutTest.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.onCreate$lambda$2(MainActivity.this, view);
}
});
ActivityMainBinding activityMainBinding5 = this.binding;
if (activityMainBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding5 = null;
}
activityMainBinding5.recyclerView.setHasFixedSize(true);
ActivityMainBinding activityMainBinding6 = this.binding;
if (activityMainBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding6 = null;
}
activityMainBinding6.recyclerView.setLayoutManager(new LinearLayoutManager(this));
ActivityMainBinding activityMainBinding7 = this.binding;
if (activityMainBinding7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding7 = null;
}
activityMainBinding7.recyclerView.setAdapter(getAdapter());
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new SimpleItemTouchHelperCallback(getAdapter()));
this.mItemTouchHelper = itemTouchHelper;
ActivityMainBinding activityMainBinding8 = this.binding;
if (activityMainBinding8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding8 = null;
}
itemTouchHelper.attachToRecyclerView(activityMainBinding8.recyclerView);
MainActivity mainActivity = this;
ActivityMainBinding activityMainBinding9 = this.binding;
if (activityMainBinding9 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding9 = null;
}
DrawerLayout drawerLayout = activityMainBinding9.drawerLayout;
ActivityMainBinding activityMainBinding10 = this.binding;
if (activityMainBinding10 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding10 = null;
}
ActionBarDrawerToggle actionBarDrawerToggle = new ActionBarDrawerToggle(mainActivity, drawerLayout, activityMainBinding10.toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
ActivityMainBinding activityMainBinding11 = this.binding;
if (activityMainBinding11 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding11 = null;
}
activityMainBinding11.drawerLayout.addDrawerListener(actionBarDrawerToggle);
actionBarDrawerToggle.syncState();
ActivityMainBinding activityMainBinding12 = this.binding;
if (activityMainBinding12 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding12 = null;
}
activityMainBinding12.navView.setNavigationItemSelectedListener(this);
String str = "v1.8.12 (" + SpeedtestUtil.INSTANCE.getLibVersion() + ')';
ActivityMainBinding activityMainBinding13 = this.binding;
if (activityMainBinding13 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityMainBinding = activityMainBinding13;
}
activityMainBinding.version.setText(str);
setupViewModel();
copyAssets();
migrateLegacy();
if (Build.VERSION.SDK_INT >= 33) {
Observable<Boolean> request = new RxPermissions(mainActivity).request("android.permission.POST_NOTIFICATIONS");
final Function1<Boolean, Unit> function1 = new Function1<Boolean, Unit>() {
{
super(1);
}
@Override
public Unit invoke(Boolean bool) {
invoke2(bool);
return Unit.INSTANCE;
}
public final void invoke2(Boolean bool) {
if (bool.booleanValue()) {
return;
}
_ExtKt.toast(MainActivity.this, (int) R.string.toast_permission_denied);
}
};
request.subscribe(new Action1() {
@Override
public final void call(Object obj) {
MainActivity.onCreate$lambda$4(Function1.this, obj);
}
});
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
Intrinsics.checkNotNullParameter(menu, "menu");
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onKeyDown(int i, KeyEvent event) {
Intrinsics.checkNotNullParameter(event, "event");
if (i == 4 || i == 97) {
moveTaskToBack(false);
return true;
}
return super.onKeyDown(i, event);
}
@Override
public boolean onNavigationItemSelected(MenuItem item) {
Intrinsics.checkNotNullParameter(item, "item");
switch (item.getItemId()) {
case R.id.feedback:
Utils.INSTANCE.openUri(this, AppConfig.v2rayNGIssues);
break;
case R.id.logcat:
startActivity(new Intent(this, LogcatActivity.class));
break;
case R.id.privacy_policy:
Utils.INSTANCE.openUri(this, AppConfig.v2rayNGPrivacyPolicy);
break;
case R.id.promotion:
Utils.INSTANCE.openUri(this, Utils.INSTANCE.decode(AppConfig.promotionUrl) + "?t=" + System.currentTimeMillis());
break;
case R.id.settings:
startActivity(new Intent(this, SettingsActivity.class).putExtra("isRunning", Intrinsics.areEqual((Object) getMainViewModel().isRunning().getValue(), (Object) true)));
break;
case R.id.sub_setting:
startActivity(new Intent(this, SubSettingActivity.class));
break;
case R.id.user_asset_setting:
startActivity(new Intent(this, UserAssetActivity.class));
break;
}
ActivityMainBinding activityMainBinding = this.binding;
if (activityMainBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding = null;
}
activityMainBinding.drawerLayout.closeDrawer(GravityCompat.START);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
Intrinsics.checkNotNullParameter(item, "item");
int itemId = item.getItemId();
switch (itemId) {
case R.id.del_all_config:
new AlertDialog.Builder(this).setMessage(R.string.del_config_comfirm).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
MainActivity.onOptionsItemSelected$lambda$6(MainActivity.this, dialogInterface, i);
}
}).show();
return true;
case R.id.export_all:
MainActivity mainActivity = this;
if (AngConfigManager.INSTANCE.shareNonCustomConfigsToClipboard(mainActivity, getMainViewModel().getServerList()) == 0) {
_ExtKt.toast(mainActivity, (int) R.string.toast_success);
return true;
}
_ExtKt.toast(mainActivity, (int) R.string.toast_failure);
return true;
case R.id.filter_config:
getMainViewModel().filterConfig(this);
return true;
case R.id.import_qrcode:
importQRcode(true);
return true;
case R.id.ping_all:
getMainViewModel().testAllTcping();
return true;
case R.id.real_ping_all:
getMainViewModel().testAllRealPing();
return true;
case R.id.service_restart:
restartV2Ray();
return true;
case R.id.sort_by_test_results:
MmkvManager.INSTANCE.sortByTestResults();
getMainViewModel().reloadServerList();
return true;
case R.id.sub_update:
importConfigViaSub();
return true;
default:
switch (itemId) {
case R.id.del_duplicate_config:
new AlertDialog.Builder(this).setMessage(R.string.del_config_comfirm).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
MainActivity.onOptionsItemSelected$lambda$7(MainActivity.this, dialogInterface, i);
}
}).show();
return true;
case R.id.del_invalid_config:
new AlertDialog.Builder(this).setMessage(R.string.del_config_comfirm).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
MainActivity.onOptionsItemSelected$lambda$8(MainActivity.this, dialogInterface, i);
}
}).show();
return true;
default:
switch (itemId) {
case R.id.import_clipboard:
importClipboard();
return true;
case R.id.import_config_custom_clipboard:
importConfigCustomClipboard();
return true;
case R.id.import_config_custom_local:
importConfigCustomLocal();
return true;
case R.id.import_config_custom_url:
importConfigCustomUrlClipboard();
return true;
case R.id.import_config_custom_url_scan:
importQRcode(false);
return true;
case R.id.import_manually_socks:
importManually(EConfigType.SOCKS.getValue());
return true;
case R.id.import_manually_ss:
importManually(EConfigType.SHADOWSOCKS.getValue());
return true;
case R.id.import_manually_trojan:
importManually(EConfigType.TROJAN.getValue());
return true;
case R.id.import_manually_vless:
importManually(EConfigType.VLESS.getValue());
return true;
case R.id.import_manually_vmess:
importManually(EConfigType.VMESS.getValue());
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}
}
@Override
public void onPause() {
super.onPause();
}
@Override
public void onResume() {
super.onResume();
getMainViewModel().reloadServerList();
}
public void privacy_policy(View view) {
privacyUrl(this);
}
public void promotion(View view) {
promotionUrl(this);
}
public final void restartV2Ray() {
if (Intrinsics.areEqual((Object) getMainViewModel().isRunning().getValue(), (Object) true)) {
Utils.INSTANCE.stopVService(this);
}
Observable<Long> observeOn = Observable.timer(500L, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread());
final Function1<Long, Unit> function1 = new Function1<Long, Unit>() {
{
super(1);
}
@Override
public Unit invoke(Long l) {
invoke2(l);
return Unit.INSTANCE;
}
public final void invoke2(Long l) {
MainActivity.this.startV2Ray();
}
};
observeOn.subscribe(new Action1() {
@Override
public final void call(Object obj) {
MainActivity.restartV2Ray$lambda$5(Function1.this, obj);
}
});
}
public final void setTestState(String str) {
ActivityMainBinding activityMainBinding = this.binding;
if (activityMainBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding = null;
}
activityMainBinding.tvTestState.setText(str);
}
public void settings(View view) {
startActivity(new Intent(this, SettingsActivity.class));
}
public final void showCircle() {
ActivityMainBinding activityMainBinding = this.binding;
if (activityMainBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding = null;
}
activityMainBinding.fabProgressCircle.show();
}
public final void startV2Ray() {
MMKV mainStorage = getMainStorage();
String decodeString = mainStorage != null ? mainStorage.decodeString(MmkvManager.KEY_SELECTED_SERVER) : null;
if (decodeString == null || decodeString.length() == 0) {
return;
}
showCircle();
V2RayServiceManager.INSTANCE.startV2Ray(this);
hideCircle();
}
public void sub_setting(View view) {
startActivity(new Intent(this, SubSettingActivity.class));
}
public void user_asset_setting(View view) {
startActivity(new Intent(this, UserAssetActivity.class));
}
public void uwu_activity_about(View view) {
startActivity(new Intent(this, About.class));
}
public void uwu_host_to_ip(View view) {
startActivity(new Intent(this, HostToIp.class));
}
public void uwu_hostname_finder(View view) {
startActivity(new Intent(this, HostnameFinder.class));
}
public void uwu_hotspot_shared(View view) {
startActivity(new Intent(this, ProxySettings.class));
}
public void uwu_ip_location(View view) {
startActivity(new Intent(this, IpLocation.class));
}
public void uwu_modder(View view) {
modderUrl(this);
}
public void uwu_network_switcher(View view) {
startActivity(new Intent(this, NetworkSwitcher.class));
}
public void uwu_speed_test(View view) {
startActivity(new Intent(this, SpeedTestActivity.class));
}
}