CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 AboutAppActivity.java 源代码,内容仅作参考
package org.godfootsteps.more;
import android.content.res.Configuration;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.lifecycle.MutableLiveData;
import com.blankj.utilcode.util.NetworkUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.google.android.gms.common.ConnectionResult;
import d.a.a.a.j;
import d.c.a.g.e;
import d.c.a.i.b;
import d.c.a.j.s;
import d.c.a.j.v;
import d.c.g.l3.k;
import i.c.a.c.a0;
import i.c.a.c.y;
import i.j.a.e.t.d;
import java.util.Arrays;
import java.util.Locale;
import java.util.Objects;
import kotlin.Metadata;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import n.c;
import n.i.a.l;
import n.i.a.p;
import n.i.b.h;
import org.godfootsteps.arch.api.AppClient;
import org.godfootsteps.arch.api.model.BaseModel;
import org.godfootsteps.arch.api.model.UpdateInfoModel;
import org.godfootsteps.arch.api.util.Request;
import org.godfootsteps.arch.app.AppUpdater;
import org.godfootsteps.arch.app.MainViewModel;
import org.godfootsteps.arch.base.BaseActivity;
import org.godfootsteps.arch.base.BaseMainActivity;
import org.godfootsteps.arch.util.GAEventSendUtil;
import org.godfootsteps.arch.view.DotTextView;
import org.godfootsteps.more.AboutAppActivity;
import org.godfootsteps.more.LicenseActivity;
import org.godfootsteps.more.R$id;
import org.godfootsteps.more.R$string;
@Metadata(d1 = {"\u0000@\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\u0010\t\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\r\u001a\u00020\u000eH\u0014J\b\u0010\u000f\u001a\u00020\u0010H\u0014J\b\u0010\u0011\u001a\u00020\u0010H\u0014J\u0010\u0010\u0012\u001a\u00020\u00102\u0006\u0010\u0013\u001a\u00020\u0014H\u0016R\u001b\u0010\u0003\u001a\u00020\u00048BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\u0005\u0010\u0006R\u0010\u0010\t\u001a\u0004\u0018\u00010\nX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\fX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u0015²\u0006\n\u0010\u0016\u001a\u00020\u0017X\u008a\u0084\u0002²\u0006\n\u0010\u0018\u001a\u00020\u0019X\u008a\u0084\u0002"}, d2 = {"Lorg/godfootsteps/more/AboutAppActivity;", "Lorg/godfootsteps/arch/base/BaseActivity;", "()V", "progressDialog", "Lorg/godfootsteps/arch/dialog/LoadingDialog;", "getProgressDialog", "()Lorg/godfootsteps/arch/dialog/LoadingDialog;", "progressDialog$delegate", "Lkotlin/Lazy;", "screenAdapt", "Lorg/commons/screenadapt/adapt/ScreenAdapt;", "showTime", "", "getLayoutId", "", "initData", "", "initView", "onConfigurationChanged", "newConfig", "Landroid/content/res/Configuration;", "more_release", "scoreUtil", "Lorg/godfootsteps/more/util/ScoreUtil;", "appUpdater", "Lorg/godfootsteps/arch/app/AppUpdater;"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class AboutAppActivity extends BaseActivity {
public static final int f15924n = 0;
public final c f15925k = d.n3(new n.i.a.a<e>() {
{
super(0);
}
@Override
public final e invoke() {
return new e(AboutAppActivity.this);
}
});
public j f15926l;
public long f15927m;
@Metadata(d1 = {"\u0000\u0013\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016J\b\u0010\u0004\u001a\u00020\u0003H\u0016¨\u0006\u0005"}, d2 = {"org/godfootsteps/more/AboutAppActivity$initView$8", "Lorg/godfootsteps/arch/app/AppUpdater$VersionCheckListener;", "onCanceled", "", "onUpdateNotice", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public static final class a implements AppUpdater.b {
public final c<AppUpdater> b;
public a(c<AppUpdater> cVar) {
this.b = cVar;
}
@Override
public void a() {
long currentTimeMillis = System.currentTimeMillis();
final AboutAppActivity aboutAppActivity = AboutAppActivity.this;
long j2 = currentTimeMillis - aboutAppActivity.f15927m;
if (j2 < 1500) {
final c<AppUpdater> cVar = this.b;
a0.a.postDelayed(new Runnable() {
@Override
public final void run() {
AboutAppActivity aboutAppActivity2 = AboutAppActivity.this;
n.c cVar2 = cVar;
n.i.b.h.e(aboutAppActivity2, "this$0");
n.i.b.h.e(cVar2, "$appUpdater$delegate");
d.c.a.g.e eVar = (d.c.a.g.e) aboutAppActivity2.f15925k.getValue();
if (eVar != null) {
eVar.a();
}
((AppUpdater) cVar2.getValue()).m();
}
}, ((long) ConnectionResult.DRIVE_EXTERNAL_STORAGE_REQUIRED) - j2);
return;
}
e eVar = (e) aboutAppActivity.f15925k.getValue();
if (eVar != null) {
eVar.a();
}
AboutAppActivity.Z(this.b).m();
}
@Override
public void onCanceled() {
long currentTimeMillis = System.currentTimeMillis();
final AboutAppActivity aboutAppActivity = AboutAppActivity.this;
long j2 = currentTimeMillis - aboutAppActivity.f15927m;
if (j2 < 1500) {
final c<AppUpdater> cVar = this.b;
a0.a.postDelayed(new Runnable() {
@Override
public final void run() {
AboutAppActivity aboutAppActivity2 = AboutAppActivity.this;
n.c cVar2 = cVar;
n.i.b.h.e(aboutAppActivity2, "this$0");
n.i.b.h.e(cVar2, "$appUpdater$delegate");
d.c.a.g.e eVar = (d.c.a.g.e) aboutAppActivity2.f15925k.getValue();
if (eVar != null) {
eVar.a();
}
AppUpdater appUpdater = (AppUpdater) cVar2.getValue();
if (appUpdater.f15186k < appUpdater.f15190o.o()) {
return;
}
ToastUtils.b(R$string.check_update_already_latest);
}
}, ((long) ConnectionResult.DRIVE_EXTERNAL_STORAGE_REQUIRED) - j2);
return;
}
((e) aboutAppActivity.f15925k.getValue()).a();
AppUpdater Z = AboutAppActivity.Z(this.b);
if (Z.f15186k < Z.f15190o.o()) {
return;
}
ToastUtils.b(R$string.check_update_already_latest);
}
}
public static final AppUpdater Z(c cVar) {
return (AppUpdater) cVar.getValue();
}
@Override
public int Q() {
return R$layout.activity_about_app;
}
@Override
public void R() {
}
@Override
public void W() {
if (v.i()) {
j jVar = new j();
int i2 = 3;
int childCount = ((LinearLayout) findViewById(R$id.ll_content)).getChildCount();
if (3 < childCount) {
while (true) {
int i3 = i2 + 1;
View childAt = ((LinearLayout) findViewById(R$id.ll_content)).getChildAt(i2);
if (childAt instanceof TextView) {
jVar.b(new b(childAt, 64.0f, 0.0f, 4));
} else {
h.d(childAt, "view");
jVar.b(new d.c.a.i.a(childAt, 64.0f, 0.0f, 4));
}
if (i3 >= childCount) {
break;
}
i2 = i3;
}
}
jVar.c();
this.f15926l = jVar;
} else {
int i4 = R$id.iv_logo;
((ImageView) findViewById(i4)).getLayoutParams().width = (int) (y.L() * 0.238f);
((ImageView) findViewById(i4)).getLayoutParams().height = ((ImageView) findViewById(i4)).getLayoutParams().width;
((ImageView) findViewById(i4)).requestLayout();
}
((Toolbar) findViewById(R$id.toolbar)).setNavigationOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAppActivity aboutAppActivity = AboutAppActivity.this;
int i5 = AboutAppActivity.f15924n;
n.i.b.h.e(aboutAppActivity, "this$0");
aboutAppActivity.onBackPressed();
}
});
Locale g2 = s.g();
String string = getResources().getString(R$string.settings_version);
h.d(string, "resources.getString(resId)");
String format = String.format(g2, "%s%s", Arrays.copyOf(new Object[]{string, i.c.a.c.c.b()}, 2));
h.d(format, "format(locale, format, *args)");
((TextView) findViewById(R$id.tv_app_version)).setText(format);
final c n3 = d.n3(new n.i.a.a<k>() {
@Override
public final k invoke() {
return new k();
}
});
((TextView) findViewById(R$id.tv_score)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAppActivity aboutAppActivity = AboutAppActivity.this;
n.c cVar = n3;
int i5 = AboutAppActivity.f15924n;
n.i.b.h.e(aboutAppActivity, "this$0");
n.i.b.h.e(cVar, "$scoreUtil$delegate");
((d.c.g.l3.k) cVar.getValue()).o(aboutAppActivity);
GAEventSendUtil.a.k("侧边栏给我们评分", null);
}
});
((TextView) findViewById(R$id.tv_terms)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
int i5 = AboutAppActivity.f15924n;
String C = d.c.a.m.a.C();
n.i.b.h.d(C, "getTermsUrl()");
n.m.t.a.p.m.e1.a.O1(C);
GAEventSendUtil.a.k("侧边栏使用条款", null);
}
});
((TextView) findViewById(R$id.tv_privacy)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
int i5 = AboutAppActivity.f15924n;
String z = d.c.a.m.a.z();
n.i.b.h.d(z, "getPrivacyUrl()");
n.m.t.a.p.m.e1.a.O1(z);
GAEventSendUtil.a.k("侧边栏隐私权政策", null);
}
});
((TextView) findViewById(R$id.tv_open_source)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
int i5 = AboutAppActivity.f15924n;
e.c0.a.k0(LicenseActivity.class);
GAEventSendUtil.a.k("侧边栏开放原始码授权", null);
}
});
((TextView) findViewById(R$id.tv_3rd_source)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
int i5 = AboutAppActivity.f15924n;
Objects.requireNonNull(AppClient.a);
n.m.t.a.p.m.e1.a.O1(n.i.b.h.j("https://appservercn.kingdomsalvation.org", "/terms/source.html"));
GAEventSendUtil.a.k("侧边栏第三方资料来源", null);
}
});
final c n32 = d.n3(new n.i.a.a<AppUpdater>() {
{
super(0);
}
@Override
public final AppUpdater invoke() {
return new AppUpdater(AboutAppActivity.this);
}
});
int i5 = R$id.tv_update;
AppUpdater.a aVar = ((AppUpdater) n32.getValue()).f15190o;
((DotTextView) findViewById(i5)).setHasDot(aVar.f15199u.a(aVar, AppUpdater.a.f15191v[7]));
((AppUpdater) n32.getValue()).f15189n = new a(n32);
((DotTextView) findViewById(i5)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainViewModel Z;
AboutAppActivity aboutAppActivity = AboutAppActivity.this;
n.c cVar = n32;
int i6 = AboutAppActivity.f15924n;
n.i.b.h.e(aboutAppActivity, "this$0");
n.i.b.h.e(cVar, "$appUpdater$delegate");
AppUpdater.a aVar2 = ((AppUpdater) cVar.getValue()).f15190o;
aVar2.f15199u.b(aVar2, AppUpdater.a.f15191v[7], false);
BaseMainActivity b = d.c.a.j.v.b();
MutableLiveData<Boolean> mutableLiveData = (b == null || (Z = b.Z()) == null) ? null : Z.c;
if (mutableLiveData != null) {
mutableLiveData.l(Boolean.FALSE);
}
((DotTextView) aboutAppActivity.findViewById(R$id.tv_update)).setHasDot(false);
aboutAppActivity.f15927m = System.currentTimeMillis();
((d.c.a.g.e) aboutAppActivity.f15925k.getValue()).b();
final AppUpdater appUpdater = (AppUpdater) cVar.getValue();
appUpdater.f15188m = true;
if (NetworkUtils.c()) {
n.m.t.a.p.m.e1.a.f2(new n.i.a.l<Request<UpdateInfoModel, BaseModel<UpdateInfoModel>>, n.e>() {
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001H\u008a@"}, d2 = {"<anonymous>", "Lorg/godfootsteps/arch/api/model/BaseModel;", "Lorg/godfootsteps/arch/api/model/UpdateInfoModel;"}, k = 3, mv = {1, 5, 1}, xi = 48)
@n.g.f.a.c(c = "org.godfootsteps.arch.app.AppUpdater$refreshData$1$1", f = "AppUpdater.kt", l = {285}, m = "invokeSuspend")
public static final class AnonymousClass1 extends SuspendLambda implements l<n.g.c<? super BaseModel<UpdateInfoModel>>, Object> {
public int label;
public AnonymousClass1(n.g.c<? super AnonymousClass1> cVar) {
super(1, cVar);
}
@Override
public final n.g.c<n.e> create(n.g.c<?> cVar) {
return new AnonymousClass1(cVar);
}
@Override
public final Object invoke(n.g.c<? super BaseModel<UpdateInfoModel>> cVar) {
return ((AnonymousClass1) create(cVar)).invokeSuspend(n.e.a);
}
@Override
public final Object invokeSuspend(Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
int i2 = this.label;
if (i2 == 0) {
d.Q4(obj);
Objects.requireNonNull(AppClient.a);
AppClient appClient = AppClient.Companion.f15176d;
this.label = 1;
obj = appClient.e0("android", this);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i2 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
d.Q4(obj);
}
return obj;
}
}
{
super(1);
}
@Override
public n.e invoke(Request<UpdateInfoModel, BaseModel<UpdateInfoModel>> request) {
invoke2(request);
return n.e.a;
}
public final void invoke2(Request<UpdateInfoModel, BaseModel<UpdateInfoModel>> request) {
h.e(request, "$this$request");
request.f(new AnonymousClass1(null));
final AppUpdater appUpdater2 = AppUpdater.this;
request.f15180l = new l<UpdateInfoModel, n.e>() {
{
super(1);
}
@Override
public n.e invoke(UpdateInfoModel updateInfoModel) {
invoke2(updateInfoModel);
return n.e.a;
}
public final void invoke2(UpdateInfoModel updateInfoModel) {
h.e(updateInfoModel, "model");
AppUpdater.this.k(updateInfoModel);
}
};
final AppUpdater appUpdater3 = AppUpdater.this;
request.f15181m = new p<Integer, String, n.e>() {
{
super(2);
}
@Override
public n.e invoke(Integer num, String str) {
invoke(num.intValue(), str);
return n.e.a;
}
public final void invoke(int i7, String str) {
h.e(str, "$noName_1");
AppUpdater.this.k(null);
}
};
}
});
} else {
appUpdater.f();
}
GAEventSendUtil.a.k("侧边栏检查更新", null);
}
});
}
@Override
public void onConfigurationChanged(Configuration configuration) {
h.e(configuration, "newConfig");
super.onConfigurationChanged(configuration);
j jVar = this.f15926l;
if (jVar == null) {
return;
}
jVar.c();
}
}