OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 av.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.dialog;
import android.content.Context;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentActivity;
import com.excean.bytedancebi.bean.BiEventDialogShow;
import com.excean.ggspace.main.R;
import com.excean.view.dialog.ContainerDialog;
import com.excelliance.kxqp.api.ApiManager;
import com.excelliance.kxqp.bean.WarnInfo;
import com.excelliance.kxqp.gs.appstore.model.ResponseData;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.gs.util.cg;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
public class av {
public static String f4500a = "WarnDialogHelper";
public interface a {
void a(boolean z);
}
public static void a(final Context context, final int i) {
tp.f(new Runnable() {
@Override
public void run() {
com.excelliance.kxqp.api.c cVar = new com.excelliance.kxqp.api.c(context);
cVar.a(ApiManager.getInstance().a(context, 15000L, 15000L, "https://api.ourplay.com.cn/").d(i));
ResponseData b2 = cVar.b();
if (b2.code == 1) {
final WarnInfo warnInfo = (WarnInfo) b2.data;
if (warnInfo.banType != 0) {
tp.i(new Runnable() {
@Override
public void run() {
av.b((FragmentActivity) context, warnInfo.banText, i);
}
});
return;
}
return;
}
tp.i(new Runnable() {
@Override
public void run() {
cg.a(context, context.getString(R.string.connect_service_error));
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.dialog_type = "toast";
biEventDialogShow.toast_name = context.getString(R.string.connect_service_error) + ":-3";
com.excelliance.kxqp.gs.g.c.a().a(biEventDialogShow);
}
});
}
});
}
public static void a(final Context context, final a aVar) {
String b2 = by.a(context, "sp_permission_guide").b("sp_key_warn_info_bad_user", "");
final boolean z = false;
if (!cd.a(b2)) {
WarnInfo warnInfo = (WarnInfo) new Gson().a(b2, new TypeToken<WarnInfo>() {
}.getType());
if (warnInfo.banType != 0) {
if (aVar != null) {
aVar.a(true);
}
b((FragmentActivity) context, warnInfo.banText, 1);
} else if (aVar != null) {
aVar.a(false);
}
z = true;
}
tp.f(new Runnable() {
@Override
public void run() {
com.excelliance.kxqp.api.c cVar = new com.excelliance.kxqp.api.c(context);
cVar.a(ApiManager.getInstance().a(context, 15000L, 15000L, "https://api.ourplay.com.cn/").d(1));
ResponseData b3 = cVar.b();
if (b3.code == 1) {
final WarnInfo warnInfo2 = (WarnInfo) b3.data;
tp.i(new Runnable() {
@Override
public void run() {
if (warnInfo2 != null && warnInfo2.banType != 0) {
if (z) {
return;
}
if (aVar != null) {
aVar.a(true);
}
av.b((FragmentActivity) context, warnInfo2.banText, 1);
return;
}
if (aVar == null || z) {
return;
}
aVar.a(false);
}
});
by.a(context, "sp_permission_guide").a("sp_key_warn_info_bad_user", new Gson().a(warnInfo2));
return;
}
tp.i(new Runnable() {
@Override
public void run() {
if (aVar != null && !z) {
aVar.a(false);
}
cg.a(context, context.getString(R.string.connect_service_error));
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.dialog_type = "toast";
biEventDialogShow.toast_name = context.getString(R.string.connect_service_error) + ":-4";
com.excelliance.kxqp.gs.g.c.a().a(biEventDialogShow);
}
});
}
});
}
public static void b(final FragmentActivity fragmentActivity, String str, final int i) {
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).e(fragmentActivity.getString(R.string.agree_and_continue)).c(str).a(fragmentActivity.getString(R.string.hint)).b(false).c(false).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
av.b(FragmentActivity.this, i);
}
});
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "WarnDialog");
}
public static void b(FragmentActivity fragmentActivity, int i) {
if (i == 1) {
System.exit(0);
} else if (i == 2) {
fragmentActivity.finish();
}
}
}