正在查看: Antivirus Cleaner v1.2.0.0 应用的 TURewardVideoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Antivirus Cleaner v1.2.0.0 应用的 TURewardVideoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.thinkup.expressad.reward.player;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import android.widget.FrameLayout;
import com.thinkup.core.common.m0.oo0;
import com.thinkup.core.common.o0.no;
import com.thinkup.core.common.o0.o0n;
import com.thinkup.expressad.atsignalcommon.windvane.WindVaneWebView;
import com.thinkup.expressad.foundation.m0.mn;
import com.thinkup.expressad.foundation.m0.oom;
import com.thinkup.expressad.foundation.o0.o0m;
import com.thinkup.expressad.reward.o.oo;
import com.thinkup.expressad.video.bt.module.TUBTContainer;
import com.thinkup.expressad.video.bt.module.TUTempContainer;
import com.thinkup.expressad.video.bt.module.m.m0;
import com.thinkup.expressad.video.module.TUVideoView;
import com.thinkup.expressad.video.signal.activity.AbstractJSActivity;
import com.thinkup.expressad.videocommon.m.nn;
import com.thinkup.expressad.videocommon.o;
import com.thinkup.expressad.videocommon.oo.o0;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
public class TURewardVideoActivity extends AbstractJSActivity {
public static String m = "userId";
public static String m0 = "hasRelease";
public static String mm = "ivRewardValueType";
public static String mn = "ivRewardValue";
public static String mo = "ivRewardMode";
public static String n = "reward";
public static String n0 = "extraData";
public static String nm = "lRid";
public static String nn = "at_intercept_show";
public static String no = "baserequestInfo";
public static String o = "unitId";
public static String o0 = "mute";
public static String om = "isBid";
private static final String omm = "TURewardVideoActivity";
public static String on = "isBigOffer";
public static String oo = "isIV";
private int m0n;
private m0 mm0;
private o0 mmo;
private com.thinkup.expressad.videocommon.m.o mn0;
private List<com.thinkup.expressad.videocommon.m.o> mnm;
private List<com.thinkup.expressad.foundation.o0.o0> mnn;
private com.thinkup.expressad.foundation.o0.o0 mno;
private int mo0;
private int moo;
private TUTempContainer n00;
private WindVaneWebView n0m;
private com.thinkup.expressad.video.bt.module.o.o n0n;
private TUBTContainer n0o;
private com.thinkup.basead.o.o nmo;
private String no0;
private boolean nom;
private String noo;
oo0 o00;
long o0m;
long o0n;
com.thinkup.expressad.foundation.o0.o0 o0o;
private String omn;
private String on0;
private com.thinkup.expressad.videocommon.n.n onm;
private String ono;
long oo0;
private int onn = 2;
private int m00 = 2;
private boolean m0o = false;
private boolean m0m = false;
private boolean mom = false;
private boolean mon = false;
private boolean mmm = false;
private boolean mmn = false;
private int non = 1;
private int nm0 = 0;
private int nmm = 0;
private int nmn = 0;
private int nn0 = 0;
private int nno = 0;
private int nnm = 0;
private com.thinkup.expressad.video.dynview.om.o nnn = new com.thinkup.expressad.video.dynview.om.o() {
@Override
public final void o(Map<String, Object> map) {
if (map.containsKey("mute")) {
TURewardVideoActivity.this.onn = ((Integer) map.get("mute")).intValue();
}
if (map.containsKey(com.thinkup.expressad.foundation.on.on.o.m.nom)) {
int intValue = ((Integer) map.get(com.thinkup.expressad.foundation.on.on.o.m.nom)).intValue();
if (TURewardVideoActivity.this.mnn == null || TURewardVideoActivity.this.mnn.size() <= 0 || intValue <= 0) {
return;
}
TURewardVideoActivity tURewardVideoActivity = TURewardVideoActivity.this;
tURewardVideoActivity.mno = (com.thinkup.expressad.foundation.o0.o0) tURewardVideoActivity.mnn.get(intValue);
TURewardVideoActivity.m(TURewardVideoActivity.this);
int i = intValue - 1;
if (TURewardVideoActivity.this.mnn.get(i) != null) {
TURewardVideoActivity tURewardVideoActivity2 = TURewardVideoActivity.this;
TURewardVideoActivity.m(tURewardVideoActivity2, ((com.thinkup.expressad.foundation.o0.o0) tURewardVideoActivity2.mnn.get(i)).onmo());
}
TURewardVideoActivity tURewardVideoActivity3 = TURewardVideoActivity.this;
TURewardVideoActivity.this.mno.o0(tURewardVideoActivity3.o(tURewardVideoActivity3.mno.mo(), TURewardVideoActivity.this.non));
TURewardVideoActivity.this.mno.o(TURewardVideoActivity.this.non);
TURewardVideoActivity.this.mno.m(1);
TURewardVideoActivity tURewardVideoActivity4 = TURewardVideoActivity.this;
tURewardVideoActivity4.m(tURewardVideoActivity4.mno);
}
}
};
private com.thinkup.expressad.video.dynview.om.o0 o000 = new com.thinkup.expressad.video.dynview.om.o0() {
@Override
public final void o(com.thinkup.expressad.foundation.o0.o0 o0Var) {
if (o0Var == null) {
TURewardVideoActivity.this.m("campaign is null");
return;
}
if (TURewardVideoActivity.this.n0o != null) {
new com.thinkup.expressad.video.dynview.m0.m().o0(TURewardVideoActivity.this.n0o);
}
TURewardVideoActivity.this.mno = o0Var;
TURewardVideoActivity.this.mno.m(2);
TURewardVideoActivity tURewardVideoActivity = TURewardVideoActivity.this;
tURewardVideoActivity.m(tURewardVideoActivity.mno);
}
@Override
public final void o() {
if (TURewardVideoActivity.this.n0o != null) {
new com.thinkup.expressad.video.dynview.m0.m().o0(TURewardVideoActivity.this.n0o);
}
TURewardVideoActivity.om(TURewardVideoActivity.this);
TURewardVideoActivity.this.m();
if (TURewardVideoActivity.this.n00 != null) {
TURewardVideoActivity.this.n00.setNotchPadding(TURewardVideoActivity.this.nnm, TURewardVideoActivity.this.nmm, TURewardVideoActivity.this.nn0, TURewardVideoActivity.this.nmn, TURewardVideoActivity.this.nno);
}
}
};
m ooo = new m() {
public String o = "1";
@Override
public final void n() {
this.o = "1";
TURewardVideoActivity.this.o("4", 0L);
}
@Override
public final String o() {
return this.o;
}
@Override
public final void o0() {
if (TextUtils.equals(this.o, "1")) {
this.o = "2";
}
TURewardVideoActivity tURewardVideoActivity = TURewardVideoActivity.this;
StringBuilder sb = new StringBuilder("5-");
TURewardVideoActivity tURewardVideoActivity2 = TURewardVideoActivity.this;
sb.append(tURewardVideoActivity2.o0n <= tURewardVideoActivity2.oo0 ? "2" : "1");
tURewardVideoActivity.o(sb.toString(), 0L);
}
@Override
public final void oo() {
if (TextUtils.equals(this.o, "1")) {
this.o = "3";
TURewardVideoActivity tURewardVideoActivity = TURewardVideoActivity.this;
StringBuilder sb = new StringBuilder("6-");
TURewardVideoActivity tURewardVideoActivity2 = TURewardVideoActivity.this;
sb.append(tURewardVideoActivity2.o0n <= tURewardVideoActivity2.oo0 ? "2" : "1");
tURewardVideoActivity.o(sb.toString(), 0L);
}
}
@Override
public final void m() {
}
@Override
public final void om() {
}
};
com.thinkup.expressad.video.o.o oom = new com.thinkup.expressad.video.o.o() {
@Override
public final void o(boolean z) {
if (z) {
TURewardVideoActivity.this.m00 = 1;
} else {
TURewardVideoActivity.this.m00 = 2;
}
TURewardVideoActivity.this.on();
}
};
BroadcastReceiver oon = new BroadcastReceiver() {
@Override
public final void onReceive(Context context, Intent intent) {
TURewardVideoActivity.this.finish();
}
};
public static final class o implements Runnable {
private final String m;
private final String n;
private final List<com.thinkup.expressad.videocommon.m.o> o;
public o(List<com.thinkup.expressad.videocommon.m.o> list, String str, String str2) {
this.o = list;
this.m = str;
this.n = str2;
}
@Override
public final void run() {
try {
List<com.thinkup.expressad.videocommon.m.o> list = this.o;
if (list == null || list.size() <= 0) {
return;
}
for (com.thinkup.expressad.videocommon.m.o oVar : this.o) {
if (oVar != null && oVar.nm() != null) {
com.thinkup.expressad.foundation.o0.o0 nm = oVar.nm();
String str = nm.noo() + nm.on00() + nm.mnm();
nn n = com.thinkup.expressad.videocommon.m.n.o().n(this.m);
if (n != null) {
try {
n.m(str);
} catch (Exception unused) {
}
}
if (nm.mm0() != null) {
if (!TextUtils.isEmpty(nm.mm0().oo())) {
com.thinkup.expressad.videocommon.o.m(this.m + "_" + nm.on00() + "_" + this.n + "_" + nm.mm0().oo());
com.thinkup.expressad.videocommon.o.m(nm.om0(), nm);
}
if (!TextUtils.isEmpty(nm.o0m0())) {
com.thinkup.expressad.videocommon.o.m(this.m + "_" + this.n + "_" + nm.o0m0());
}
}
}
}
} catch (Exception e) {
e.getMessage();
}
}
}
public static int m(TURewardVideoActivity tURewardVideoActivity) {
int i = tURewardVideoActivity.non;
tURewardVideoActivity.non = i + 1;
return i;
}
public static boolean om(TURewardVideoActivity tURewardVideoActivity) {
tURewardVideoActivity.mom = true;
return true;
}
@Override
public void finish() {
int o2 = mn.o(this, "thinkup_reward_activity_close", mn.om);
int o3 = mn.o(this, "thinkup_reward_activity_stay", mn.om);
if (o2 > 1 && o3 > 1) {
overridePendingTransition(o3, o2);
}
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.onDestroy();
this.n00 = null;
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onDestroy();
this.n0o = null;
}
com.thinkup.expressad.foundation.om.m.o().n(this.omn + "_1");
com.thinkup.expressad.foundation.om.m.o().n(this.omn + "_2");
super.finish();
}
@Override
public void onBackPressed() {
super.onBackPressed();
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.onBackPressed();
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onBackPressed();
}
}
@Override
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
if (this.n00 != null) {
o(configuration.orientation);
this.n00.onConfigurationChanged(configuration);
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onConfigurationChanged(configuration);
}
}
@Override
public void onCreate(Bundle bundle) {
CopyOnWriteArrayList<com.thinkup.expressad.foundation.o0.o0> o2;
List<com.thinkup.expressad.videocommon.m.o> list;
String str = "";
try {
super.onCreate(bundle);
com.thinkup.expressad.m.omo = true;
com.thinkup.expressad.foundation.m.m.n().m(this);
Intent intent = getIntent();
String stringExtra = intent.getStringExtra(o);
this.omn = stringExtra;
if (stringExtra != null) {
try {
o2 = com.thinkup.expressad.videocommon.m.n.o().o(this.omn);
} catch (Throwable unused) {
}
} else {
o2 = null;
}
this.o0o = o2 != null ? o2.get(0) : null;
Serializable serializableExtra = intent.getSerializableExtra(no);
this.o00 = serializableExtra instanceof oo0 ? (oo0) serializableExtra : null;
o("1", 0L);
this.mm0 = com.thinkup.expressad.reward.m.o.no.get(this.omn);
this.on0 = intent.getStringExtra(com.thinkup.expressad.m.omm);
this.onm = com.thinkup.expressad.videocommon.n.n.m(intent.getStringExtra(n));
this.ono = intent.getStringExtra(m);
this.onn = intent.getIntExtra(o0, 2);
this.m0o = intent.getBooleanExtra(oo, false);
this.m0m = intent.getBooleanExtra(om, false);
this.noo = intent.getStringExtra(n0);
if (this.m0o) {
this.m0n = intent.getIntExtra(mo, 0);
this.mo0 = intent.getIntExtra(mm, 0);
this.moo = intent.getIntExtra(mn, 0);
}
this.mom = intent.getBooleanExtra(on, false);
this.mnm = com.thinkup.expressad.videocommon.m.n.o().m(this.omn);
this.mnn = com.thinkup.expressad.videocommon.m.n.o().o(this.omn);
int o3 = mn.o(getApplicationContext(), "thinkup_more_offer_activity", "layout");
if (o3 < 0) {
m("no thinkup_more_offer_activity layout");
return;
}
setContentView(o3);
if (TextUtils.isEmpty(this.omn)) {
m("data empty error");
return;
}
com.thinkup.expressad.video.signal.factory.m mVar = new com.thinkup.expressad.video.signal.factory.m(this);
this.omo = mVar;
o(mVar);
if (this.mm0 == null) {
m("showRewardListener is null");
return;
}
o0 o4 = oo.o().o(this.on0, this.omn);
this.mmo = o4;
if (o4 == null) {
o0 o5 = com.thinkup.expressad.videocommon.oo.n.o().o(com.thinkup.expressad.foundation.m.m.n().om(), this.omn);
this.mmo = o5;
if (o5 == null) {
this.mmo = com.thinkup.expressad.videocommon.oo.n.o().o(com.thinkup.expressad.foundation.m.m.n().om(), this.omn, this.m0o);
}
}
o0 o0Var = this.mmo;
if (o0Var != null) {
this.onm.o(o0Var.no());
this.onm.o(this.mmo.nm());
}
com.thinkup.expressad.videocommon.n.n nVar = this.onm;
if (nVar != null && nVar.m() <= 0) {
this.onm.o(1);
}
int o6 = mn.o(this, "thinkup_reward_activity_open", mn.om);
int o7 = mn.o(this, "thinkup_reward_activity_stay", mn.om);
if (o6 > 1 && o7 > 1) {
overridePendingTransition(o6, o7);
}
if (bundle != null) {
try {
this.mmn = bundle.getBoolean(m0);
} catch (Exception e) {
e.printStackTrace();
}
}
if (this.oon != null) {
IntentFilter intentFilter = new IntentFilter();
String str2 = nn;
if (this.o00 != null) {
str2 = nn + this.o00.o0;
}
intentFilter.addAction(str2);
no.o(this).o(this.oon, intentFilter);
}
if (!this.mom) {
List<com.thinkup.expressad.videocommon.m.o> list2 = this.mnm;
if (list2 != null && list2.size() > 0) {
this.mn0 = this.mnm.get(0);
}
com.thinkup.expressad.videocommon.m.o oVar = this.mn0;
if (oVar != null) {
this.mno = oVar.nm();
this.mn0.o(true);
this.mn0.m(false);
}
if (this.mn0 == null || this.mno == null || this.onm == null) {
m("data empty error");
}
m();
return;
}
this.no0 = "";
List<com.thinkup.expressad.foundation.o0.o0> list3 = this.mnn;
if (list3 != null && list3.size() > 0) {
com.thinkup.expressad.foundation.o0.o0 o0Var2 = this.mnn.get(0);
str = o0Var2.o0m0();
this.no0 = o0Var2.noo();
}
o.C0212o o10 = com.thinkup.expressad.videocommon.o.o(this.omn + "_" + this.no0 + "_" + str);
WindVaneWebView o11 = o10 != null ? o10.o() : null;
this.n0m = o11;
if (o11 != null) {
n();
return;
}
if (this.mn0 == null && (list = this.mnm) != null && list.size() > 0) {
this.mn0 = this.mnm.get(0);
}
if (this.mn0 == null) {
com.thinkup.expressad.videocommon.m.n o12 = com.thinkup.expressad.videocommon.m.n.o();
int i = this.m0o ? com.thinkup.expressad.foundation.on.o.omon : 94;
String str3 = this.omn;
boolean z = this.m0m;
nn n2 = o12.n(str3);
this.mn0 = n2 != null ? n2.m(i, z) : null;
}
com.thinkup.expressad.videocommon.m.o oVar2 = this.mn0;
if (oVar2 != null) {
this.mno = oVar2.nm();
this.mn0.o(true);
this.mn0.m(false);
}
if (this.mn0 == null || this.mno == null || this.onm == null) {
m("data empty error");
}
this.mom = false;
com.thinkup.expressad.videocommon.o.o.o();
List<com.thinkup.expressad.foundation.o0.o0> o13 = com.thinkup.expressad.videocommon.o.o.o(this.mnn);
if (o13 == null) {
m("no available campaign");
return;
}
int size = o13.size();
if (size == 0) {
m("no available campaign");
return;
}
if (o13.get(0) == null || !o13.get(0).mm()) {
m();
return;
}
if (size != 1) {
o(o13);
return;
}
com.thinkup.expressad.foundation.o0.o0 o0Var3 = o13.get(0);
this.mno = o0Var3;
if (o0Var3 != null) {
o0Var3.no();
}
m(this.mno);
} catch (Throwable th) {
m("onCreate error".concat(String.valueOf(th)));
}
}
@Override
public void onDestroy() {
try {
super.onDestroy();
} catch (Throwable unused) {
}
if (this.oon != null) {
no.o(this).o(this.oon);
this.oon = null;
}
try {
m0 m0Var = this.mm0;
if (m0Var instanceof com.thinkup.expressad.video.bt.module.m.n) {
com.thinkup.expressad.video.bt.module.m.n nVar = (com.thinkup.expressad.video.bt.module.m.n) m0Var;
if (!nVar.m && !nVar.n) {
m0Var.o("show fail : unexpected destroy");
}
}
} catch (Throwable th) {
th.getMessage();
}
try {
List<com.thinkup.expressad.foundation.o0.o0> list = this.mnn;
if (list != null && list.size() > 0) {
Iterator<com.thinkup.expressad.foundation.o0.o0> it = this.mnn.iterator();
while (it.hasNext()) {
n(it.next());
}
}
com.thinkup.expressad.foundation.o0.o0 o0Var = this.mno;
if (o0Var != null) {
n(o0Var);
}
} catch (Throwable th2) {
th2.getMessage();
}
com.thinkup.expressad.video.module.m.o.o(this.omn);
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.onDestroy();
this.n00 = null;
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onDestroy();
this.n0o = null;
}
this.nnn = null;
this.o000 = null;
com.thinkup.expressad.foundation.on.mo.o.o().execute(new o(this.mnm, this.omn, this.no0));
List<com.thinkup.expressad.foundation.o0.o0> list2 = this.mnn;
com.thinkup.expressad.foundation.o0.o0 o0Var2 = (list2 == null || list2.size() <= 0) ? null : this.mnn.get(0);
if (o0Var2 == null) {
o0Var2 = this.mno;
}
if (o0Var2 != null && !TextUtils.isEmpty(o0Var2.mnm())) {
com.thinkup.core.common.o.nn.o().m();
}
this.ooo = null;
this.oom = null;
if (this.o00 != null) {
com.thinkup.core.common.oo0.o.o().o(this.o00.o0 + this.o00.n);
}
com.thinkup.basead.o.o oVar = this.nmo;
if (oVar != null) {
oVar.m();
this.nmo = null;
}
}
@Override
public void onPause() {
super.onPause();
long j = this.oo0 + 1;
this.oo0 = j;
if (j <= 5) {
StringBuilder sb = new StringBuilder("3-");
m mVar = this.ooo;
sb.append(mVar != null ? mVar.o() : "0");
o(sb.toString(), SystemClock.elapsedRealtime() - this.o0m);
}
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.onPause();
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onPause();
}
}
@Override
public void onRestart() {
super.onRestart();
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.onRestart();
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onRestart();
}
}
@Override
public void onResume() {
TUVideoView tUVideoView;
super.onResume();
this.o0m = SystemClock.elapsedRealtime();
long j = this.o0n + 1;
this.o0n = j;
if (j <= 5) {
StringBuilder sb = new StringBuilder("2-");
m mVar = this.ooo;
sb.append(mVar != null ? mVar.o() : "0");
o(sb.toString(), 0L);
}
if (com.thinkup.expressad.foundation.om.m.n) {
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer == null || (tUVideoView = tUTempContainer.mbridgeVideoView) == null) {
return;
}
tUVideoView.setCover(false);
return;
}
com.thinkup.expressad.foundation.m.m.n().m(this);
TUTempContainer tUTempContainer2 = this.n00;
if (tUTempContainer2 != null) {
tUTempContainer2.onResume();
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onResume();
}
on();
}
@Override
public void onSaveInstanceState(Bundle bundle) {
bundle.putBoolean(m0, this.mmn);
super.onSaveInstanceState(bundle);
}
@Override
public void onStart() {
super.onStart();
new com.thinkup.expressad.foundation.om.o() {
@Override
public final void m() {
TURewardVideoActivity.this.onResume();
}
@Override
public final void n() {
TURewardVideoActivity.this.onResume();
}
@Override
public final void o() {
TURewardVideoActivity.this.onPause();
}
};
if (com.thinkup.expressad.foundation.om.m.n) {
return;
}
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.onStart();
this.mno.n0(this.omn);
com.thinkup.expressad.foundation.om.m.o().o(this.omn + "_1", this.mno);
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onStart();
List<com.thinkup.expressad.foundation.o0.o0> list = this.mnn;
if (list != null && list.size() > 0) {
com.thinkup.expressad.foundation.o0.o0 o0Var = this.mnn.get(0);
o0Var.n0(this.omn);
com.thinkup.expressad.foundation.om.m.o().o(this.omn + "_1", o0Var);
}
}
if (this.nom) {
return;
}
com.thinkup.expressad.foundation.om.m.o().m(this.omn + "_1", 1);
com.thinkup.expressad.foundation.om.m.o().n(this.omn + "_2");
this.nom = true;
}
@Override
public void onStop() {
com.thinkup.expressad.m.omo = false;
try {
try {
super.onStop();
} catch (Throwable unused) {
finish();
}
} catch (Throwable unused2) {
}
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.onStop();
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.onStop();
}
}
@Override
public void setTheme(int i) {
super.setTheme(mn.o(this, "thinkup_transparent_theme", "style"));
}
public static int m(TURewardVideoActivity tURewardVideoActivity, int i) {
int i2 = tURewardVideoActivity.nm0 - i;
tURewardVideoActivity.nm0 = i2;
return i2;
}
private void m0() {
if (mm()) {
if (this.nmo == null) {
com.thinkup.basead.o.o oVar = new com.thinkup.basead.o.o();
this.nmo = oVar;
oVar.o(this);
}
this.nmo.o();
}
}
private boolean mm() {
com.thinkup.expressad.foundation.o0.o0 o0Var = this.o0o;
return (o0Var == null || TextUtils.isEmpty(o0Var.mnm())) ? false : true;
}
private void mn() {
if (this.oon != null) {
IntentFilter intentFilter = new IntentFilter();
String str = nn;
if (this.o00 != null) {
str = nn + this.o00.o0;
}
intentFilter.addAction(str);
no.o(this).o(this.oon, intentFilter);
}
}
private void mo() {
com.thinkup.basead.o.o oVar = this.nmo;
if (oVar != null) {
oVar.m();
this.nmo = null;
}
}
private void n0() {
if (this.oon != null) {
no.o(this).o(this.oon);
this.oon = null;
}
}
private com.thinkup.expressad.video.bt.module.o.o o0() {
if (this.n0n == null) {
this.n0n = new com.thinkup.expressad.video.bt.module.o.o() {
@Override
public final void m() {
if (TURewardVideoActivity.this.mm0 != null) {
TURewardVideoActivity.this.mm0.m();
}
}
@Override
public final void n() {
if (TURewardVideoActivity.this.mm0 != null) {
TURewardVideoActivity.this.mm0.n();
}
}
@Override
public final void o() {
if (TURewardVideoActivity.this.mm0 != null) {
TURewardVideoActivity.this.mm0.o();
}
}
@Override
public final void o(boolean z, com.thinkup.expressad.videocommon.n.n nVar) {
if (TURewardVideoActivity.this.mm0 != null) {
TURewardVideoActivity.this.mm0.o(z, nVar);
}
}
@Override
public final void o(boolean z, int i) {
if (TURewardVideoActivity.this.mm0 != null) {
TURewardVideoActivity.this.mm0.o(z, i);
}
}
@Override
public final void o(String str) {
if (TURewardVideoActivity.this.mm0 != null) {
TURewardVideoActivity.this.mm0.o(str);
}
}
@Override
public final void o(com.thinkup.expressad.foundation.o0.o0 o0Var) {
if (TURewardVideoActivity.this.mm0 != null) {
TURewardVideoActivity.this.mm0.o(o0Var);
}
}
};
}
return this.n0n;
}
private void om() {
try {
List<com.thinkup.expressad.foundation.o0.o0> list = this.mnn;
if (list != null && list.size() > 0) {
Iterator<com.thinkup.expressad.foundation.o0.o0> it = this.mnn.iterator();
while (it.hasNext()) {
n(it.next());
}
}
com.thinkup.expressad.foundation.o0.o0 o0Var = this.mno;
if (o0Var != null) {
n(o0Var);
}
} catch (Throwable th) {
th.getMessage();
}
}
public void on() {
if (this.m00 == 2) {
m0();
}
}
private void oo() {
try {
m0 m0Var = this.mm0;
if (m0Var instanceof com.thinkup.expressad.video.bt.module.m.n) {
com.thinkup.expressad.video.bt.module.m.n nVar = (com.thinkup.expressad.video.bt.module.m.n) m0Var;
if (nVar.m || nVar.n) {
return;
}
m0Var.o("show fail : unexpected destroy");
}
} catch (Throwable th) {
th.getMessage();
}
}
private void n() {
o0m o0mVar;
int n2 = n("thinkup_bt_container");
if (n2 < 0) {
m("no thinkup_webview_framelayout in thinkup_more_offer_activity layout");
}
TUBTContainer tUBTContainer = (TUBTContainer) findViewById(n2);
this.n0o = tUBTContainer;
if (tUBTContainer == null) {
m("env error");
}
this.n0o.setVisibility(0);
com.thinkup.expressad.video.bt.module.o.o o02 = o0();
this.n0n = o02;
this.n0o.setBTContainerCallback(o02);
this.n0o.setShowRewardVideoListener(this.mm0);
this.n0o.setChoiceOneCallback(this.o000);
this.n0o.setSoundListener(this.oom);
this.n0o.setCampaigns(this.mnn);
this.n0o.setCampaignDownLoadTasks(this.mnm);
this.n0o.setRewardUnitSetting(this.mmo);
this.n0o.setUnitId(this.omn);
this.n0o.setPlacementId(this.on0);
this.n0o.setUserId(this.ono);
this.n0o.setActivity(this);
this.n0o.setDeveloperExtraData(this.noo);
com.thinkup.expressad.foundation.o0.o0 o0Var = this.mno;
if (((o0Var != null && (o0mVar = o0Var.om0o) != null) || (this.mnn.get(0) != null && (o0mVar = this.mnn.get(0).om0o) != null)) && !TextUtils.isEmpty(o0mVar.m()) && o0mVar.o() > 0) {
com.thinkup.expressad.videocommon.n.n nVar = new com.thinkup.expressad.videocommon.n.n(o0mVar.m(), o0mVar.o());
if (nVar.m() < 0) {
nVar.o(1);
}
this.onm = nVar;
}
this.n0o.setReward(this.onm);
this.n0o.setIVRewardEnable(this.m0n, this.mo0, this.moo);
this.n0o.setIV(this.m0o);
this.n0o.setMute(this.onn);
this.n0o.setJSFactory((com.thinkup.expressad.video.signal.factory.m) this.omo);
this.n0o.init(this);
this.n0o.onCreate();
this.m00 = this.onn;
}
public void m(com.thinkup.expressad.foundation.o0.o0 o0Var) {
com.thinkup.expressad.foundation.o0.o0 nm2;
try {
List<com.thinkup.expressad.videocommon.m.o> list = this.mnm;
if (list != null && list.size() > 0) {
for (com.thinkup.expressad.videocommon.m.o oVar : this.mnm) {
if (oVar != null && (nm2 = oVar.nm()) != null && TextUtils.equals(nm2.on00(), o0Var.on00()) && TextUtils.equals(nm2.noo(), o0Var.noo())) {
this.mn0 = oVar;
}
}
}
this.mom = true;
m();
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.setNotchPadding(this.nnm, this.nmm, this.nn0, this.nmn, this.nno);
}
} catch (Exception e) {
e.getMessage();
m("more offer to one offer exception");
}
}
private int o0(String str) {
return mn.o(getApplicationContext(), str, "layout");
}
private void o(List<com.thinkup.expressad.foundation.o0.o0> list) {
if (list == null) {
m("no available campaign");
return;
}
if (list.size() == 0) {
m("no available campaign");
return;
}
if ((list.get(0) != null ? list.get(0).mn() : 0) != 5) {
n();
return;
}
for (com.thinkup.expressad.foundation.o0.o0 o0Var : list) {
if (o0Var != null) {
this.nm0 += o0Var.onmo();
}
}
com.thinkup.expressad.foundation.o0.o0 o0Var2 = list.get(0);
if (o0Var2 != null) {
int o2 = o(o0Var2.mo(), this.non);
this.mno = o0Var2;
o0Var2.no();
this.non = 1;
this.mno.o0(o2);
this.mno.o(this.non);
this.mno.m(1);
m(this.mno);
return;
}
m("campaign is less");
}
public void m(String str) {
m0 m0Var = this.mm0;
if (m0Var != null) {
m0Var.o(str);
}
finish();
}
public void m() {
List<com.thinkup.expressad.foundation.o0.o0> list;
o0m o0mVar;
List<com.thinkup.expressad.foundation.o0.o0> list2;
int n2 = n("thinkup_temp_container");
if (n2 < 0) {
m("no id thinkup_bt_container in thinkup_more_offer_activity layout");
}
TUTempContainer tUTempContainer = (TUTempContainer) findViewById(n2);
this.n00 = tUTempContainer;
if (tUTempContainer == null) {
m("env error");
}
List<com.thinkup.expressad.foundation.o0.o0> list3 = this.mnn;
if (list3 != null && list3.size() > 0 && this.mnn.get(0).mm()) {
new com.thinkup.expressad.video.dynview.m0.m();
com.thinkup.expressad.video.dynview.m0.m.oo(this.n00);
} else {
this.n00.setVisibility(0);
}
o(-1);
this.n00.setVisibility(0);
this.n00.setActivity(this);
this.n00.setBidCampaign(this.m0m);
this.n00.setBigOffer(this.mom);
this.n00.setUnitId(this.omn);
this.n00.setCampaign(this.mno);
if (this.mno.mn() == 5 && (list2 = this.mnn) != null && list2.size() > 1) {
View findViewById = findViewById(n("thinkup_reward_root_container"));
if (findViewById != null) {
findViewById.setBackgroundColor(-16777216);
}
this.n00.removeAllViews();
this.n00.setCampOrderViewData(this.mnn, this.nm0);
this.n00.setCamPlayOrderCallback(this.nnn, this.non);
}
this.n00.setCampaignDownLoadTask(this.mn0);
this.n00.setIV(this.m0o);
com.thinkup.expressad.foundation.o0.o0 o0Var = this.mno;
if (o0Var != null && o0Var.oo() == 2) {
this.n00.setIVRewardEnable(0, 0, 0);
} else {
this.n00.setIVRewardEnable(this.m0n, this.mo0, this.moo);
}
this.n00.setMute(this.onn);
this.n00.setDeveloperExtraData(this.noo);
com.thinkup.expressad.foundation.o0.o0 o0Var2 = this.mno;
if (((o0Var2 != null && (o0mVar = o0Var2.om0o) != null) || ((list = this.mnn) != null && list.size() > 0 && this.mnn.get(0) != null && (o0mVar = this.mnn.get(0).om0o) != null)) && !TextUtils.isEmpty(o0mVar.m()) && o0mVar.o() > 0) {
com.thinkup.expressad.videocommon.n.n nVar = new com.thinkup.expressad.videocommon.n.n(o0mVar.m(), o0mVar.o());
if (nVar.m() < 0) {
nVar.o(1);
}
this.onm = nVar;
}
this.n00.setReward(this.onm);
this.n00.setRewardUnitSetting(this.mmo);
this.n00.setPlacementId(this.on0);
this.n00.setUserId(this.ono);
this.n00.setShowRewardListener(this.mm0);
this.n00.setTempEventListener(this.ooo);
this.n00.setSoundListener(this.oom);
this.n00.init(this);
this.n00.onCreate();
this.m00 = this.onn;
}
private void o(com.thinkup.expressad.foundation.o0.o0 o0Var) {
if (o0Var != null) {
int o2 = o(o0Var.mo(), this.non);
this.mno = o0Var;
o0Var.no();
this.non = 1;
this.mno.o0(o2);
this.mno.o(this.non);
this.mno.m(1);
m(this.mno);
return;
}
m("campaign is less");
}
private static WindVaneWebView o(String str) {
o.C0212o o2 = com.thinkup.expressad.videocommon.o.o(str);
if (o2 != null) {
return o2.o();
}
return null;
}
public int o(int i, int i2) {
List<com.thinkup.expressad.foundation.o0.o0> list = this.mnn;
if (list == null || list.size() == 0) {
return i;
}
int i3 = 0;
int i4 = 0;
for (int i5 = 0; i5 < this.mnn.size(); i5++) {
if (this.mnn.get(0) != null) {
if (i5 == 0) {
i4 = this.mnn.get(0).mo();
}
i3 += this.mnn.get(i5).onmo();
}
}
if (i2 == 1) {
if (i == 0) {
if (i3 >= 45) {
return 45;
}
} else if (i3 > i) {
if (i > 45) {
return 45;
}
return i;
}
return i3;
}
int i6 = 0;
for (int i7 = 0; i7 < i2 - 1; i7++) {
if (this.mnn.get(i7) != null) {
i6 += this.mnn.get(i7).onmo();
}
}
if (i4 > i6) {
return i4 - i6;
}
return 0;
}
private int n(String str) {
return mn.o(getApplicationContext(), str, "id");
}
private static void n(com.thinkup.expressad.foundation.o0.o0 o0Var) {
if (o0Var != null) {
if (!TextUtils.isEmpty(o0Var.onoo())) {
com.thinkup.expressad.foundation.on.o0.m.o(o0n.m().on()).n(o0Var.onoo());
}
if (TextUtils.isEmpty(o0Var.ono0())) {
return;
}
com.thinkup.expressad.foundation.on.o0.m.o(o0n.m().on()).n(o0Var.ono0());
}
}
@Override
public final void o(int i, int i2, int i3, int i4, int i5) {
this.nmm = i2;
this.nn0 = i3;
this.nmn = i4;
this.nno = i5;
this.nnm = i;
TUTempContainer tUTempContainer = this.n00;
if (tUTempContainer != null) {
tUTempContainer.setNotchPadding(i, i2, i3, i4, i5);
}
TUBTContainer tUBTContainer = this.n0o;
if (tUBTContainer != null) {
tUBTContainer.setNotchPadding(i, i2, i3, i4, i5);
}
com.thinkup.expressad.video.dynview.o.m.oo = i;
com.thinkup.expressad.video.dynview.o.m.o = i2;
com.thinkup.expressad.video.dynview.o.m.m = i3;
com.thinkup.expressad.video.dynview.o.m.n = i4;
com.thinkup.expressad.video.dynview.o.m.o0 = i5;
}
private void o(int i) {
int oo2;
int om2;
int om3;
float f;
try {
com.thinkup.expressad.foundation.o0.o0 o0Var = this.mno;
if (o0Var == null || o0Var.oo() != 2) {
return;
}
getWindow().getDecorView().setBackgroundColor(-1728053248);
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.n00.getLayoutParams();
layoutParams.gravity = 17;
if (this.mno.mm0().n() == 0) {
if (i == 2) {
oo2 = (int) (oom.oo(this) * 0.6f);
om3 = oom.om(this);
f = om3 * 0.6f;
} else {
oo2 = (int) (oom.oo(this) * 0.6f);
om2 = oom.om(this);
f = om2 * 0.7f;
}
} else if (this.mno.mm0().n() == 2) {
oo2 = (int) (oom.oo(this) * 0.6f);
om3 = oom.om(this);
f = om3 * 0.6f;
} else {
oo2 = (int) (oom.oo(this) * 0.6f);
om2 = oom.om(this);
f = om2 * 0.7f;
}
int i2 = (int) f;
layoutParams.height = oo2;
layoutParams.width = i2;
this.n00.setLayoutParams(layoutParams);
} catch (Throwable th) {
th.getMessage();
}
}
public void o(String str, long j) {
String str2;
String str3;
try {
oo0 oo0Var = this.o00;
String str4 = oo0Var != null ? oo0Var.n : "";
if (oo0Var == null) {
str2 = "";
} else {
StringBuilder sb = new StringBuilder();
sb.append(this.o00.mm);
str2 = sb.toString();
}
if (this.o00 != null) {
StringBuilder sb2 = new StringBuilder();
sb2.append(this.o00.om);
str3 = sb2.toString();
} else {
str3 = "";
}
com.thinkup.expressad.foundation.o0.o0 o0Var = this.o0o;
com.thinkup.core.common.oo0.oo.o(str, oo0Var, str4, str2, str3, 2, 1, o0Var != null ? o0Var.on00() : "", "20", !TextUtils.isEmpty(this.o0o != null ? r5.mnm() : ""), j);
} catch (Throwable unused) {
}
}
}