OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 af.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.util;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.ColorDrawable;
import android.text.Html;
import android.text.SpannableStringBuilder;
import android.text.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Observer;
import com.android.spush.util.WebActionRouter;
import com.excean.bytedancebi.bean.BiEventClick;
import com.excean.bytedancebi.bean.BiEventDialogShow;
import com.excean.ggspace.main.R;
import com.excean.view.dialog.ContainerDialog;
import com.excelliance.kxqp.GameUtil;
import com.excelliance.kxqp.bean.WXconfig;
import com.excelliance.kxqp.gs.bean.AppAreaBean;
import com.excelliance.kxqp.gs.bean.VipNotice;
import com.excelliance.kxqp.gs.dialog.PrivacyInfoDialog;
import com.excelliance.kxqp.gs.discover.model.ResponseData;
import com.excelliance.kxqp.gs.launch.a.h;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.kxqp.task.model.ShareBean;
import com.excelliance.kxqp.ui.detail.RankingDetailInfo;
import com.excelliance.kxqp.util.af;
import com.excelliance.user.account.ActivityLogin;
import com.tencent.connect.common.Constants;
import com.zero.support.core.task.Response;
import io.github.prototypez.service.account.request.LoginRequest;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.json.JSONException;
import org.json.JSONObject;
public class af {
public static final af f11711a = new af();
public static String f11712b = "DialogHelper";
public interface b {
void a();
}
private af() {
}
public static af a() {
return f11711a;
}
public static void a(final FragmentActivity fragmentActivity, String str, final Runnable runnable) {
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).e(fragmentActivity.getString(R.string.watch_game_video)).c(str).a(fragmentActivity.getString(R.string.how_to_play_oversea_game_sentence)).b(true).c(true).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
dialogFragment.dismiss();
CommonWebViewActivity.startActivity(FragmentActivity.this, "https://h5.ourplay.com.cn/html/guideVideo/");
runnable.run();
BiEventClick biEventClick = new BiEventClick();
biEventClick.current_page = "启动页";
biEventClick.button_name = "教程弹窗-观看视频教程按钮";
com.excean.bytedancebi.c.a.a().a(biEventClick);
}
});
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "WarnDialog");
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.current_page = "启动页";
biEventDialogShow.dialog_name = "教程弹窗";
com.excean.bytedancebi.c.a.a().a(biEventDialogShow);
}
public static void a(FragmentActivity fragmentActivity, String str) {
String string = fragmentActivity.getString(R.string.do_not_sell_game_accout_to_young_people_v2);
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).e(fragmentActivity.getString(R.string.agree_and_continue)).c(string).a(fragmentActivity.getString(R.string.hint)).b(true).c(true).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
dialogFragment.dismiss();
}
});
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "youngdialog");
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.current_page = str;
biEventDialogShow.dialog_name = "未成年人无法购买账号提示弹窗";
com.excean.bytedancebi.c.a.a().a(biEventDialogShow);
}
public static void a(FragmentActivity fragmentActivity, String str, String str2) {
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).e(fragmentActivity.getString(R.string.agree_and_continue)).c(str2).a(fragmentActivity.getString(R.string.hint)).b(true).c(true).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
dialogFragment.dismiss();
}
});
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "youngdialog");
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.current_page = str;
com.excean.bytedancebi.c.a.a().a(biEventDialogShow);
}
public static void a(FragmentActivity fragmentActivity, String str, String str2, final ContainerDialog.b bVar) {
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).e(fragmentActivity.getString(R.string.confirm)).c(str2).a(fragmentActivity.getString(R.string.info_ant_notify)).b(true).g(0).c(true).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
if (ContainerDialog.b.this != null) {
ContainerDialog.b.this.a(dialogFragment);
} else {
dialogFragment.dismiss();
}
}
});
aVar.a().show(fragmentActivity.getSupportFragmentManager(), str2);
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.current_page = str;
biEventDialogShow.dialog_type = "弹窗";
biEventDialogShow.dialog_name = "防沉迷不在可玩时间内提醒弹窗";
com.excelliance.kxqp.gs.g.c.a().a(biEventDialogShow);
}
public static void a(final FragmentActivity fragmentActivity, ExcellianceAppInfo excellianceAppInfo, final Runnable runnable) {
View inflate = LayoutInflater.from(fragmentActivity).inflate(R.layout.open_performance_mode_dialog, (ViewGroup) null, false);
((TextView) inflate.findViewById(R.id.tv_oepn_performance)).setText(Html.fromHtml(fragmentActivity.getString(R.string.please_open_power_mode)));
((CheckBox) inflate.findViewById(R.id.close_notice)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
by.a(FragmentActivity.this, "sp_config").a("sp_key_show_performance_time", 3);
}
});
final int[] iArr = {0};
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).e(fragmentActivity.getString(R.string.launch_immediately)).d(fragmentActivity.getString(R.string.exit_dialog_no)).a(inflate).a(fragmentActivity.getString(R.string.dialog_title_open_power_mode)).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
try {
Intent intent = new Intent("android.intent.action.POWER_USAGE_SUMMARY");
if (FragmentActivity.this.getPackageManager().resolveActivity(intent, 0) != null) {
FragmentActivity.this.startActivity(intent);
}
} catch (Exception e) {
e.printStackTrace();
}
BiEventClick biEventClick = new BiEventClick();
biEventClick.dialog_name = "华为-开启性能模式提醒弹窗";
biEventClick.button_name = "立即开启";
com.excean.bytedancebi.c.a.a().a(biEventClick);
iArr[0] = 1;
dialogFragment.dismiss();
}
}).a(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
dialogFragment.dismiss();
BiEventClick biEventClick = new BiEventClick();
biEventClick.dialog_name = "华为-开启性能模式提醒弹窗";
biEventClick.button_name = "取消";
com.excean.bytedancebi.c.a.a().a(biEventClick);
}
}).a(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (iArr[0] != 1) {
io.reactivex.g.a.b().a(runnable);
}
}
});
by.a(fragmentActivity, "sp_config").a("sp_key_show_performance_time", by.a(fragmentActivity, "sp_config").c("sp_key_show_performance_time", 0) + 1);
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "performanceDialog");
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.current_page = "启动页";
biEventDialogShow.dialog_name = "华为-开启性能模式提醒弹窗";
biEventDialogShow.game_packagename = excellianceAppInfo.appPackageName;
biEventDialogShow.set__items("game", excellianceAppInfo.datafinder_game_id);
com.excean.bytedancebi.c.a.a().a(biEventDialogShow);
}
public void a(boolean z, final FragmentActivity fragmentActivity, final String str, final String str2, final String str3) {
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder("若有任何问题,请联系OurPlay小助手。");
spannableStringBuilder.setSpan(new ForegroundColorSpan(fragmentActivity.getResources().getColor(R.color.task_text_ob_color)), 10, "若有任何问题,请联系OurPlay小助手。".length(), 33);
final PrivacyInfoDialog privacyInfoDialog = new PrivacyInfoDialog(101);
final com.excelliance.kxqp.gs.dialog.h hVar = new com.excelliance.kxqp.gs.dialog.h(fragmentActivity);
final a aVar = new a(privacyInfoDialog) {
@Override
void a(int i) {
if (i == 100 || i == 101) {
BiEventClick biEventClick = new BiEventClick();
if (i == 100) {
biEventClick.button_name = "下载按钮引导私域弹窗小助手按钮(弹窗右下角)";
} else if (i == 101) {
biEventClick.button_name = "下载按钮引导私域弹窗小助手引导(弹窗中间)";
}
biEventClick.dialog_name = "下载按钮点击引导私域弹窗";
biEventClick.button_function = "跳转私域小程序";
biEventClick.game_packagename = str2;
biEventClick.dialog_type = "弹窗";
biEventClick.set__items("game", str3);
com.excelliance.kxqp.gs.g.c.a().a(biEventClick);
}
hVar.a(fragmentActivity.getString(R.string.loading));
((com.excelliance.kxqp.api.b) com.zero.support.core.api.a.a(com.excelliance.kxqp.api.b.class)).a("siyu_download_qrcode").d().observe(fragmentActivity, new Observer<Response<WXconfig>>() {
@Override
public void onChanged(Response<WXconfig> response) {
if (AnonymousClass2.this.g != null && AnonymousClass2.this.g.isVisible()) {
AnonymousClass2.this.g.dismiss();
}
if (hVar != null && hVar.isShowing()) {
hVar.dismiss();
}
bu.a().b();
if (response.d() != null) {
WXconfig d = response.d();
if (d != null) {
af.a aVar2 = new af.a();
aVar2.f14919a = str;
aVar2.c = com.excelliance.kxqp.util.af.c(fragmentActivity);
aVar2.e = com.excelliance.kxqp.util.af.a(fragmentActivity);
aVar2.d = "下载按钮点击引导私域弹窗";
com.excelliance.kxqp.d.f.a(fragmentActivity, d.appid, com.excelliance.kxqp.util.af.a(fragmentActivity, d.deeplink), d, aVar2);
return;
}
return;
}
cg.a(fragmentActivity, fragmentActivity.getString(R.string.server_busy));
}
});
}
};
if (!z) {
aVar.a(103);
return;
}
spannableStringBuilder.setSpan(new ClickableSpan() {
@Override
public void onClick(View view) {
aVar.a(101);
}
}, 10, "若有任何问题,请联系OurPlay小助手。".length(), 33);
privacyInfoDialog.a(spannableStringBuilder);
privacyInfoDialog.a(new View.OnClickListener() {
@Override
public void onClick(View view) {
aVar.a(100);
}
}, new View.OnClickListener() {
@Override
public void onClick(View view) {
privacyInfoDialog.dismiss();
}
});
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.current_page = str;
biEventDialogShow.dialog_name = "下载按钮点击引导私域弹窗";
biEventDialogShow.game_packagename = str2;
biEventDialogShow.set__items("game", str3);
com.excean.bytedancebi.c.a.a().a(biEventDialogShow);
privacyInfoDialog.show(fragmentActivity.getSupportFragmentManager(), "PrivateDialog");
}
public static void a(final FragmentActivity fragmentActivity, final ExcellianceAppInfo excellianceAppInfo) {
View inflate = LayoutInflater.from(fragmentActivity).inflate(R.layout.dialog_invite_friends, (ViewGroup) null, false);
TextView textView = (TextView) inflate.findViewById(R.id.tv_invite_friends);
final int[] iArr = {0};
final com.excelliance.kxqp.gs.dialog.aq aqVar = new com.excelliance.kxqp.gs.dialog.aq(fragmentActivity);
aqVar.f(true);
aqVar.setCanceledOnTouchOutside(true);
aqVar.i(17);
aqVar.setContentView(inflate);
aqVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (iArr[0] == 1) {
com.excelliance.kxqp.gs.g.c.a().b("启动页", "邀请好友一起玩游戏", "立即邀请按钮", excellianceAppInfo.datafinder_game_id);
} else {
com.excelliance.kxqp.gs.g.c.a().b("启动页", "邀请好友一起玩游戏", "点击弹窗周边", excellianceAppInfo.datafinder_game_id);
}
by.a(fragmentActivity, "sp_config").a("INVITE_FRIENDS_DAY", new SimpleDateFormat("yyyy/MM/dd").format(new Date()));
by.a(fragmentActivity, "sp_config").a("INVITE_FRIENDS_TOTAL_TIME", by.a(fragmentActivity, "sp_config").c("INVITE_FRIENDS_TOTAL_TIME", 0) + 1);
}
});
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
iArr[0] = 1;
if (aqVar != null) {
aqVar.dismiss();
}
by.a(fragmentActivity, "sp_config").a("INVITE_FRIENDS_TOTAL_TIME", 3);
af.b(fragmentActivity, excellianceAppInfo);
}
});
aqVar.show();
com.excelliance.kxqp.gs.g.c.a().a("邀请好友一起玩游戏", excellianceAppInfo.datafinder_game_id, "启动页");
}
public static void b(final FragmentActivity fragmentActivity, final ExcellianceAppInfo excellianceAppInfo) {
Log.d("getVip", "invite success time is" + by.a(fragmentActivity, "sp_total_info").c("success_award", 0));
View inflate = LayoutInflater.from(fragmentActivity).inflate(R.layout.dialog_share_wx_qq, (ViewGroup) null, false);
LinearLayout linearLayout = (LinearLayout) inflate.findViewById(R.id.ll_wx);
LinearLayout linearLayout2 = (LinearLayout) inflate.findViewById(R.id.ll_qq);
LinearLayout linearLayout3 = (LinearLayout) inflate.findViewById(R.id.dialog_container);
final int[] iArr = {0};
final Dialog dialog = new Dialog(fragmentActivity, R.style.theme_dialog_no_title2);
dialog.setContentView(inflate);
Window window = dialog.getWindow();
WindowManager.LayoutParams attributes = window.getAttributes();
attributes.width = -1;
attributes.height = -1;
attributes.gravity = 80;
window.setBackgroundDrawable(new ColorDrawable(0));
window.setAttributes(attributes);
window.setContentView(inflate);
window.setBackgroundDrawable(new ColorDrawable(0));
dialog.setCanceledOnTouchOutside(true);
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
String str = ExcellianceAppInfo.this != null ? ExcellianceAppInfo.this.datafinder_game_id : "";
String str2 = ExcellianceAppInfo.this != null ? "启动页" : "邀请好友活动说明页";
if (iArr[0] == 1) {
com.excelliance.kxqp.gs.g.c.a().b(str2, "微信/QQ分享弹窗", "点击QQ按钮", str);
} else if (iArr[0] == 2) {
com.excelliance.kxqp.gs.g.c.a().b(str2, "微信/QQ分享弹窗", "点击微信按钮", str);
} else {
com.excelliance.kxqp.gs.g.c.a().b(str2, "微信/QQ分享弹窗", "点击弹窗周边", str);
}
}
});
new ShareBean();
linearLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ShareBean shareBean = new ShareBean();
String string = FragmentActivity.this.getResources().getString(R.string.give_you_three_day_vip);
String string2 = FragmentActivity.this.getResources().getString(R.string.paly_with_friends);
shareBean.setTitle(string);
shareBean.setAppName("ourPlay");
iArr[0] = 2;
String str = bc.E + "?uqid=" + com.excelliance.game.collection.e.i.c(com.zero.support.core.b.b());
shareBean.setUrl(str);
Bitmap decodeResource = BitmapFactory.decodeResource(FragmentActivity.this.getResources(), R.drawable.icon);
if (decodeResource != null) {
shareBean.setBitmap(decodeResource);
}
com.excelliance.user.account.f.e.b(af.f11712b, ":wx share url " + str);
if (excellianceAppInfo != null && !cd.a(excellianceAppInfo.getIconPath())) {
Bitmap decodeFile = BitmapFactory.decodeFile(excellianceAppInfo.getIconPath());
if (decodeFile != null) {
shareBean.setBitmap(decodeFile);
}
string2 = string2 + excellianceAppInfo.appName;
}
shareBean.setContent(string2);
com.excelliance.kxqp.task.g.h.a(FragmentActivity.this).a(shareBean, 0);
dialog.dismiss();
}
});
linearLayout2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String str = bc.E + "?uqid=" + com.excelliance.game.collection.e.i.c(com.zero.support.core.b.b());
String str2 = "";
String string = FragmentActivity.this.getResources().getString(R.string.paly_with_friends);
iArr[0] = 1;
if (excellianceAppInfo != null) {
str2 = excellianceAppInfo.getIconPath();
string = string + excellianceAppInfo.appName;
}
com.excelliance.user.account.f.e.b(af.f11712b, ":qq share url " + str);
Log.i(af.f11712b, "onClick: iconPath " + str2);
com.excelliance.kxqp.task.g.h.a(FragmentActivity.this).c(ShareBean.getImageTextQQBean(FragmentActivity.this.getResources().getString(R.string.give_you_three_day_vip), string, str, "", str2));
dialog.dismiss();
}
});
linearLayout3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (dialog == null || !dialog.isShowing()) {
return;
}
dialog.dismiss();
}
});
String str = excellianceAppInfo != null ? excellianceAppInfo.datafinder_game_id : "";
String str2 = excellianceAppInfo != null ? "启动页" : "邀请好友活动说明页";
if (!dialog.isShowing()) {
dialog.show();
}
com.excelliance.kxqp.gs.g.c.a().a("微信/QQ分享弹窗", str, str2);
}
public static void a(final FragmentActivity fragmentActivity, DialogInterface.OnDismissListener onDismissListener) {
String string = fragmentActivity.getString(R.string.friend_give_3_day_vip);
String string2 = fragmentActivity.getString(R.string.friend_give_3_day_vip_and_play);
String string3 = fragmentActivity.getString(R.string.get_immediately);
int c = by.a(fragmentActivity, "sp_config").c("invite_dialog_time_award", 0);
if (c > 20) {
Log.d("getVip", "moreThan 20");
return;
}
ContainerDialog.a aVar = new ContainerDialog.a();
final int[] iArr = {0};
aVar.a(true).e(fragmentActivity.getString(R.string.agree_and_continue)).a(string).e(string3).b(string2).d(R.color.get_vip_dialog_content_color).a(fragmentActivity.getString(R.string.get_3_days_vip)).c(R.color.get_vip_dialog_title_color).b(R.drawable.dialog_get_vip).e(fragmentActivity.getResources().getColor(R.color.white)).f(R.drawable.get_3_days_vip_button_bg).b(true).c(true).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
if (bx.a().b(FragmentActivity.this)) {
iArr[0] = 1;
Intent intent = new Intent();
intent.setAction("com.excelliance.kxqp.inviting_vip");
FragmentActivity.this.sendBroadcast(intent);
} else {
iArr[0] = 2;
by.a(FragmentActivity.this, "sp_total_info").a("actor_award", 1);
ActivityLogin.a(new LoginRequest.Builder((Activity) FragmentActivity.this).build());
}
dialogFragment.dismiss();
}
}).a(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
BiEventClick biEventClick = new BiEventClick();
biEventClick.current_page = "启动页";
biEventClick.dialog_name = "邀请方奖励弹窗";
if (iArr[0] == 1) {
biEventClick.button_function = "成功领取奖励";
biEventClick.button_name = "立即领取按钮";
} else if (iArr[0] == 2) {
biEventClick.button_function = "跳转OP登陆";
biEventClick.button_name = "立即领取按钮";
} else {
biEventClick.button_function = "未领取奖励";
biEventClick.button_name = "点弹窗周边";
}
com.excean.bytedancebi.c.a.a().a(biEventClick);
}
});
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "showSendVipToFriend");
com.excelliance.kxqp.gs.g.c.a().a("邀请方奖励弹窗", "启动页");
by.a(fragmentActivity, "sp_config").a("invite_dialog_time_award", c + 1);
}
public static void b(final FragmentActivity fragmentActivity, final DialogInterface.OnDismissListener onDismissListener) {
String string = fragmentActivity.getString(R.string.friend_give_3_day_vip);
String string2 = fragmentActivity.getString(R.string.get_it);
final int[] iArr = {0};
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).a(string).e(string2).c(R.color.get_vip_dialog_title_color).d(R.color.get_vip_dialog_content_color).b(R.drawable.dialog_get_vip).e(fragmentActivity.getResources().getColor(R.color.white)).f(R.drawable.get_3_days_vip_button_bg).g(0).b(true).c(true).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
if (bx.a().b(FragmentActivity.this)) {
iArr[0] = 1;
Intent intent = new Intent();
intent.setAction(" com.excelliance.kxqp.invited_vip");
FragmentActivity.this.sendBroadcast(intent);
} else {
iArr[0] = 2;
com.excelliance.kxqp.gs.router.a.a.f8074a.invokeLogin(new LoginRequest.Builder((Activity) FragmentActivity.this).build());
by.a(FragmentActivity.this, "sp_total_info").a("actor_award", 2);
by.a(FragmentActivity.this, "sp_total_info").a("HAS_WAIT_VIP_DATA", 1);
}
dialogFragment.dismiss();
}
}).a(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
by.a(FragmentActivity.this, "sp_config").a("INVITE_FRIENDS_AWARD_DAY", new SimpleDateFormat("yyyy/MM/dd").format(new Date()));
BiEventClick biEventClick = new BiEventClick();
biEventClick.current_page = "启动页";
biEventClick.dialog_name = "被邀请方奖励弹窗";
biEventClick.button_name = "收下按钮";
biEventClick.button_to_submit_information = by.a(FragmentActivity.this, "sp_config").b("friends_quid", "");
if (iArr[0] == 1) {
biEventClick.button_function = "成功领取奖励";
} else if (iArr[0] == 2) {
biEventClick.button_function = "跳转OP登陆";
} else {
by.a(FragmentActivity.this, "sp_config").a("INVITE_FRIENDS_TOTAL_NOT", by.a(FragmentActivity.this, "sp_config").c("INVITE_FRIENDS_TOTAL_NOT", 0) + 1);
biEventClick.button_function = "未领取奖励";
biEventClick.button_name = "点击弹窗周边";
}
com.excean.bytedancebi.c.a.a().a(biEventClick);
if (onDismissListener != null) {
onDismissListener.onDismiss(dialogInterface);
}
}
});
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "showGetVipFromVipFromFriendss");
com.excelliance.kxqp.gs.g.c.a().a("被邀请方奖励弹窗", "启动页");
}
public abstract class a {
PrivacyInfoDialog g;
abstract void a(int i);
public a(PrivacyInfoDialog privacyInfoDialog) {
this.g = privacyInfoDialog;
}
}
public static void a(FragmentActivity fragmentActivity, List<VipNotice> list, int i) {
List<VipNotice> page;
if (list == null || list.size() <= 0 || (page = VipNotice.VipNoticeHelper.getPage(list, i)) == null || page.size() <= 0) {
return;
}
Iterator<VipNotice> it = page.iterator();
while (it.hasNext()) {
a(fragmentActivity, it.next());
}
}
public static void a(final FragmentActivity fragmentActivity, final VipNotice vipNotice) {
final Set<String> b2 = by.a(fragmentActivity, "sp_config").b("sp_key_has_show_vip_notice", new HashSet());
if (vipNotice == null || b2.contains(String.valueOf(vipNotice.id))) {
return;
}
ContainerDialog.a aVar = new ContainerDialog.a();
String str = vipNotice.explain;
String string = fragmentActivity.getResources().getString(R.string.agree_and_continue);
if (vipNotice.isTypeYinXiao()) {
string = fragmentActivity.getResources().getString(R.string.open_vip);
} else if (vipNotice.isTypeNotice()) {
string = fragmentActivity.getResources().getString(R.string.agree_and_continue);
}
aVar.a(true).e(string).b(str).a(fragmentActivity.getString(R.string.hint)).b(true).c(true).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
if (VipNotice.this.isTypeYinXiao()) {
VipNotice.this.doYinXiaoAction(fragmentActivity);
}
dialogFragment.dismiss();
}
}).a(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
b2.add(String.valueOf(vipNotice.id));
by.a(fragmentActivity, "sp_config").a("sp_key_has_show_vip_notice", b2);
}
});
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "vipNotice");
}
public static void a(FragmentActivity fragmentActivity, String str, final io.reactivex.n<? super h.b> nVar, final h.b bVar) {
ExcellianceAppInfo b2 = com.excelliance.kxqp.repository.a.a(fragmentActivity).b("com.levelinfinite.apexlegendsmobile");
boolean z = b2 != null && b2.isInstalled();
String str2 = z ? "接游戏官方通知,后续APEX国际服将停止对国内大陆用户的服务,建议启动APEX英雄(港台服)" : "接游戏官方通知,后续APEX国际服将停止对国内大陆用户的服务,建议下载APEX英雄(港台服)";
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).e(fragmentActivity.getString(R.string.exit_dialog_yes)).d(fragmentActivity.getString(R.string.over_sea_lanuch_regin)).c(str2).a(fragmentActivity.getString(R.string.first_guide_dialog_title)).b(true).c(true).a(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
dialogFragment.dismiss();
io.reactivex.g.a.b().a(new Runnable() {
@Override
public void run() {
io.reactivex.n.this.b_(bVar);
}
});
}
}).b(new AnonymousClass19(z, fragmentActivity, str, nVar));
aVar.a().show(fragmentActivity.getSupportFragmentManager(), "apx");
}
static class AnonymousClass19 implements ContainerDialog.b {
final boolean f11729a;
final FragmentActivity f11730b;
final String c;
final io.reactivex.n d;
AnonymousClass19(boolean z, FragmentActivity fragmentActivity, String str, io.reactivex.n nVar) {
this.f11729a = z;
this.f11730b = fragmentActivity;
this.c = str;
this.d = nVar;
}
@Override
public void a(DialogFragment dialogFragment) {
dialogFragment.dismiss();
if (this.f11729a) {
Intent intent = new Intent();
intent.setAction(this.f11730b.getPackageName() + ".action.main.start.app.direct");
intent.putExtra(WebActionRouter.KEY_PKG, "com.levelinfinite.apexlegendsmobile");
this.f11730b.sendBroadcast(intent);
} else {
tp.f(new Runnable() {
@Override
public void run() {
JSONObject i = cn.i(AnonymousClass19.this.f11730b);
try {
i.put(com.umeng.analytics.pro.am.aE, 2);
i.put("id", AnonymousClass19.this.c);
i.put("branch", by.a(AnonymousClass19.this.f11730b, "global_config").c("defDisplayStyle", -1));
i.put("userid", bx.a().a(AnonymousClass19.this.f11730b));
i.put(AppAreaBean.AREAS, "1");
if (com.excelliance.kxqp.util.d.b.c) {
i.put("supportMulti", "1");
}
i.put("controlapi", 1);
if (com.excelliance.kxqp.gs.util.b.bh(AnonymousClass19.this.f11730b)) {
i.put("isFromDomestic", "1");
}
} catch (JSONException e) {
e.printStackTrace();
}
ExcellianceAppInfo appInfo = ((RankingDetailInfo) new com.excelliance.kxqp.gs.discover.bbs.c(AnonymousClass19.this.f11730b.getApplicationContext()).a(i.toString(), bc.c, new com.excelliance.kxqp.gs.discover.a.c<RankingDetailInfo>() {
@Override
public ResponseData<RankingDetailInfo> a(String str) {
try {
return com.excelliance.kxqp.ui.detail.h.a(AnonymousClass19.this.f11730b, str);
} catch (Exception e2) {
e2.printStackTrace();
return null;
}
}
}).data).getAppInfo();
if (appInfo != null) {
Intent intent2 = new Intent();
intent2.putExtra("appInfo", appInfo);
intent2.setAction("gspace.intent.action.download.by.pkg");
AnonymousClass19.this.f11730b.sendBroadcast(intent2);
}
}
});
}
io.reactivex.g.a.b().a(new Runnable() {
@Override
public void run() {
AnonymousClass19.this.d.u_();
}
});
}
}
public static ContainerDialog a(final FragmentActivity fragmentActivity, final boolean z) {
final SharedPreferences sharedPreferences = fragmentActivity.getSharedPreferences(Constants.PARAM_PLATFORM, 4);
final int[] iArr = {Integer.parseInt(sharedPreferences.getString("update_info", "0"))};
if ((iArr[0] & 4) == 0 && z) {
return null;
}
final int i = fragmentActivity.getSharedPreferences("kxqp", 4).getInt("sp_key_update_force_update_vm", 0);
String string = fragmentActivity.getSharedPreferences("kxqp", 4).getString("sp_key_update_vm_msg", "");
Log.d(f11712b, "VM_ showUpdateVmMsg: forceUpdate " + i + " msg " + string);
ContainerDialog.b bVar = new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
int[] iArr2 = iArr;
iArr2[0] = iArr2[0] & (-5);
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.putString("update_info", String.valueOf(iArr[0]));
edit.commit();
Log.d(af.f11712b, "onClick:reset " + iArr[0]);
dialogFragment.dismiss();
com.excean.c.a.s.a((Context) fragmentActivity, GameUtil.getIntance().r(), false);
}
};
ContainerDialog.a aVar = new ContainerDialog.a();
aVar.a(true).e(fragmentActivity.getString(R.string.restart_take_effect)).b(string).a(fragmentActivity.getString(R.string.hint)).g(0).c(true).b(bVar).a(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (i == 2 && z) {
fragmentActivity.sendBroadcast(new Intent(fragmentActivity.getPackageName() + "auto_open_last_install_app"));
}
}
});
if (!z && i != 0) {
aVar.e(fragmentActivity.getString(R.string.is_downloading)).b((ContainerDialog.b) null);
if (i == 1 && !cd.a(string)) {
aVar.b(false);
aVar.c(false);
}
ContainerDialog a2 = aVar.a();
a2.show(fragmentActivity.getSupportFragmentManager(), string);
return a2;
}
aVar.e(fragmentActivity.getString(R.string.restart_take_effect)).b(bVar);
if (i == 1 && !cd.a(string)) {
aVar.b(false);
aVar.c(false);
ContainerDialog a3 = aVar.a();
a3.show(fragmentActivity.getSupportFragmentManager(), string);
return a3;
}
if (i == 1 && cd.a(string)) {
iArr[0] = iArr[0] & (-5);
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.putString("update_info", String.valueOf(iArr[0]));
edit.commit();
com.excean.c.a.s.a((Context) fragmentActivity, GameUtil.getIntance().r(), false);
return null;
}
if (i == 2 && !cd.a(string)) {
aVar.d(fragmentActivity.getString(R.string.pay_no));
aVar.a(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
dialogFragment.dismiss();
}
});
ContainerDialog a4 = aVar.a();
a4.show(fragmentActivity.getSupportFragmentManager(), string);
return a4;
}
if (i != 2 || !cd.a(string)) {
return null;
}
fragmentActivity.sendBroadcast(new Intent(fragmentActivity.getPackageName() + "auto_open_last_install_app"));
return null;
}
}