正在查看: CashVia v1.6.02 应用的 MainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CashVia v1.6.02 应用的 MainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.xy.credyclub.view;
import A2.C0014d;
import B2.e;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.lifecycle.ViewModelLazy;
import com.sensorsdata.analytics.android.sdk.data.SAProviderHelper;
import com.sensorsdata.analytics.android.sdk.data.adapter.DbParams;
import com.xy.credyclub.base.XYBaseFragment;
import com.xy.credyclub.databinding.ActivityMainBinding;
import com.xy.credyclub.repository.response.LoanApplyResp;
import com.xy.credyclub.service.LocationService;
import com.xy.credyclub.view.account.MineFragment;
import com.xy.credyclub.view.product.ProductListFragment;
import com.xy.credyclub.vm.HomeViewModel;
import com.xy.credyclub.vm.LoginViewModel;
import java.io.Serializable;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.jvm.internal.SourceDebugExtension;
import q2.AbstractC0259f;
import t2.a;
import u2.j;
import v2.C0289d;
import v2.C0296k;
import v2.C0297l;
import v2.C0298m;
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/xy/credyclub/view/MainActivity;", "Lcom/xy/credyclub/base/XYBaseActivity;", "<init>", "()V", "app_prodRelease"}, k = 1, mv = {1, SAProviderHelper.URI_CODE.FLUSH_DATA, 0})
@SourceDebugExtension({"SMAP\nMainActivity.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MainActivity.kt\ncom/xy/credyclub/view/MainActivity\n+ 2 ActivityViewModelLazy.kt\nandroidx/activity/ActivityViewModelLazyKt\n*L\n1#1,141:1\n75#2,13:142\n75#2,13:155\n*S KotlinDebug\n*F\n+ 1 MainActivity.kt\ncom/xy/credyclub/view/MainActivity\n*L\n42#1:142,13\n43#1:155,13\n*E\n"})
public final class MainActivity extends Hilt_MainActivity {
public static final int z = 0;
public ActivityMainBinding i;
public View v;
public a y;
public final ProductListFragment t = new ProductListFragment();
public final MineFragment u = new MineFragment();
public final ViewModelLazy w = new ViewModelLazy(Reflection.getOrCreateKotlinClass(HomeViewModel.class), new e(this, 14), new C0297l(this), new e(this, 15));
public final ViewModelLazy x = new ViewModelLazy(Reflection.getOrCreateKotlinClass(LoginViewModel.class), new e(this, 16), new C0298m(this), new e(this, 17));
@Override
public final void o(int i) {
if (i == 120) {
((HomeViewModel) this.w.getValue()).n.setValue(Integer.valueOf(i));
} else {
super.o(i);
}
}
@Override
public final void onCreate(Bundle bundle) {
Serializable serializableExtra;
super.onCreate(bundle);
a aVar = this.y;
ActivityMainBinding activityMainBinding = null;
if (aVar != null) {
unregisterReceiver(aVar);
this.y = null;
}
this.y = new a();
registerReceiver(this.y, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
int i = Build.VERSION.SDK_INT;
ViewModelLazy viewModelLazy = this.w;
if (i >= 33) {
HomeViewModel homeViewModel = (HomeViewModel) viewModelLazy.getValue();
serializableExtra = getIntent().getSerializableExtra(DbParams.KEY_DATA, LoanApplyResp.class);
homeViewModel.e = (LoanApplyResp) serializableExtra;
} else {
Serializable serializableExtra2 = getIntent().getSerializableExtra(DbParams.KEY_DATA);
if (serializableExtra2 != null && (serializableExtra2 instanceof LoanApplyResp)) {
((HomeViewModel) viewModelLazy.getValue()).e = (LoanApplyResp) serializableExtra2;
}
}
ViewDataBinding contentView = DataBindingUtil.setContentView(this, 2131492902);
Intrinsics.checkNotNullExpressionValue(contentView, "setContentView(...)");
this.i = (ActivityMainBinding) contentView;
q();
ActivityMainBinding activityMainBinding2 = this.i;
if (activityMainBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding2 = null;
}
LinearLayout llHome = activityMainBinding2.a;
Intrinsics.checkNotNullExpressionValue(llHome, "llHome");
j.c(llHome, new C0296k(this, 0));
ActivityMainBinding activityMainBinding3 = this.i;
if (activityMainBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityMainBinding3 = null;
}
LinearLayout llProfile = activityMainBinding3.b;
Intrinsics.checkNotNullExpressionValue(llProfile, "llProfile");
j.c(llProfile, new C0296k(this, 1));
ActivityMainBinding activityMainBinding4 = this.i;
if (activityMainBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityMainBinding = activityMainBinding4;
}
LinearLayout llHome2 = activityMainBinding.a;
Intrinsics.checkNotNullExpressionValue(llHome2, "llHome");
r(llHome2);
com.blankj.utilcode.util.e.b(getSupportFragmentManager(), CollectionsKt.listOf((Object[]) new XYBaseFragment[]{this.t, this.u}));
Intrinsics.checkNotNullParameter(this, "context");
if (j.a) {
startService(new Intent((Context) this, (Class<?>) LocationService.class));
}
String b = AbstractC0259f.b();
if (b == null || b.length() == 0) {
return;
}
((LoginViewModel) this.x.getValue()).a.o().observe(this, new C0014d(15, C0289d.e));
}
public final void onDestroy() {
super.onDestroy();
a aVar = this.y;
if (aVar != null) {
unregisterReceiver(aVar);
this.y = null;
}
}
public final void onNewIntent(Intent intent) {
super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
HomeViewModel.c((HomeViewModel) this.w.getValue(), true, false, false, 6);
}
public final void r(View view) {
if (view.isSelected()) {
return;
}
View view2 = this.v;
if (view2 != null) {
view2.setSelected(false);
}
view.setSelected(true);
this.v = view;
int id = view.getId();
MineFragment mineFragment = this.u;
ProductListFragment productListFragment = this.t;
if (id == 2131296611) {
com.blankj.utilcode.util.e.g(productListFragment, mineFragment);
} else if (view.getId() == 2131296618) {
com.blankj.utilcode.util.e.g(mineFragment, productListFragment);
}
}
}