CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 AKCAppConfiguration.java 源代码,内容仅作参考
package ak.im.uitls;
import ak.application.AKApplication;
import ak.db.e;
import ak.im.BuildConfig;
import ak.im.module.AkeyChatX509PrivateCA;
import ak.im.module.CountryBean;
import ak.im.module.EnterpriseInfo;
import ak.im.module.IMMessage;
import ak.im.module.UpdateBean;
import ak.im.module.UpdateResult;
import ak.im.module.User;
import ak.im.sdk.manager.UpdateManager;
import ak.im.sdk.manager.f1;
import ak.im.ui.activity.ActivitySupport;
import ak.im.ui.activity.OldActivity;
import ak.im.ui.activity.jr;
import ak.im.ui.view.UpdateDialog;
import ak.im.uitls.AKCAppConfiguration;
import ak.im.utils.AkeyChatUtils;
import ak.im.utils.FileUtil;
import ak.im.utils.HttpURLTools;
import ak.im.utils.Log;
import ak.im.utils.OneTimeCertData;
import ak.im.utils.o3;
import ak.view.AKeyDialog;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.os.LocaleList;
import android.view.View;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.Observer;
import com.google.gson.d;
import j.y1;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import kd.i;
import kd.s;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.u;
import kotlin.jvm.internal.Ref$ObjectRef;
import kotlin.jvm.internal.r;
import kotlin.text.StringsKt__StringsKt;
import kotlin.text.p;
import mc.g;
import org.jetbrains.anko.AnkoAsyncContext;
import org.jetbrains.anko.AsyncKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jivesoftware.smackx.amp.packet.AMPExtension;
import org.jivesoftware.smackx.xhtmlim.XHTMLText;
import org.slf4j.Marker;
import vd.l;
@Metadata(bv = {}, d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u001b\n\u0002\u0010\b\n\u0002\b:\n\u0002\u0010%\n\u0002\b\u0011\bÆ\u0002\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\bt\u0010uJ\u0018\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u0002H\u0002J\u001a\u0010\n\u001a\u0004\u0018\u00010\u00012\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u0007H\u0002J\u0006\u0010\u000b\u001a\u00020\u0005J\u0006\u0010\f\u001a\u00020\u0005J\b\u0010\r\u001a\u0004\u0018\u00010\u0007J\u0006\u0010\u000f\u001a\u00020\u000eJ\u0006\u0010\u0010\u001a\u00020\u000eJ\u001a\u0010\u0012\u001a\u0004\u0018\u00010\u00012\u0006\u0010\b\u001a\u00020\u00072\b\b\u0002\u0010\u0011\u001a\u00020\u0005J\u0006\u0010\u0013\u001a\u00020\u0005J\u0006\u0010\u0014\u001a\u00020\u0005J\u0006\u0010\u0015\u001a\u00020\u0005J\u0006\u0010\u0016\u001a\u00020\u0005J\u0006\u0010\u0017\u001a\u00020\u0005J\u0006\u0010\u0018\u001a\u00020\u0005J\u0006\u0010\u0019\u001a\u00020\u0002J\u0006\u0010\u001a\u001a\u00020\u0005J\u0006\u0010\u001b\u001a\u00020\u0005J\u0006\u0010\u001c\u001a\u00020\u0005J\u000e\u0010\u001e\u001a\u00020\u00052\u0006\u0010\u001d\u001a\u00020\u0007J\u0006\u0010\u001f\u001a\u00020\u0007J\u000e\u0010!\u001a\u00020\u00052\u0006\u0010 \u001a\u00020\u0007J\u0006\u0010\"\u001a\u00020\u0005J\u0006\u0010#\u001a\u00020\u0005J\u0006\u0010$\u001a\u00020\u0005J\u0006\u0010%\u001a\u00020\u0007J\u0006\u0010&\u001a\u00020\u0007J\u0006\u0010'\u001a\u00020\u0007J\u0006\u0010(\u001a\u00020\u0007J\u0006\u0010)\u001a\u00020\u0007J\u0006\u0010+\u001a\u00020*J\u0006\u0010,\u001a\u00020*J\u0006\u0010-\u001a\u00020*J\u0006\u0010.\u001a\u00020*J\u0006\u0010/\u001a\u00020\u0002J\u0006\u00100\u001a\u00020\u0007J\u0006\u00101\u001a\u00020\u0007J\u0006\u00102\u001a\u00020\u0005J\u0006\u00103\u001a\u00020\u0005J\u0006\u00104\u001a\u00020\u0007J\u0006\u00105\u001a\u00020\u0007J\u0006\u00106\u001a\u00020\u0007J\u0006\u00107\u001a\u00020\u0002J\u0006\u00108\u001a\u00020\u0005J\u000e\u00109\u001a\u00020\u00052\u0006\u0010\u001d\u001a\u00020\u0007J\u0006\u0010:\u001a\u00020*J\u0006\u0010;\u001a\u00020\u0002J\u0006\u0010<\u001a\u00020\u0002J\u0006\u0010=\u001a\u00020\u0005J\u0006\u0010>\u001a\u00020\u0005J\u000e\u0010@\u001a\u00020\u00052\u0006\u0010?\u001a\u00020\u0007J\u0006\u0010A\u001a\u00020\u0005J\u0006\u0010B\u001a\u00020\u0005J\u0006\u0010C\u001a\u00020*J\u0006\u0010D\u001a\u00020*J\u0006\u0010E\u001a\u00020*J\u0006\u0010F\u001a\u00020*J\u0006\u0010G\u001a\u00020\u0005J\u0006\u0010H\u001a\u00020\u0005J\u0006\u0010I\u001a\u00020*J\u0006\u0010J\u001a\u00020*J\u0006\u0010K\u001a\u00020\u0005J\u0006\u0010L\u001a\u00020\u0005J\u0006\u0010M\u001a\u00020\u0005J\u0006\u0010N\u001a\u00020\u0005J\u0006\u0010O\u001a\u00020\u0005J\u0006\u0010P\u001a\u00020\u0007J\u0006\u0010Q\u001a\u00020\u0007J\u0006\u0010R\u001a\u00020\u0007J\u0006\u0010S\u001a\u00020\u0007J\u0006\u0010T\u001a\u00020\u0007J\u0006\u0010U\u001a\u00020\u0007J\u0006\u0010V\u001a\u00020\u0007J\u0006\u0010W\u001a\u00020\u0007J\u0006\u0010X\u001a\u00020*J\u0006\u0010Y\u001a\u00020*J\u0006\u0010Z\u001a\u00020*J\u0006\u0010[\u001a\u00020*J\u0006\u0010\\\u001a\u00020\u0002J\u0006\u0010]\u001a\u00020\u0005J\u0006\u0010^\u001a\u00020\u0005R\"\u0010a\u001a\u00020\u00058\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b_\u0010`\u001a\u0004\ba\u0010b\"\u0004\bc\u0010dR.\u0010l\u001a\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u00010e8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bf\u0010g\u001a\u0004\bh\u0010i\"\u0004\bj\u0010kR#\u0010o\u001a\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u00010e8\u0006¢\u0006\f\n\u0004\bm\u0010g\u001a\u0004\bn\u0010iR\"\u0010s\u001a\u00020\u00058\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bp\u0010`\u001a\u0004\bq\u0010b\"\u0004\br\u0010d¨\u0006v"}, d2 = {"Lak/im/uitls/AKCAppConfiguration;", "", "", "now", "notafter", "", "n", "", "key", "pKey", "m", "mtlsIsExpires", "checkmtls", "readLocalCountry", "Lkd/s;", "initConfig", "initHintConfig", "language", "getFromHint", "canIgnoreGroupForbiden", "canIgnoreGroupBan", "canIgnoreFileSend", "canIgnoreRosterLimit", "canShowFileInfo", "canShowAccessInfo", "mtlsExpireat", "canInAppUpgrade", "canSLSLog", "interruptTLSInvalid", IMMessage.CARD_SERVER_KEY, "isSecure", "getCountryDownloadUrl", "nick", "isNickBan", "canNotificationSetting", "canGroupMuc", "reportOldStats", "oss", "stats", "stats2", "m5m", "mtlscert", "", "connRetries", "connTimeout", "xpingRetries", "xpingTimeout", "slsExpirationGap", "getNetCheck", "getNotifyCheck", "CanDnsResolve", "CanLogBn", "hotline", "informationOne", "informationTwo", "leaveTime", "canLeave", "canLoginByOneKey", "oneKeyApiOutTime", "pushCacheTime", "clearCacheFileTime", "canIgnoreBackground", "changeToMainForBn", "code", "needRecord", "newTopMessageProvider", "hideScan", "textMsgLengthLimit", "imgMsgMultiLimit", "forwardMsgMultiLimit", "forwardInterval", "forwardResume", "dataRepair", "akeyidMin", "akeyidMax", "supportFeedback", "supportAiReplay", "supportCheckHead", "supportCheckNickName", "supportSurveillance", "getSurveillanceKey1", "getSurveillanceIv1", "getSurveillanceKey2", "getSurveillanceIv2", "getSurveillanceKey3", "getSurveillanceIv3", "getSurveillanceKey4", "getSurveillanceIv4", "logAutoReportInterval", "logAutoReportCount", "surveilanceCount", "surveilanceTime", "seaweedChunkSize", "ignoreOffWork", "unableRosterRemove", "b", "Z", "isConfiged", "()Z", "setConfiged", "(Z)V", "", "c", "Ljava/util/Map;", "getConfig", "()Ljava/util/Map;", "setConfig", "(Ljava/util/Map;)V", "config", "d", "getHintConfig", "hintConfig", "e", "getHintConfigSuccess", "setHintConfigSuccess", "hintConfigSuccess", "<init>", "()V", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0})
public final class AKCAppConfiguration {
private static boolean isConfiged;
private static boolean hintConfigSuccess;
@NotNull
public static final AKCAppConfiguration f9925a = new AKCAppConfiguration();
@NotNull
private static Map<String, Object> config = new LinkedHashMap();
@NotNull
private static final Map<String, Object> hintConfig = new LinkedHashMap();
private AKCAppConfiguration() {
}
public static final void g(final Ref$ObjectRef activty) {
r.checkNotNullParameter(activty, "$activty");
final AKeyDialog aKeyDialog = new AKeyDialog((Context) activty.element);
aKeyDialog.setTip(((Activity) activty.element).getString(y1.mtls_expire_hint));
aKeyDialog.setPositiveButton(((Activity) activty.element).getString(y1.confirm), new View.OnClickListener() {
@Override
public final void onClick(View view) {
AKCAppConfiguration.h(Ref$ObjectRef.this, aKeyDialog, view);
}
});
aKeyDialog.setNegativeButton(((Activity) activty.element).getString(y1.cancel), new View.OnClickListener() {
@Override
public final void onClick(View view) {
AKCAppConfiguration.l(AKeyDialog.this, activty, view);
}
});
aKeyDialog.setCanceledOnTouchOutside(false);
aKeyDialog.show();
}
public static Object getFromHint$default(AKCAppConfiguration aKCAppConfiguration, String str, boolean z10, int i10, Object obj) {
if ((i10 & 2) != 0) {
z10 = false;
}
return aKCAppConfiguration.getFromHint(str, z10);
}
public static final void h(final Ref$ObjectRef activty, final AKeyDialog dilog, View view) {
Locale locale;
String str;
String str2;
boolean z10;
r.checkNotNullParameter(activty, "$activty");
r.checkNotNullParameter(dilog, "$dilog");
if (Build.VERSION.SDK_INT >= 24) {
locale = LocaleList.getDefault().get(0);
r.checkNotNullExpressionValue(locale, "{\n … }");
} else {
locale = Locale.getDefault();
r.checkNotNullExpressionValue(locale, "{\n … }");
}
String str3 = locale.getLanguage() + '_' + locale.getCountry();
EnterpriseInfo currentEnterpriseInfo = f1.getInstance().getmEnterpriseCfg().getCurrentEnterpriseInfo();
if (currentEnterpriseInfo != null) {
str = currentEnterpriseInfo.enterpriseID;
} else {
str = null;
}
String str4 = "";
if (str == null) {
str2 = "";
} else {
str2 = currentEnterpriseInfo.enterpriseID;
}
String propValue = f1.getInstance().getPropValue("ro.product.manufacturer");
if (propValue != null && propValue.length() != 0) {
z10 = false;
} else {
z10 = true;
}
if (z10) {
String str5 = Build.BRAND;
if (str5 != null) {
str4 = str5;
}
propValue = str4;
}
Locale locale2 = Locale.ROOT;
String lowerCase = BuildConfig.PRODUCT_PKG_NAME.toLowerCase(locale2);
r.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
r.checkNotNullExpressionValue(propValue, "propValue");
String upperCase = propValue.toUpperCase(locale2);
r.checkNotNullExpressionValue(upperCase, "this as java.lang.String).toUpperCase(Locale.ROOT)");
new o0.b(f1.getCountServerURL(), false, false).getAKAPI(10).getUpdateRole(u.hashMapOf(i.to("current_version", f1.getInstance().getVersion()), i.to("product_type", BuildConfig.PRODUCT_TYPE), i.to("device_system", "android"), i.to("device_version", Build.VERSION.RELEASE), i.to("device_language", str3), i.to("server_id", str2), i.to("serial_number", f1.getInstance().getmLoginCfg().getUuid()), i.to("package_name", lowerCase), i.to("manufacturer", upperCase))).subscribeOn(gd.b.io()).observeOn(ic.a.mainThread()).subscribe(new g() {
@Override
public final void accept(Object obj) {
AKCAppConfiguration.i(Ref$ObjectRef.this, dilog, (UpdateResult) obj);
}
}, new g() {
@Override
public final void accept(Object obj) {
AKCAppConfiguration.k(Ref$ObjectRef.this, dilog, (Throwable) obj);
}
});
}
public static final void i(Ref$ObjectRef activty, AKeyDialog dilog, UpdateResult updateResult) {
jr jrVar;
r.checkNotNullParameter(activty, "$activty");
r.checkNotNullParameter(dilog, "$dilog");
if (updateResult.getReturnCode() == 0 && updateResult.getUpdateBean() != null && updateResult.getUpdateBean().getUpgrade() != 0) {
T t10 = activty.element;
if (t10 instanceof jr) {
jrVar = (jr) t10;
} else if (t10 instanceof OldActivity) {
jrVar = ((OldActivity) t10).getMDelegateIBaseActivity();
} else if (t10 instanceof ActivitySupport) {
jrVar = ((ActivitySupport) t10).getMDelegateIBaseActivity();
} else {
jrVar = null;
}
if (jrVar != null) {
final UpdateDialog updateDialog = new UpdateDialog(jrVar);
UpdateManager.Companion companion = UpdateManager.INSTANCE;
LiveData<UpdateBean> updateBeanLiveData = companion.getInstance().getUpdateBeanLiveData();
T t11 = activty.element;
if (t11 != 0) {
updateBeanLiveData.removeObservers((LifecycleOwner) t11);
LiveData<UpdateBean> updateBeanLiveData2 = companion.getInstance().getUpdateBeanLiveData();
T t12 = activty.element;
if (t12 != 0) {
updateBeanLiveData2.observe((LifecycleOwner) t12, new Observer() {
@Override
public final void onChanged(Object obj) {
AKCAppConfiguration.j(UpdateDialog.this, (UpdateBean) obj);
}
});
dilog.dismiss();
updateDialog.startCheckVersion(true);
return;
}
throw new NullPointerException("null cannot be cast to non-null type androidx.lifecycle.LifecycleOwner");
}
throw new NullPointerException("null cannot be cast to non-null type androidx.lifecycle.LifecycleOwner");
}
}
AkeyChatUtils.goToMarket((Context) activty.element);
dilog.dismiss();
}
public static final void j(UpdateDialog updateDialog, UpdateBean updateBean) {
r.checkNotNullParameter(updateDialog, "$updateDialog");
if (updateBean != null && updateBean.getUpgrade() != 0 && !UpdateManager.INSTANCE.getInstance().getHasShownAuto()) {
updateDialog.init(false);
}
}
public static final void k(Ref$ObjectRef activty, AKeyDialog dilog, Throwable th) {
r.checkNotNullParameter(activty, "$activty");
r.checkNotNullParameter(dilog, "$dilog");
AkeyChatUtils.goToMarket((Context) activty.element);
dilog.dismiss();
}
public static final void l(AKeyDialog dilog, Ref$ObjectRef activty, View view) {
r.checkNotNullParameter(dilog, "$dilog");
r.checkNotNullParameter(activty, "$activty");
dilog.dismiss();
((Activity) activty.element).finish();
Application application = ((Activity) activty.element).getApplication();
if (application != null) {
((AKApplication) application).doPreparedWorkBeforeExit(2, null);
j.a.sendStopService(false, false, true);
return;
}
throw new NullPointerException("null cannot be cast to non-null type ak.application.AKApplication");
}
private final Object m(String key, String pKey) {
boolean z10;
boolean z11;
boolean z12 = false;
if (key != null) {
try {
} catch (Throwable th) {
th.printStackTrace();
}
if (key.length() != 0) {
z10 = false;
if (!z10) {
if (pKey != null && pKey.length() != 0) {
z11 = false;
if (!z11) {
Map<String, Object> map = config;
if (map == null || map.isEmpty()) {
z12 = true;
}
if (!z12 && config.get("data") != null) {
Object obj = config.get("data");
if (obj != null) {
Map map2 = (Map) obj;
if (map2.containsKey(pKey)) {
Object obj2 = map2.get(pKey);
if (obj2 != null) {
Map map3 = (Map) obj2;
if (map3.containsKey(key)) {
return map3.get(key);
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.Any>");
}
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.Any>");
}
}
return null;
}
}
z11 = true;
if (!z11) {
}
}
return null;
}
}
z10 = true;
if (!z10) {
}
return null;
}
private final boolean n(long now, long notafter) {
boolean z10;
boolean z11 = false;
if (now > 0 && notafter > 0) {
if (now > notafter) {
z10 = true;
} else {
z10 = false;
}
if (z10 && !o3.isInternetTimeRight()) {
Log.e("AKCAppConfiguration", "expires but time is not trusty");
} else {
z11 = z10;
}
}
StringBuilder sb2 = new StringBuilder();
sb2.append(now);
sb2.append('|');
sb2.append(notafter);
sb2.append('|');
sb2.append(z11);
Log.d("AKCAppConfiguration", sb2.toString());
return z11;
}
public final boolean CanDnsResolve() {
Object m10 = m("CanDnsResolve", "f");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final boolean CanLogBn() {
Object m10 = m("bnlog", "f");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final int akeyidMax() {
try {
Object m10 = m("akeyidmax", XHTMLText.P);
if (m10 == null) {
return 20;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 20;
}
}
public final int akeyidMin() {
try {
Object m10 = m("akeyidmin", XHTMLText.P);
if (m10 == null) {
return 6;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 6;
}
}
public final boolean canGroupMuc() {
List emptyList;
boolean equals;
Object m10 = m("groupmcu-setting", "f");
if (m10 != null) {
emptyList = (List) m10;
} else {
emptyList = CollectionsKt__CollectionsKt.emptyList();
}
if (!(!emptyList.isEmpty())) {
return true;
}
String enterpriseId = f1.getInstance().getServer().getEnterpriseId();
Iterator it = emptyList.iterator();
while (it.hasNext()) {
equals = p.equals((String) it.next(), enterpriseId, true);
if (equals) {
return true;
}
}
return false;
}
public final boolean canIgnoreBackground() {
Object m10 = m("can_ignore_back", XHTMLText.P);
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final boolean canIgnoreFileSend() {
Object m10 = m("IgnoreFileSend", "d");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return false;
}
public final boolean canIgnoreGroupBan() {
Object m10 = m("IgnoreGroupBan", "d");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return false;
}
public final boolean canIgnoreGroupForbiden() {
Object m10 = m("IgnoreGroupForbiden", "d");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return false;
}
public final boolean canIgnoreRosterLimit() {
Object m10 = m("IgnoreRosterLimit", "d");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return false;
}
public final boolean canInAppUpgrade() {
Object m10 = m("in-app-upgrade", "f");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final boolean canLeave() {
Object m10 = m("leave_app_btn", XHTMLText.P);
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final boolean canLoginByOneKey(@NotNull String serverId) {
List arrayList;
boolean z10;
r.checkNotNullParameter(serverId, "serverId");
try {
Object m10 = m("aliauth", "f");
if (m10 != null) {
arrayList = (List) m10;
} else {
arrayList = new ArrayList();
}
if (arrayList.isEmpty()) {
return true;
}
if (serverId.length() == 0) {
z10 = true;
} else {
z10 = false;
}
if (z10 || arrayList.contains(Marker.ANY_MARKER)) {
return false;
}
return true ^ arrayList.contains(serverId);
} catch (Throwable unused) {
return true;
}
}
public final boolean canNotificationSetting() {
List emptyList;
boolean equals;
Object m10 = m("notification-setting", "f");
if (m10 != null) {
emptyList = (List) m10;
} else {
emptyList = CollectionsKt__CollectionsKt.emptyList();
}
if (!(!emptyList.isEmpty())) {
return true;
}
String enterpriseId = f1.getInstance().getServer().getEnterpriseId();
Iterator it = emptyList.iterator();
while (it.hasNext()) {
equals = p.equals((String) it.next(), enterpriseId, true);
if (equals) {
return true;
}
}
return false;
}
public final boolean canSLSLog() {
Object m10 = m("sls-log", "f");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final boolean canShowAccessInfo() {
Object m10 = m("ShowAccessInfo", "d");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return false;
}
public final boolean canShowFileInfo() {
Object m10 = m("ShowFileInfo", "d");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return false;
}
public final boolean changeToMainForBn() {
Object m10 = m("BoxtalkNewNodeEnable", "f");
Log.debug("AKCAppConfiguration", "changeToMainForBn " + m10);
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final boolean checkmtls() {
Date[] dateArr;
String str;
long time;
String str2;
final Ref$ObjectRef ref$ObjectRef;
T t10;
Activity activity;
boolean z10;
boolean z11;
boolean z12;
boolean z13;
boolean z14;
boolean z15;
while (!isConfiged) {
Thread.sleep(100L);
}
Log.d("AKCAppConfiguration", "checkmtls isConfiged:" + isConfiged);
try {
dateArr = AkeyChatX509PrivateCA.mtlsDateValidity();
} catch (Throwable unused) {
dateArr = null;
}
if (dateArr == null || dateArr.length != 2) {
return true;
}
long rightTime = o3.getRightTime() + 1296000000;
if (mtlsExpireat() > 0) {
str = "AKCAppConfiguration";
time = mtlsExpireat() * 1000;
} else {
str = "AKCAppConfiguration";
time = dateArr[1].getTime();
}
boolean n10 = n(rightTime, time);
if (!n10) {
return true;
}
try {
String mtlscert = mtlscert();
str2 = str;
try {
Log.d(str2, "checkmtls url:" + mtlscert);
byte[] d10 = HttpURLTools.getBytesFromHttpsUrl(mtlscert, 5000, null, null);
d dVar = new d();
r.checkNotNullExpressionValue(d10, "d");
Map c10 = (Map) dVar.fromJson(new String(d10, ce.a.f11745b), (Type) Map.class);
Log.d(str2, "checkmtls success:" + c10);
r.checkNotNullExpressionValue(c10, "c");
if (!c10.isEmpty()) {
Object obj = c10.get("meta");
if (obj != null) {
Map map = (Map) obj;
Object obj2 = c10.get("cert");
if (obj2 != null) {
Map map2 = (Map) obj2;
Object obj3 = map.get("kid");
if (obj3 != null) {
OneTimeCertData.kid = (String) obj3;
Object obj4 = map.get("share");
if (obj4 != null) {
OneTimeCertData.share = (String) obj4;
Object obj5 = map.get("iv");
if (obj5 != null) {
OneTimeCertData.iv = (String) obj5;
Object obj6 = map.get("pass");
if (obj6 != null) {
OneTimeCertData.pass = (String) obj6;
Object obj7 = map2.get("cert");
if (obj7 != null) {
OneTimeCertData.cert = (String) obj7;
Object obj8 = map2.get("key");
if (obj8 != null) {
OneTimeCertData.key = (String) obj8;
String kid = OneTimeCertData.kid;
r.checkNotNullExpressionValue(kid, "kid");
if (kid.length() > 0) {
z10 = true;
} else {
z10 = false;
}
if (z10) {
String share = OneTimeCertData.share;
r.checkNotNullExpressionValue(share, "share");
if (share.length() > 0) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
String iv = OneTimeCertData.iv;
r.checkNotNullExpressionValue(iv, "iv");
if (iv.length() > 0) {
z12 = true;
} else {
z12 = false;
}
if (z12) {
String pass = OneTimeCertData.pass;
r.checkNotNullExpressionValue(pass, "pass");
if (pass.length() > 0) {
z13 = true;
} else {
z13 = false;
}
if (z13) {
String cert = OneTimeCertData.cert;
r.checkNotNullExpressionValue(cert, "cert");
if (cert.length() > 0) {
z14 = true;
} else {
z14 = false;
}
if (z14) {
String key = OneTimeCertData.key;
r.checkNotNullExpressionValue(key, "key");
if (key.length() > 0) {
z15 = true;
} else {
z15 = false;
}
if (z15) {
try {
OneTimeCertData.save();
n10 = false;
} catch (Exception e10) {
e = e10;
n10 = false;
Log.e(str2, "checkmtls e:" + e.getMessage());
if (n10) {
}
if (n10) {
ref$ObjectRef = new Ref$ObjectRef();
while (true) {
t10 = ref$ObjectRef.element;
if (t10 == 0) {
}
ref$ObjectRef.element = AKApplication.getTopActivity();
}
Log.d(str2, "checkmtls in activty:" + ref$ObjectRef.element);
activity = (Activity) ref$ObjectRef.element;
if (activity != null) {
}
}
return !interruptTLSInvalid() ? true : true;
}
}
}
}
}
}
}
Log.e(str2, "mtls update error");
OneTimeCertData.kid = null;
OneTimeCertData.share = null;
OneTimeCertData.iv = null;
OneTimeCertData.pass = null;
OneTimeCertData.cert = null;
OneTimeCertData.key = null;
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.Any>");
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.Any>");
}
}
} catch (Exception e11) {
e = e11;
}
} catch (Exception e12) {
e = e12;
str2 = str;
}
if (n10) {
long rightTime2 = o3.getRightTime();
long time2 = dateArr[1].getTime();
n10 = n(rightTime2, time2);
StringBuilder sb2 = new StringBuilder();
sb2.append(time2);
sb2.append('|');
sb2.append(rightTime2);
sb2.append('|');
sb2.append(n10);
Log.d(str2, sb2.toString());
}
if (n10 && interruptTLSInvalid()) {
ref$ObjectRef = new Ref$ObjectRef();
while (true) {
t10 = ref$ObjectRef.element;
if (t10 == 0 && !((Activity) t10).isFinishing()) {
break;
}
ref$ObjectRef.element = AKApplication.getTopActivity();
}
Log.d(str2, "checkmtls in activty:" + ref$ObjectRef.element);
activity = (Activity) ref$ObjectRef.element;
if (activity != null) {
activity.runOnUiThread(new Runnable() {
@Override
public final void run() {
AKCAppConfiguration.g(Ref$ObjectRef.this);
}
});
}
}
if (!interruptTLSInvalid() && n10) {
return false;
}
}
public final long clearCacheFileTime() {
int i10;
Object m10 = m("clear_cache_time", XHTMLText.P);
if (m10 != null) {
i10 = (int) ((Double) m10).doubleValue();
} else {
i10 = 7;
}
return i10 * 24 * 60 * 60 * 1000;
}
public final int connRetries() {
Object m10 = m("conn_retries", XHTMLText.P);
if (m10 != null) {
return (int) ((Double) m10).doubleValue();
}
return 1;
}
public final int connTimeout() {
Object m10 = m("conn_timeout", XHTMLText.P);
if (m10 != null) {
return (int) ((Double) m10).doubleValue();
}
return 7500;
}
public final boolean dataRepair() {
try {
Object m10 = m("dataRepair", "f");
if (m10 == null) {
return true;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return true;
}
}
public final int forwardInterval() {
try {
Object m10 = m("forwardInterval", XHTMLText.P);
if (m10 == null) {
return 0;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 0;
}
}
public final int forwardMsgMultiLimit() {
try {
Object m10 = m("forwardMsgMultiLimit", XHTMLText.P);
if (m10 == null) {
return 100;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 100;
}
}
public final boolean forwardResume() {
try {
Object m10 = m("forwardResume", "f");
if (m10 == null) {
return true;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return true;
}
}
@NotNull
public final Map<String, Object> getConfig() {
return config;
}
@NotNull
public final String getCountryDownloadUrl() {
try {
Object m10 = m("countrycodeconfig", User.NAME_PREFIX);
if (m10 == null) {
return "https://akey-app-configuration.oss-accelerate.aliyuncs.com/config/countrycode.json";
}
return (String) m10;
} catch (Throwable unused) {
return "https://akey-app-configuration.oss-accelerate.aliyuncs.com/config/countrycode.json";
}
}
@Nullable
public final Object getFromHint(@NotNull String key, boolean language) {
int i10;
r.checkNotNullParameter(key, "key");
try {
if (language) {
if (FileUtil.currentLanguageIsChinese(j.a.get())) {
i10 = 0;
} else {
i10 = 1;
}
StringBuilder sb2 = new StringBuilder();
sb2.append("getFromHint ");
Map<String, Object> map = hintConfig;
sb2.append(map.get(key));
Log.i("AKCAppConfiguration", sb2.toString());
Object obj = map.get(key);
if (obj != null) {
return ((List) obj).get(i10);
}
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.List<*>");
}
if ((r.areEqual(AMPExtension.Action.ATTRIBUTE_NAME, key) || r.areEqual("type", key)) && hintConfig.get(key) == null) {
return Double.valueOf(0.0d);
}
return hintConfig.get(key);
} catch (Exception e10) {
e10.printStackTrace();
Log.e("AKCAppConfiguration", "getFromHint failed key is " + key + " ,e is " + e10.getMessage());
return null;
}
}
@NotNull
public final Map<String, Object> getHintConfig() {
return hintConfig;
}
public final boolean getHintConfigSuccess() {
return hintConfigSuccess;
}
@NotNull
public final String getNetCheck() {
Object m10 = m("netcheck", "f");
if (m10 != null) {
return (String) m10;
}
return "";
}
@NotNull
public final String getNotifyCheck() {
String str;
Object m10 = m("notify-check", "f");
StringBuilder sb2 = new StringBuilder();
if (m10 != null) {
str = (String) m10;
} else if (s.a.f45916a.isFlavor("zenchat")) {
str = "https://pub.renxiaoliao.com/notifyaccess.html";
} else {
str = "https://pub.akeydown.com/notifyaccess.html";
}
sb2.append(str);
sb2.append('?');
sb2.append(System.currentTimeMillis());
return sb2.toString();
}
@NotNull
public final String getSurveillanceIv1() {
try {
Object m10 = m("surveillanceiv1", XHTMLText.P);
if (m10 == null) {
return "g6uoMOaeIwmC8CDtXMBZ1ROTVkWTp2+MoccoZQOdlF4=";
}
return (String) m10;
} catch (Throwable unused) {
return "g6uoMOaeIwmC8CDtXMBZ1ROTVkWTp2+MoccoZQOdlF4=";
}
}
@NotNull
public final String getSurveillanceIv2() {
try {
Object m10 = m("surveillanceiv2", XHTMLText.P);
if (m10 == null) {
return "8ut8LgbaV6Fq+g45JM6/MoAPGrBbGQLLzoA/30cig7I=";
}
return (String) m10;
} catch (Throwable unused) {
return "8ut8LgbaV6Fq+g45JM6/MoAPGrBbGQLLzoA/30cig7I=";
}
}
@NotNull
public final String getSurveillanceIv3() {
try {
Object m10 = m("surveillanceiv3", XHTMLText.P);
if (m10 == null) {
return "8ut8LgbaV6Fq+g45JM6/MoAPGrBbGQLLzoA/30cig7I=";
}
return (String) m10;
} catch (Throwable unused) {
return "8ut8LgbaV6Fq+g45JM6/MoAPGrBbGQLLzoA/30cig7I=";
}
}
@NotNull
public final String getSurveillanceIv4() {
try {
Object m10 = m("surveillanceiv4", XHTMLText.P);
if (m10 == null) {
return "nLtvevIlv7ccMmE0KAa3J3VzpwF5/NSL8AlY4KpMLZg=";
}
return (String) m10;
} catch (Throwable unused) {
return "nLtvevIlv7ccMmE0KAa3J3VzpwF5/NSL8AlY4KpMLZg=";
}
}
@NotNull
public final String getSurveillanceKey1() {
try {
Object m10 = m("surveillancekey1", XHTMLText.P);
if (m10 == null) {
return "6W6iNYaBCjd67/xkU/8eTvb6IDEoM1xouDg3YdeioDoO1SMocEns/CiB1LBFknes";
}
return (String) m10;
} catch (Throwable unused) {
return "6W6iNYaBCjd67/xkU/8eTvb6IDEoM1xouDg3YdeioDoO1SMocEns/CiB1LBFknes";
}
}
@NotNull
public final String getSurveillanceKey2() {
try {
Object m10 = m("surveillancekey2", XHTMLText.P);
if (m10 == null) {
return "R0sudX0+dkH3CIEsq02oztqc3i0Nkqkz2c63tviBqP/Q0Xq/dc1UtgeX7C1rDHHz";
}
return (String) m10;
} catch (Throwable unused) {
return "R0sudX0+dkH3CIEsq02oztqc3i0Nkqkz2c63tviBqP/Q0Xq/dc1UtgeX7C1rDHHz";
}
}
@NotNull
public final String getSurveillanceKey3() {
try {
Object m10 = m("surveillancekey3", XHTMLText.P);
if (m10 == null) {
return "R0sudX0+dkH3CIEsq02oztqc3i0Nkqkz2c63tviBqP/Q0Xq/dc1UtgeX7C1rDHHz";
}
return (String) m10;
} catch (Throwable unused) {
return "R0sudX0+dkH3CIEsq02oztqc3i0Nkqkz2c63tviBqP/Q0Xq/dc1UtgeX7C1rDHHz";
}
}
@NotNull
public final String getSurveillanceKey4() {
try {
Object m10 = m("surveillancekey4", XHTMLText.P);
if (m10 == null) {
return "/NqTD/fW6cWQZ8OU8sAPCtAxkufpqahfSEY6GJd7qHJVlhwIzIvXqMYkfKPjk+pb";
}
return (String) m10;
} catch (Throwable unused) {
return "/NqTD/fW6cWQZ8OU8sAPCtAxkufpqahfSEY6GJd7qHJVlhwIzIvXqMYkfKPjk+pb";
}
}
public final boolean hideScan() {
Object m10 = m("in-review", "f");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return false;
}
@NotNull
public final String hotline() {
Object m10 = m("bnlog", User.NAME_PREFIX);
if (m10 != null) {
return (String) m10;
}
return "400-823-0608";
}
public final boolean ignoreOffWork() {
try {
Object m10 = m("ignoreoffwork", "d");
if (m10 == null) {
return false;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return false;
}
}
public final int imgMsgMultiLimit() {
int i10 = 100;
try {
Object m10 = m("imgMsgMultiLimit", XHTMLText.P);
if (m10 != null) {
i10 = (int) ((Double) m10).doubleValue();
}
} catch (Throwable unused) {
}
return i10 - 1;
}
@NotNull
public final String informationOne() {
boolean areEqual;
String str;
Object m10 = m("picl", User.NAME_PREFIX);
if (r.areEqual(BuildConfig.FLAVOR_akProduct, "enterprise")) {
str = "http://app.akeydown.com/ent_picl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, BuildConfig.FLAVOR_akProduct)) {
str = "http://app.akeydown.com/carrot_picl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, "boxtalk")) {
str = "http://app.akeydown.com/boxtalk_picl.html";
} else {
if (r.areEqual(BuildConfig.FLAVOR_akProduct, "anxintong")) {
areEqual = true;
} else {
areEqual = r.areEqual(BuildConfig.FLAVOR_akProduct, "calculator");
}
if (areEqual) {
str = "http://app.akeydown.com/axt_picl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, "gov")) {
str = "http://app.akeydown.com/gov_picl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, "ansimixin")) {
str = "http://app.akeydown.com/normal_picl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, "zenchat")) {
str = "https://pub.renxiaoliao.com/zenchat-picl.html";
} else {
str = "";
}
}
if (m10 != null) {
return (String) m10;
}
return str;
}
@NotNull
public final String informationTwo() {
boolean areEqual;
String str;
Object m10 = m("tpisl", User.NAME_PREFIX);
if (r.areEqual(BuildConfig.FLAVOR_akProduct, "enterprise")) {
str = "http://app.akeydown.com/ent_tpisl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, BuildConfig.FLAVOR_akProduct)) {
str = "http://app.akeydown.com/carrot_tpisl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, "boxtalk")) {
str = "http://app.akeydown.com/boxtalk_tpisl.html";
} else {
if (r.areEqual(BuildConfig.FLAVOR_akProduct, "anxintong")) {
areEqual = true;
} else {
areEqual = r.areEqual(BuildConfig.FLAVOR_akProduct, "calculator");
}
if (areEqual) {
str = "http://app.akeydown.com/axt_tpisl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, "gov")) {
str = "http://app.akeydown.com/gov_tpisl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, "ansimixin")) {
str = "http://app.akeydown.com/normal_tpisl.html";
} else if (r.areEqual(BuildConfig.FLAVOR_akProduct, "zenchat")) {
str = "https://pub.renxiaoliao.com/zenchat-tpisl.html";
} else {
str = "";
}
}
if (m10 != null) {
return (String) m10;
}
return str;
}
public final void initConfig() {
AsyncKt.doAsync$default(this, null, new l<AnkoAsyncContext<AKCAppConfiguration>, s>() {
@Metadata(bv = {}, d1 = {"\u0000'\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\"\u0010\b\u001a\u00020\u00072\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u00022\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005H\u0016J$\u0010\f\u001a\u00020\u000b2\u0006\u0010\t\u001a\u00020\u00072\b\u0010\u0006\u001a\u0004\u0018\u00010\u00052\b\u0010\n\u001a\u0004\u0018\u00010\u0005H\u0016J\u0012\u0010\u000e\u001a\u00020\u000b2\b\u0010\r\u001a\u0004\u0018\u00010\u0005H\u0016¨\u0006\u000f"}, d2 = {"ak/im/uitls/AKCAppConfiguration$initConfig$1$a", "La1/u;", "", "cur", "total", "", "url", "", "onRecvProgress", "result", "des", "Lkd/s;", "onRecvResult", "fileName", "receiveFileName", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0})
public static final class a implements a1.u {
a() {
}
@Override
public boolean onRecvProgress(long cur, long total, @Nullable String url) {
return false;
}
@Override
public void onRecvResult(boolean z10, @Nullable String str, @Nullable String str2) {
}
@Override
public void receiveFileName(@Nullable String str) {
}
}
@Metadata(bv = {}, d1 = {"\u0000\u001d\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016J\u0010\u0010\b\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0016¨\u0006\t"}, d2 = {"ak/im/uitls/AKCAppConfiguration$initConfig$1$b", "Lv0/a;", "", "p0", "Lkd/s;", "onNext", "", "e", "onError", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0})
public static final class b extends v0.a<Object> {
final File f9931a;
final Ref$ObjectRef<String> f9932b;
b(File file, Ref$ObjectRef<String> ref$ObjectRef) {
this.f9931a = file;
this.f9932b = ref$ObjectRef;
}
@Override
public void onError(@NotNull Throwable e10) {
r.checkNotNullParameter(e10, "e");
Log.e("AKCAppConfiguration", "download netCheckUrl failed,reason is " + e10.getMessage());
}
@Override
public void onNext(@NotNull Object p02) {
r.checkNotNullParameter(p02, "p0");
Log.i("AKCAppConfiguration", "download result is " + this.f9931a.exists());
f1.getInstance().setNetCheckHtml(this.f9932b.element);
}
}
@Override
public s invoke(AnkoAsyncContext<AKCAppConfiguration> ankoAsyncContext) {
invoke2(ankoAsyncContext);
return s.f40925a;
}
public final void invoke2(@NotNull AnkoAsyncContext<AKCAppConfiguration> doAsync) {
r.checkNotNullParameter(doAsync, "$this$doAsync");
try {
CountryBean countryBean = (CountryBean) new d().fromJson(AKCAppConfiguration.f9925a.readLocalCountry(), CountryBean.class);
Log.debug("AKCAppConfiguration", "local country json is " + countryBean);
if (countryBean != null) {
f1.getInstance().setCountryBean(countryBean);
}
} catch (Throwable th) {
Log.debug("AKCAppConfiguration", "local country e is " + th.getLocalizedMessage());
th.printStackTrace();
}
try {
String cache = e.KV().getString("AKCAppConfiguration1", "");
r.checkNotNullExpressionValue(cache, "cache");
if (cache.length() > 0) {
Map<? extends String, ? extends Object> c10 = (Map) new d().fromJson(cache, (Type) Map.class);
r.checkNotNullExpressionValue(c10, "c");
if (!c10.isEmpty()) {
AKCAppConfiguration.f9925a.getConfig().putAll(c10);
}
}
String str = "https://akey-app-configuration.oss-accelerate.aliyuncs.com/apollo/android_luobo_" + f1.getInstance().getBigVersion() + ".json";
if (e.KV().getBoolean("configdebug", false)) {
str = "https://akey-app-configuration.oss-accelerate.aliyuncs.com/apollodev/android_luobo_" + f1.getInstance().getBigVersion() + ".json";
}
Log.d("AKCAppConfiguration", "fileurl:" + str);
byte[] bytesFromHttpsUrl = HttpURLTools.getBytesFromHttpsUrl(str, 3000, null, null);
if (bytesFromHttpsUrl != null) {
Map<? extends String, ? extends Object> c11 = (Map) new d().fromJson(new String(bytesFromHttpsUrl, ce.a.f11745b), (Type) Map.class);
r.checkNotNullExpressionValue(c11, "c");
if (!c11.isEmpty()) {
AKCAppConfiguration aKCAppConfiguration = AKCAppConfiguration.f9925a;
aKCAppConfiguration.getConfig().clear();
aKCAppConfiguration.getConfig().putAll(c11);
}
}
e KV = e.KV();
d dVar = new d();
AKCAppConfiguration aKCAppConfiguration2 = AKCAppConfiguration.f9925a;
KV.putString("AKCAppConfiguration1", dVar.toJson(aKCAppConfiguration2.getConfig()));
HttpURLTools.initOssServerHosts(null);
aKCAppConfiguration2.setConfiged(true);
String netCheck = aKCAppConfiguration2.getNetCheck();
Ref$ObjectRef ref$ObjectRef = new Ref$ObjectRef();
ref$ObjectRef.element = FileUtil.getGlobalCachePath() + FileUtil.getFileName(netCheck);
File file = new File((String) ref$ObjectRef.element);
Log.debug("AKCAppConfiguration", "save path is " + ((String) ref$ObjectRef.element) + ",\n " + FileUtil.getGlobalCachePath() + FileUtil.getFileName(netCheck));
if (netCheck.length() > 0) {
new u0.l(netCheck, new a()).startDownloadFile(file, new b(file, ref$ObjectRef));
}
String countryDownloadUrl = aKCAppConfiguration2.getCountryDownloadUrl();
Log.d("AKCAppConfiguration", "countryUrl:" + countryDownloadUrl);
byte[] bytesFromHttpsUrl2 = HttpURLTools.getBytesFromHttpsUrl(countryDownloadUrl, 3000, null, null);
if (bytesFromHttpsUrl2 != null) {
CountryBean countryBean2 = (CountryBean) new d().fromJson(new String(bytesFromHttpsUrl2, ce.a.f11745b), CountryBean.class);
Log.debug("AKCAppConfiguration", "country json is " + countryBean2);
if (countryBean2 != null) {
f1.getInstance().setCountryBean(countryBean2);
}
}
} catch (Exception e10) {
Log.e("AKCAppConfiguration", "e:" + e10.getMessage());
AKCAppConfiguration.f9925a.setConfiged(true);
}
}
}, 1, null);
}
public final void initHintConfig() {
if (hintConfigSuccess) {
return;
}
AsyncKt.doAsync$default(this, null, new l<AnkoAsyncContext<AKCAppConfiguration>, s>() {
@Override
public s invoke(AnkoAsyncContext<AKCAppConfiguration> ankoAsyncContext) {
invoke2(ankoAsyncContext);
return s.f40925a;
}
public final void invoke2(@NotNull AnkoAsyncContext<AKCAppConfiguration> doAsync) {
r.checkNotNullParameter(doAsync, "$this$doAsync");
try {
String str = e.KV().getBoolean("configdebug", false) ? "https://akey-app-configuration.oss-accelerate.aliyuncs.com/configuration/dev_luobo_banner.json" : "https://akey-app-configuration.oss-accelerate.aliyuncs.com/configuration/luobo_banner.json";
Log.d("AKCAppConfiguration", "fileurl:" + str);
byte[] d10 = HttpURLTools.getBytesFromHttpsUrl(str, 3000, null, null);
r.checkNotNullExpressionValue(d10, "d");
String str2 = new String(d10, ce.a.f11745b);
Log.i("AKCAppConfiguration", "getFromHint is " + str2);
AKCAppConfiguration aKCAppConfiguration = AKCAppConfiguration.f9925a;
aKCAppConfiguration.getHintConfig().clear();
Map<String, Object> hintConfig2 = aKCAppConfiguration.getHintConfig();
Object fromJson = new d().fromJson(str2, (Type) Map.class);
r.checkNotNullExpressionValue(fromJson, "Gson().fromJson<Map<Stri…>>(json, Map::class.java)");
hintConfig2.putAll((Map) fromJson);
aKCAppConfiguration.setHintConfigSuccess(true);
} catch (Throwable th) {
Log.e("AKCAppConfiguration", "bannner e:" + th.getMessage());
}
}
}, 1, null);
}
public final boolean interruptTLSInvalid() {
Object m10 = m("interruptTLSInvalid", "f");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return false;
}
public final boolean isConfiged() {
return isConfiged;
}
public final boolean isNickBan(@NotNull String nick) {
List emptyList;
boolean z10;
List emptyList2;
boolean z11;
boolean equals;
boolean contains;
r.checkNotNullParameter(nick, "nick");
Object m10 = m("nick-bans", "f");
if (m10 != null) {
emptyList = (List) m10;
} else {
emptyList = CollectionsKt__CollectionsKt.emptyList();
}
Iterator it = emptyList.iterator();
while (true) {
if (it.hasNext()) {
contains = StringsKt__StringsKt.contains((CharSequence) nick, (CharSequence) it.next(), true);
if (contains) {
z10 = true;
break;
}
} else {
z10 = false;
break;
}
}
Object m11 = m("nick-bans-r", "f");
if (m11 != null) {
emptyList2 = (List) m11;
} else {
emptyList2 = CollectionsKt__CollectionsKt.emptyList();
}
if (!emptyList2.isEmpty()) {
String enterpriseId = f1.getInstance().getServer().getEnterpriseId();
Iterator it2 = emptyList2.iterator();
while (it2.hasNext()) {
equals = p.equals((String) it2.next(), enterpriseId, true);
if (equals) {
}
}
z11 = false;
if (!z11 && z10) {
return true;
}
}
z11 = true;
return !z11 ? false : false;
}
public final boolean isSecure(@NotNull String serverId) {
List arrayList;
r.checkNotNullParameter(serverId, "serverId");
try {
Object m10 = m("server-no-secure", "d");
if (m10 != null) {
arrayList = (List) m10;
} else {
arrayList = new ArrayList();
}
return arrayList.contains(serverId);
} catch (Throwable unused) {
return false;
}
}
public final long leaveTime() {
long j10;
Object m10 = m("leave_app_time", XHTMLText.P);
if (m10 != null) {
j10 = (long) ((Double) m10).doubleValue();
} else {
j10 = 300;
}
return j10 * 1000;
}
public final int logAutoReportCount() {
try {
Object m10 = m("log_autoreport_count", XHTMLText.P);
if (m10 == null) {
return 10;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 10;
}
}
public final int logAutoReportInterval() {
try {
Object m10 = m("log_autoreport_interval", XHTMLText.P);
if (m10 == null) {
return 60;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 60;
}
}
@NotNull
public final String m5m() {
Object m10 = m("m5m", User.NAME_PREFIX);
if (m10 != null) {
return (String) m10;
}
return "b.akey.me";
}
public final long mtlsExpireat() {
Object m10 = m("mtls_expireat", "d");
if (m10 != null) {
return (long) ((Double) m10).doubleValue();
}
return 0L;
}
public final boolean mtlsIsExpires() {
Date[] mtlsDateValidity = AkeyChatX509PrivateCA.mtlsDateValidity();
if (mtlsDateValidity != null && mtlsDateValidity.length == 2) {
return n(o3.getRightTime(), mtlsDateValidity[1].getTime());
}
return false;
}
@NotNull
public final String mtlscert() {
Object m10 = m("mtlscert", User.NAME_PREFIX);
if (m10 != null) {
return (String) m10;
}
return "https://akey-app-configuration.oss-accelerate.aliyuncs.com/configuration/android_mtlscert_luobo";
}
public final boolean needRecord(@NotNull String code) {
List arrayList;
r.checkNotNullParameter(code, "code");
try {
Object m10 = m("needReport", "f");
if (m10 != null) {
arrayList = (List) m10;
} else {
arrayList = new ArrayList();
}
} catch (Throwable unused) {
}
if (arrayList.isEmpty()) {
return false;
}
if (arrayList.contains(Marker.ANY_MARKER)) {
return true;
}
if (!arrayList.contains(code)) {
return false;
}
return true;
}
public final boolean newTopMessageProvider() {
Object m10 = m("newTopMessageProvider", "f");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final int oneKeyApiOutTime() {
Object m10 = m("aliauthot", XHTMLText.P);
if (m10 != null) {
return (int) (((Double) m10).doubleValue() * 1000);
}
return 1500;
}
@NotNull
public final String oss() {
Object m10 = m("oss", User.NAME_PREFIX);
if (m10 != null) {
return (String) m10;
}
return "enterprise.akeychat.cn:20443";
}
public final long pushCacheTime() {
long j10;
Object m10 = m("push_token_refresh_time", XHTMLText.P);
if (m10 != null) {
j10 = (long) ((Double) m10).doubleValue();
} else {
j10 = 86400;
}
return j10 * 1000;
}
@Nullable
public final String readLocalCountry() {
InputStream open = j.a.get().getAssets().open("countrycode.json");
r.checkNotNullExpressionValue(open, "assetManager.open(\"countrycode.json\")");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(open, "UTF-8"));
StringBuffer stringBuffer = new StringBuffer();
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
Log.debug("AKCAppConfiguration", "read country json is " + ((Object) stringBuffer));
open.close();
bufferedReader.close();
return stringBuffer.toString();
}
stringBuffer.append(readLine);
}
}
public final boolean reportOldStats() {
Object m10 = m("reportoldstats", "f");
if (m10 != null) {
return ((Boolean) m10).booleanValue();
}
return true;
}
public final long seaweedChunkSize() {
try {
Object m10 = m("seaweedchunksize", XHTMLText.P);
if (m10 == null) {
return 10485760L;
}
return (long) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 10485760L;
}
}
public final void setConfig(@NotNull Map<String, Object> map) {
r.checkNotNullParameter(map, "<set-?>");
config = map;
}
public final void setConfiged(boolean z10) {
isConfiged = z10;
}
public final void setHintConfigSuccess(boolean z10) {
hintConfigSuccess = z10;
}
public final long slsExpirationGap() {
Object m10 = m("sls_expiration_gap", XHTMLText.P);
if (m10 != null) {
return (long) ((Double) m10).doubleValue();
}
return 900000L;
}
@NotNull
public final String stats() {
Object m10 = m("stats", User.NAME_PREFIX);
if (m10 != null) {
return (String) m10;
}
return "statistical.akeychat.cn";
}
@NotNull
public final String stats2() {
Object m10 = m("stats2", User.NAME_PREFIX);
if (m10 != null) {
return (String) m10;
}
return "stat.akeydev.top:7443";
}
public final boolean supportAiReplay() {
try {
Object m10 = m("supportAIReply", "f");
if (m10 == null) {
return true;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return true;
}
}
public final boolean supportCheckHead() {
try {
Object m10 = m("avatarRecoginition", "f");
if (m10 == null) {
return true;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return true;
}
}
public final boolean supportCheckNickName() {
try {
Object m10 = m("nameRecoginition", "f");
if (m10 == null) {
return true;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return true;
}
}
public final boolean supportFeedback() {
try {
Object m10 = m("supportFeedback", "f");
if (m10 == null) {
return true;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return true;
}
}
public final boolean supportSurveillance() {
try {
Object m10 = m("surveillance_enable", "f");
if (m10 == null) {
return true;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return true;
}
}
public final int surveilanceCount() {
try {
Object m10 = m("surveillance_n", XHTMLText.P);
if (m10 == null) {
return 10;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 10;
}
}
public final int surveilanceTime() {
try {
Object m10 = m("surveillance_s", XHTMLText.P);
if (m10 == null) {
return 60;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 60;
}
}
public final int textMsgLengthLimit() {
try {
Object m10 = m("textMsgLengthLimit", XHTMLText.P);
if (m10 == null) {
return 10000;
}
return (int) ((Double) m10).doubleValue();
} catch (Throwable unused) {
return 10000;
}
}
public final boolean unableRosterRemove() {
try {
Object m10 = m("unablerosterremove", "f");
if (m10 == null) {
return true;
}
return ((Boolean) m10).booleanValue();
} catch (Throwable unused) {
return true;
}
}
public final int xpingRetries() {
Object m10 = m("xping_retries", XHTMLText.P);
if (m10 != null) {
return (int) ((Double) m10).doubleValue();
}
return 3;
}
public final int xpingTimeout() {
Object m10 = m("xping_timeout", XHTMLText.P);
if (m10 != null) {
return (int) ((Double) m10).doubleValue();
}
return 30000;
}
}