OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 ai.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.launch.function;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import com.excean.ggspace.main.R;
import com.excelliance.kxqp.gs.launch.a.h;
import com.excelliance.kxqp.gs.ui.VideoPlayerActivity;
import com.excelliance.kxqp.gs.util.bf;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.bz;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
public class ai implements io.reactivex.d.e<h.b, io.reactivex.l<h.b>> {
private static String f6892a;
private Dialog f6893b;
private boolean c = false;
@Override
public io.reactivex.l<h.b> a(final h.b bVar) throws Exception {
return new io.reactivex.l<h.b>() {
@Override
public void a(final io.reactivex.n<? super h.b> nVar) {
Activity b2 = bVar.b();
Runnable runnable = new Runnable() {
@Override
public void run() {
nVar.b_(bVar);
}
};
if (!bf.e(b2)) {
runnable.run();
return;
}
ExcellianceAppInfo e = bVar.e();
if (ai.this.a(e)) {
if (!e.isApkInstalled() || !e.isObbInstalled()) {
runnable.run();
return;
}
if (!by.a(b2, "sp_config").b("sp_key_video_tutorial_dialog_show" + e.appPackageName, false).booleanValue()) {
ai.this.a(e.appPackageName);
ai.this.a(b2, runnable);
by.a(b2, "sp_config").a("sp_key_video_tutorial_dialog_show" + e.appPackageName, true);
bz.a().a(b2, 160000, 1, "点击相关游戏弹窗弹框");
return;
}
}
runnable.run();
}
};
}
public boolean a(ExcellianceAppInfo excellianceAppInfo) {
if (excellianceAppInfo == null) {
return false;
}
String str = excellianceAppInfo.appPackageName;
return "com.riotgames.league.wildrift".equals(str) || "com.riotgames.league.wildrifttw".equals(str) || "com.riotgames.league.teamfighttactics".equals(str);
}
public void a(String str) {
if ("com.riotgames.league.teamfighttactics".equals(str)) {
f6892a = "https://cdn.ourplay.com.cn/166b8ab1ef3d4906011ae31139773b26.mp4";
} else if ("com.riotgames.league.wildrift".equals(str) || "com.riotgames.league.wildrifttw".equals(str)) {
f6892a = "https://cdn.ourplay.com.cn/582d0c7804e7da070822baff4207148f.mp4";
}
}
public void a(final Context context, final Runnable runnable) {
if (this.f6893b == null) {
this.f6893b = new Dialog(context, R.style.pop_custom_dialog_theme);
View inflate = LayoutInflater.from(context).inflate(R.layout.video_tutorial_layout, (ViewGroup) null, false);
inflate.findViewById(R.id.i_know_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (ai.this.f6893b == null || !ai.this.f6893b.isShowing()) {
return;
}
ai.this.f6893b.dismiss();
}
});
inflate.findViewById(R.id.watch_video_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ai.this.c = true;
if (ai.this.f6893b != null && ai.this.f6893b.isShowing()) {
ai.this.f6893b.dismiss();
}
VideoPlayerActivity.a(context, ai.f6892a, 0);
}
});
this.f6893b.setContentView(inflate);
Window window = this.f6893b.getWindow();
if (window != null) {
int i = context.getResources().getDisplayMetrics().widthPixels;
WindowManager.LayoutParams attributes = window.getAttributes();
attributes.width = i - com.excelliance.kxqp.util.p.a(context, 60.0f);
attributes.gravity = 17;
window.setAttributes(attributes);
}
}
this.f6893b.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (runnable == null || ai.this.c) {
return;
}
runnable.run();
}
});
if (this.f6893b == null || this.f6893b.isShowing()) {
return;
}
this.f6893b.show();
}
}