CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 AboutAPPActivity.java 源代码,内容仅作参考
package ak.im.ui.activity.settings;
import ak.application.AKApplication;
import ak.im.BuildConfig;
import ak.im.module.Server;
import ak.im.module.UpdateBean;
import ak.im.sdk.manager.UpdateManager;
import ak.im.sdk.manager.f1;
import ak.im.ui.activity.SwipeBackActivity;
import ak.im.ui.activity.WebViewActivity;
import ak.im.ui.activity.settings.AboutAPPActivity;
import ak.im.ui.view.UpdateDialog;
import ak.im.uitls.AKCAppConfiguration;
import ak.im.utils.AkeyChatUtils;
import ak.im.utils.n3;
import ak.im.utils.o3;
import ak.im.utils.q5;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.lifecycle.Observer;
import fc.z;
import j.s1;
import j.t1;
import j.u1;
import j.y1;
import java.util.concurrent.TimeUnit;
import mc.g;
public class AboutAPPActivity extends SwipeBackActivity {
private TextView f6750d;
private TextView f6751e;
private UpdateDialog f6755i;
private TextView f6747a = null;
private TextView f6748b = null;
private TextView f6749c = null;
private boolean f6752f = false;
private boolean f6753g = false;
private int f6754h = 0;
public void A(UpdateBean updateBean) {
if (updateBean != null && updateBean.getUpgrade() != 0) {
TextView textView = this.f6751e;
String string = getString(y1.settings_asim_new_version);
UpdateManager.Companion companion = UpdateManager.INSTANCE;
textView.setText(String.format(string, companion.getInstance().getBigVersion(updateBean.getTargetVersion())));
Drawable drawable = getResources().getDrawable(s1.shape_update_dot);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
this.f6751e.setCompoundDrawablePadding(n3.dip2px(8.0f));
this.f6751e.setCompoundDrawables(drawable, null, null, null);
if (this.f6753g) {
if (this.f6755i == null) {
this.f6755i = new UpdateDialog(getMDelegateIBaseActivity());
}
this.f6755i.init();
this.f6753g = false;
companion.getInstance().setHasShownAuto(true);
return;
}
return;
}
this.f6751e.setText(String.format(getString(y1.settings_asim_version), f1.getInstance().getBigVersion()));
this.f6751e.setCompoundDrawables(null, null, null, null);
}
public void B(View view) {
AkeyChatUtils.startOutsideWeb("https://beian.miit.gov.cn", this);
}
private void C() {
if (this.f6755i == null) {
this.f6755i = new UpdateDialog(getMDelegateIBaseActivity());
}
this.f6755i.startCheckVersion(true, "");
this.f6753g = true;
}
@SuppressLint({"CheckResult"})
private void init() {
final String str;
this.f6750d = (TextView) findViewById(t1.service_terms);
this.f6747a = (TextView) findViewById(t1.tv_title_back);
this.f6748b = (TextView) findViewById(t1.asim_name_tv);
TextView textView = (TextView) findViewById(t1.tv_about_asim_version);
this.f6751e = textView;
textView.setText(String.format(getString(y1.settings_asim_version), f1.getInstance().getBigVersion()));
this.f6751e.setCompoundDrawables(null, null, null, null);
this.f6748b.setText(AKApplication.getAppName());
if (f1.getInstance().isProjectMode()) {
String trim = this.f6748b.getText().toString().trim();
this.f6748b.setText(trim + this.context.getString(y1.x_project_mode_x));
}
this.f6747a.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAPPActivity.this.t(view);
}
});
View findViewById = findViewById(t1.ll_update_ver);
if (!AKCAppConfiguration.f9925a.canInAppUpgrade()) {
findViewById.setVisibility(8);
}
findViewById.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAPPActivity.this.u(view);
}
});
View findViewById2 = findViewById(t1.feature_introduce_txt);
findViewById2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAPPActivity.this.v(view);
}
});
TextView textView2 = (TextView) findViewById(t1.tv_agreement);
Server server = f1.getInstance().getServer();
String str2 = "";
if (server != null) {
textView2.setText(getString(y1.agreement_bases, o3.getYear(o3.getRightTime()) + "", server.getProviderName()));
}
findViewById2.setVisibility(8);
this.f6750d.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAPPActivity.this.w(view);
}
});
((TextView) findViewById(t1.tv_privacy)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAPPActivity.this.x(view);
}
});
this.f6749c = (TextView) findViewById(t1.app_ver_txt);
if (!AKApplication.isAppDebug()) {
str = "";
} else {
str = "-D";
}
if (s.a.isFlavor("enterprise") || s.a.isFlavor(BuildConfig.FLAVOR_akProduct)) {
str2 = "-normal";
}
final String str3 = str2;
final String string = getString(y1.app_en_name_in_version);
final String version = f1.getInstance().getVersion();
final String bigVersion = f1.getInstance().getBigVersion();
final int appVersionCode = AKApplication.getAppVersionCode();
this.f6749c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAPPActivity.this.y(string, bigVersion, version, appVersionCode, str, str3, view);
}
});
this.f6749c.setText(string + " " + bigVersion);
if ("check_app_ver".equals(getIntent().getStringExtra("purpose"))) {
this.f6752f = true;
z.timer(1L, TimeUnit.SECONDS, gd.b.io()).observeOn(ic.a.mainThread()).subscribe(new g() {
@Override
public final void accept(Object obj) {
AboutAPPActivity.this.z((Long) obj);
}
});
}
UpdateManager.INSTANCE.getInstance().getUpdateBeanLiveData().observe(this, new Observer() {
@Override
public final void onChanged(Object obj) {
AboutAPPActivity.this.A((UpdateBean) obj);
}
});
findViewById(t1.to_rate).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAPPActivity.this.s(view);
}
});
}
public void p(Dialog dialog, View view) {
dialog.dismiss();
AkeyChatUtils.goToMarket(this);
}
public void q(Dialog dialog, View view) {
dialog.dismiss();
AkeyChatUtils.startChatActivity(this, q5.getJidByName("customerservice"), null, "single", null);
}
public void s(View view) {
final Dialog dialog = new Dialog(this);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
View inflate = getLayoutInflater().inflate(u1.rate_layout_dialog, (ViewGroup) null);
inflate.findViewById(t1.good).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
AboutAPPActivity.this.p(dialog, view2);
}
});
inflate.findViewById(t1.bad).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
AboutAPPActivity.this.q(dialog, view2);
}
});
inflate.findViewById(t1.cancel).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
dialog.dismiss();
}
});
dialog.setContentView(inflate);
dialog.show();
}
public void t(View view) {
finish();
}
public void u(View view) {
C();
}
public void v(View view) {
Intent intent = new Intent(this.context, (Class<?>) WebViewActivity.class);
intent.putExtra("purpose", "0a9605c6e4f5d5b4");
startActivity(intent);
}
public void w(View view) {
Intent intent = new Intent(this.context, (Class<?>) WebViewActivity.class);
intent.putExtra("purpose", "62c151646774c20e");
startActivity(intent);
}
public void x(View view) {
Intent intent = new Intent(this.context, (Class<?>) WebViewActivity.class);
intent.putExtra("purpose", "234fr56gce5gc5t5");
startActivity(intent);
}
public void y(String str, String str2, String str3, int i10, String str4, String str5, View view) {
int i11 = this.f6754h;
if (i11 < 4) {
this.f6754h = i11 + 1;
this.f6749c.setText(str + " " + str2);
return;
}
this.f6749c.setText(str + " " + str3 + "-" + i10 + str4 + str5);
this.f6754h = 0;
}
public void z(Long l10) throws Exception {
C();
}
@Override
public void onCreate(Bundle bundle) {
String str;
requestWindowFeature(1);
super.onCreate(bundle);
setContentView(u1.activity_about_app);
init();
TextView textView = (TextView) findViewById(t1.custom_phone);
String hotline = AKCAppConfiguration.f9925a.hotline();
if (hotline.length() == 0) {
textView.setVisibility(8);
} else {
textView.setText(getString(y1.custom_phone, hotline));
}
TextView textView2 = (TextView) findViewById(t1.record_number);
if (s.a.isFlavor("enterprise")) {
str = "ICP 备案号:浙ICP备15007747号-52A";
} else if (s.a.isFlavor("boxtalk")) {
str = "ICP 备案号:浙ICP备15007747号-53A";
} else if (s.a.isFlavor("gov")) {
str = "ICP 备案号:浙ICP备15007747号-54A";
} else if (s.a.isFlavor("anxintong")) {
str = "ICP 备案号:浙ICP备15007747号-55A";
} else if (s.a.isFlavor(BuildConfig.FLAVOR_akProduct)) {
str = "ICP 备案号:浙ICP备15007747号-56A";
} else if (s.a.isFlavor("zenchat")) {
str = "ICP 备案号:浙ICP备2024058909号-3A";
} else {
str = "";
}
textView2.setText(str);
if (TextUtils.isEmpty(str)) {
textView2.setVisibility(8);
}
textView2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AboutAPPActivity.this.B(view);
}
});
}
@Override
public void onDestroy() {
super.onDestroy();
UpdateDialog updateDialog = this.f6755i;
if (updateDialog != null) {
updateDialog.dismissAll();
}
}
@Override
public void onPause() {
super.onPause();
}
@Override
public void onResume() {
super.onResume();
}
}