正在查看: FileWipe Pro v3.0.0 应用的 InnerActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FileWipe Pro v3.0.0 应用的 InnerActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.tp.adx.sdk.ui;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.datastore.preferences.protobuf.r1;
import com.tp.adx.open.InnerSdk;
import com.tp.adx.open.TPInnerAdListener;
import com.tp.adx.open.TPInnerMediaView;
import com.tp.adx.sdk.InnerFullScreenMgr;
import com.tp.adx.sdk.bean.TPFullScreenInfo;
import com.tp.adx.sdk.bean.TPPayloadInfo;
import com.tp.adx.sdk.common.InnerImageLoader;
import com.tp.adx.sdk.common.InnerTaskManager;
import com.tp.adx.sdk.event.InnerSendEventMessage;
import com.tp.adx.sdk.ui.views.InnerAppDetailView;
import com.tp.adx.sdk.ui.views.InnerConductView;
import com.tp.adx.sdk.ui.views.InnerProgressView;
import com.tp.adx.sdk.ui.views.InnerScrollDetailView;
import com.tp.adx.sdk.ui.views.InnerSecondEndCardView;
import com.tp.adx.sdk.util.Audio;
import com.tp.adx.sdk.util.InnerLog;
import com.tp.adx.sdk.util.JumpUtils;
import com.tp.adx.sdk.util.ResourceUtils;
import com.tp.adx.sdk.util.ViewUtils;
import com.tp.common.Constants;
import com.tp.common.InnerImpressionUtils;
import com.tp.vast.VastManager;
import com.tp.vast.VastTracker;
import com.tp.vast.VastVideoConfig;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import org.json.JSONObject;
import zc.j0;
public class InnerActivity extends Activity implements View.OnClickListener {
public static final int f0 = 0;
public boolean A;
public TPPayloadInfo B;
public int C;
public int D;
public boolean E;
public int F;
public InnerSecondEndCardView G;
public boolean H;
public String I;
public String J;
public int K;
public int L;
public int M;
public int N;
public nc.b O;
public nc.a P;
public oc.b Q;
public InnerAppDetailView S;
public InnerConductView T;
public InnerProgressView U;
public InnerProgressView V;
public ArrayList Y;
public Bitmap Z;
public TPInnerMediaView a;
public int a0;
public TPPayloadInfo.SeatBid.Bid b;
public float b0;
public VastVideoConfig c;
public float c0;
public InnerSendEventMessage d;
public boolean d0;
public String e;
public boolean e0;
public ImageView f;
public ImageView g;
public LinearLayout h;
public LinearLayout i;
public TextView j;
public TextView k;
public TextView l;
public boolean m;
public TPInnerAdListener n;
public ImageView o;
public ImageView p;
public ImageView q;
public String r;
public int s;
public boolean t;
public boolean u;
public LinearLayout v;
public ViewGroup w;
public h x;
public int y;
public boolean z = true;
public String R = InnerSendEventMessage.PAGE_PLAY;
public int W = 1;
public String X = "";
public static void a(InnerActivity innerActivity) {
ArrayList arrayList = new ArrayList();
arrayList.add(innerActivity.f);
arrayList.add(innerActivity.g);
arrayList.add(innerActivity.h);
arrayList.add(innerActivity.l);
arrayList.add(innerActivity.k);
arrayList.add(innerActivity.j);
arrayList.add(innerActivity.S);
arrayList.add(innerActivity.T);
arrayList.add(innerActivity.o);
arrayList.add(innerActivity.G);
arrayList.add(innerActivity.w);
arrayList.add(innerActivity.U);
arrayList.add(innerActivity.V);
arrayList.add(innerActivity.i);
arrayList.add(innerActivity.findViewById(2131297532));
arrayList.add(innerActivity.findViewById(2131297527));
arrayList.add(innerActivity.findViewById(2131297564));
arrayList.add(innerActivity.p);
arrayList.add(innerActivity.v);
arrayList.add(innerActivity.q);
if (innerActivity.O != null) {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
View view = (View) it.next();
if (view != null) {
innerActivity.O.a(view);
}
}
}
}
public final void b(String str) {
VastVideoConfig vastVideoConfig = this.c;
if (vastVideoConfig == null) {
return;
}
String clickThroughUrl = vastVideoConfig.getClickThroughUrl();
if (TextUtils.isEmpty(clickThroughUrl)) {
return;
}
this.a.setClickEvent();
TPInnerAdListener tPInnerAdListener = this.n;
if (tPInnerAdListener != null) {
tPInnerAdListener.onAdClicked();
}
this.d.sendClickAdStart(this.b0, this.c0, this.R, str);
boolean c = c(this, clickThroughUrl, "", this.e);
InnerSendEventMessage innerSendEventMessage = this.d;
if (innerSendEventMessage != null) {
innerSendEventMessage.sendClickAdEnd(c ? 1 : 32, this.b0, this.c0, this.R, str);
}
ib.a a = ib.a.a();
VastVideoConfig vastVideoConfig2 = this.c;
a.getClass();
ib.a.k(vastVideoConfig2);
j0.b(this.b, this.d, VastManager.getVastNetworkMediaUrl(this.c));
}
public final boolean c(Context context, String str, String str2, String str3) {
try {
if (str.startsWith("market:")) {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(str));
intent.setFlags(268435456);
context.startActivity(intent);
} else if (str.startsWith("http")) {
e(context, str, str2, str3);
} else {
try {
if (!TextUtils.isEmpty(str)) {
Uri parse = Uri.parse(str);
Intent intent2 = new Intent("android.intent.action.VIEW", parse);
intent2.setData(parse);
intent2.setFlags(268435456);
context.startActivity(intent2);
}
} catch (Throwable th) {
th.printStackTrace();
}
}
return true;
} catch (Throwable th2) {
InnerLog.v("InnerSDK", "onJumpAction:" + th2.getMessage());
return false;
}
}
public final void d() {
ArrayList<VastTracker> closeTrackers;
TPInnerAdListener tPInnerAdListener = this.n;
if (tPInnerAdListener != null) {
if (this.t && this.s == 1) {
tPInnerAdListener.onReward();
}
this.d.sendCloseAd(this.b0, this.c0);
ib.a a = ib.a.a();
VastVideoConfig vastVideoConfig = this.c;
a.getClass();
if (vastVideoConfig != null && (closeTrackers = vastVideoConfig.getCloseTrackers()) != null) {
for (int i = 0; i < closeTrackers.size(); i++) {
closeTrackers.get(i).getContent();
j0.d(closeTrackers.get(i).getContent(), VastManager.getVastNetworkMediaUrl(vastVideoConfig));
}
}
this.n.onAdClosed();
}
finish();
}
@Override
public final boolean dispatchTouchEvent(MotionEvent motionEvent) {
String str = "You click at x = " + motionEvent.getX() + " and y = " + motionEvent.getY();
this.b0 = motionEvent.getX();
this.c0 = motionEvent.getY();
InnerLog.v(str);
return super.dispatchTouchEvent(motionEvent);
}
public final void e(Context context, String str, String str2, String str3) {
Intent intent;
if (InnerSdk.isJumpWebViewOutSide()) {
intent = new Intent("android.intent.action.VIEW", Uri.parse(str));
intent.addCategory("android.intent.category.BROWSABLE");
} else {
Intent intent2 = new Intent(context, (Class<?>) InnerWebViewActivity.class);
intent2.putExtra("inner_adx_url", str);
intent2.putExtra("inner_adx_tp", this.d.getTpPayloadInfo());
if (str2 != null && str3 != null) {
intent2.putExtra("inner_adx_request_id", str2);
intent2.putExtra("inner_adx_pid", str3);
}
intent = intent2;
}
intent.setFlags(268435456);
context.startActivity(intent);
}
public final void f(String str) {
InnerSendEventMessage innerSendEventMessage = this.d;
if (innerSendEventMessage != null) {
innerSendEventMessage.sendShowEndAd(24);
}
if (this.c != null) {
HashSet hashSet = new HashSet();
Iterator<VastTracker> it = this.c.getErrorTrackers().iterator();
while (it.hasNext()) {
VastTracker next = it.next();
if (!TextUtils.isEmpty(next.getContent())) {
hashSet.add(next.getContent());
}
}
j0.e(hashSet, str, VastManager.getVastNetworkMediaUrl(this.c));
}
}
public final void g() {
if (!InnerImpressionUtils.isDefaultImpressionSetting(this.B)) {
InnerLog.v("InnerSDK", "checkVisible:");
b bVar = new b(this, 1);
synchronized (this) {
InnerTaskManager.getInstance().getThreadHandler().postDelayed(bVar, 1000L);
this.Y.add(bVar);
}
return;
}
ib.a a = ib.a.a();
VastVideoConfig vastVideoConfig = this.c;
a.getClass();
ib.a.m(vastVideoConfig);
j0.f(this.b, this.d, VastManager.getVastNetworkMediaUrl(this.c));
TPInnerAdListener tPInnerAdListener = this.n;
if (tPInnerAdListener != null) {
tPInnerAdListener.onAdImpression();
}
InnerTaskManager.getInstance().runOnMainThread(new b(this, 4));
InnerTaskManager.getInstance().runOnMainThread(new b(this, 5));
}
public final void h() {
this.j.setVisibility(8);
this.k.setVisibility(8);
this.f.setVisibility(8);
a aVar = new a(this, 0);
long j = this.C * 1000;
synchronized (this) {
InnerTaskManager.getInstance().getThreadHandler().postDelayed(aVar, j);
this.Y.add(aVar);
}
}
public final boolean i() {
h();
this.R = InnerSendEventMessage.PAGE_ENDCARD01;
if (this.d0) {
if (this.r.contains(Constants.MRAIDJS)) {
InnerSendEventMessage innerSendEventMessage = this.d;
TPPayloadInfo.SeatBid.Bid bid = this.b;
this.x = new m(this);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-2, -1);
layoutParams.gravity = 17;
this.v.addView(this.x, layoutParams);
this.x.setLoadListener(new i(this, innerSendEventMessage, bid));
} else {
InnerSendEventMessage innerSendEventMessage2 = this.d;
TPPayloadInfo.SeatBid.Bid bid2 = this.b;
this.x = new k(this);
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(-2, -1);
layoutParams2.gravity = 17;
this.v.addView(this.x, layoutParams2);
this.x.setLoadListener(new i(this, innerSendEventMessage2, bid2));
}
this.x.loadHtmlResponse(this.r);
}
if (TextUtils.isEmpty(this.r)) {
return false;
}
this.o.setVisibility(0);
this.a.setVisibility(8);
Bitmap bitmap = this.Z;
if (bitmap == null) {
return true;
}
this.p.setImageBitmap(bitmap);
return true;
}
@Override
public void onClick(View view) {
TPPayloadInfo.Ext.AppRenderStye render_style;
ViewGroup.LayoutParams layoutParams;
View view2;
ImageView imageView;
int i;
int id = view.getId();
if (id == ResourceUtils.getViewIdByName(this, "tp_tv_countdown")) {
this.d.sendUnClickable(this.b0, this.c0, this.R, InnerSendEventMessage.MOD_TIME);
return;
}
if (id == ResourceUtils.getViewIdByName(this, "tp_img_mute")) {
boolean z = this.m;
this.m = !z;
if (z) {
imageView = this.f;
i = 2131165924;
} else {
imageView = this.f;
i = 2131165923;
}
imageView.setBackgroundResource(i);
TPInnerMediaView tPInnerMediaView = this.a;
if (tPInnerMediaView != null) {
tPInnerMediaView.setMute(this.m);
}
this.d.sendUnClickable(this.b0, this.c0, this.R, InnerSendEventMessage.MOD_MUTE);
return;
}
if (id != ResourceUtils.getViewIdByName(this, "tp_layout_close") && id != ResourceUtils.getViewIdByName(this, "tp_img_close")) {
if (id != ResourceUtils.getViewIdByName(this, "tp_img_skip")) {
if (id != ResourceUtils.getViewIdByName(this, "tp_inner_mediaview") && id != ResourceUtils.getViewIdByName(this, "tp_img_endcard")) {
if (id != ResourceUtils.getViewIdByName(this, "tp_img_blur")) {
if (id == ResourceUtils.getViewIdByName(this, "tp_layout_ad")) {
c(this, JumpUtils.getJumpPrivacyUrl(view.getContext()), "", this.e);
this.d.sendUnClickable(this.b0, this.c0, this.R, InnerSendEventMessage.MOD_ADCHIOSE);
return;
} else {
if (id != ResourceUtils.getViewIdByName(this, "tp_video_more") || this.b.getExt() == null || TextUtils.isEmpty(this.b.getExt().getAboutAdvertiserLink())) {
return;
}
WeakReference weakReference = new WeakReference(this);
if (weakReference.get() == null || ((Activity) weakReference.get()).isFinishing()) {
return;
}
new zc.o(this, this.q, new zc.b(this, weakReference), this.b.getExt().getAdvertiserinfo()).a(this.q);
return;
}
}
if (!this.E) {
return;
}
}
b(InnerSendEventMessage.MOD_BG);
this.d.sendUnClickable(this.b0, this.c0, this.R, InnerSendEventMessage.MOD_BG);
return;
}
this.A = true;
TPInnerMediaView tPInnerMediaView2 = this.a;
if (tPInnerMediaView2 != null) {
tPInnerMediaView2.setSkipped(true);
}
this.k.setVisibility(8);
int i2 = this.W;
if (i2 == 1) {
this.j.setVisibility(8);
view2 = this.i;
} else {
view2 = i2 == 2 ? this.U : this.V;
}
view2.setVisibility(8);
oc.b bVar = this.Q;
if (bVar != null) {
nc.i iVar = bVar.a;
r1.b(iVar);
iVar.e.e("skipped", (JSONObject) null);
}
if (this.s != 1 || this.t) {
TPInnerMediaView tPInnerMediaView3 = this.a;
if (tPInnerMediaView3 != null && tPInnerMediaView3.isPlaying()) {
this.a.seekToEnd();
this.a.pause();
i();
ib.a a = ib.a.a();
VastVideoConfig vastVideoConfig = this.c;
a.getClass();
ib.a.q(vastVideoConfig);
}
} else {
TPInnerMediaView tPInnerMediaView4 = this.a;
if (tPInnerMediaView4 != null && tPInnerMediaView4.isPlaying()) {
this.a.pause();
}
new f3.b(this, new d(this)).show();
}
this.d.sendUnClickable(this.b0, this.c0, this.R, "skip");
return;
}
if (!this.H) {
this.d.sendUnClickable(this.b0, this.c0, this.R, InnerSendEventMessage.MOD_CLOSE);
d();
return;
}
this.S.setOnSecondEndCardClickListener(new d(this));
InnerAppDetailView innerAppDetailView = this.S;
TPPayloadInfo tPPayloadInfo = this.B;
String str = this.I;
String str2 = this.J;
int i3 = this.F;
innerAppDetailView.getClass();
TPPayloadInfo.Ext ext = tPPayloadInfo.getExt();
if (ext != null && (render_style = ext.getRender_style()) != null) {
if (render_style.getEndcard2_show_app() == 0) {
innerAppDetailView.setVisibility(8);
} else {
innerAppDetailView.setVisibility(0);
Button button = innerAppDetailView.b;
if (i3 != 100 && i3 > 0 && button != null && (layoutParams = button.getLayoutParams()) != null) {
float floatValue = new Float(i3).floatValue() / 100.0f;
int i4 = layoutParams.width;
layoutParams.width = new Float(layoutParams.height * floatValue).intValue();
layoutParams.height = new Float(floatValue * i4).intValue();
}
if (innerAppDetailView.e != null) {
ArrayList<String> endcard2_screenshots = render_style.getEndcard2_screenshots();
InnerScrollDetailView innerScrollDetailView = innerAppDetailView.e;
dd.g gVar = innerAppDetailView.a;
innerScrollDetailView.getClass();
if (endcard2_screenshots != null) {
for (int i5 = 0; i5 < endcard2_screenshots.size(); i5++) {
String str3 = endcard2_screenshots.get(i5);
if (!TextUtils.isEmpty(str3)) {
zc.i iVar2 = new zc.i(innerScrollDetailView.a);
iVar2.setImageUrl(str3);
iVar2.setOnClickListener(new dd.k(gVar, 0));
innerScrollDetailView.addView(iVar2);
Button button2 = new Button(innerScrollDetailView.getContext());
button2.setOnClickListener(new dd.k(gVar, 1));
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(ViewUtils.dp2px(innerScrollDetailView.getContext(), 10), ViewUtils.dp2px(innerScrollDetailView.getContext(), 10));
button2.setVisibility(4);
innerScrollDetailView.addView(button2, layoutParams2);
}
}
}
}
if (innerAppDetailView.c != null && !TextUtils.isEmpty(str2)) {
InnerImageLoader.getInstance().loadImage(innerAppDetailView.c, str2);
}
TextView textView = innerAppDetailView.d;
if (textView != null) {
textView.setText(str);
}
}
}
this.T.setVisibility(8);
this.h.setVisibility(8);
this.d.sendUnClickable(this.b0, this.c0, this.R, "skip");
this.R = InnerSendEventMessage.PAGE_ENDCARD02;
this.G.setVisibility(0);
this.G.post(new b(this, 2));
}
@Override
public final void onCreate(Bundle bundle) {
ImageView imageView;
int i;
super.onCreate(bundle);
setContentView(ResourceUtils.getLayoutIdByName(this, "tp_activity_layout_inner_fullscreen"));
this.Y = new ArrayList();
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
if (displayMetrics.widthPixels > displayMetrics.heightPixels) {
setRequestedOrientation(6);
} else {
setRequestedOrientation(1);
}
this.e = getIntent().getStringExtra("adUnitId");
TPFullScreenInfo listener = InnerFullScreenMgr.InnerFullscreenAdMessager.getInstance().getListener(this.e);
if (listener == null) {
TPInnerAdListener tPInnerAdListener = this.n;
if (tPInnerAdListener != null) {
tPInnerAdListener.onAdClosed();
}
f(Constants.VAST_ERROR_UNDEFINEDERROR);
finish();
return;
}
this.B = listener.getTpPayloadInfo();
this.b = listener.getBidInfo();
this.c = listener.getVastVideoConfig();
this.e = listener.getAdUnitId();
boolean isMute = listener.isMute();
this.m = isMute;
if (!isMute) {
this.m = Audio.isAudioSilent(this);
}
this.s = listener.getIsRewared();
this.u = listener.isHtml();
this.d = listener.getInnerSendEventMessage();
this.n = listener.getTpInnerAdListener();
this.y = listener.getSkipTime();
this.D = listener.getInterstitial_video_skip_time();
this.C = listener.getEndcard_close_time();
this.E = listener.isCanFullClick();
this.H = listener.isNeedSecondEndCard();
this.I = listener.getEndcard2_title();
this.J = listener.getEndcard2_icon();
this.K = listener.getEndcard2_close_time();
this.F = listener.getSkip_btn_ratio();
this.W = listener.getCountdown_style();
this.X = listener.getCountdown_color();
this.L = listener.getEndcard2_bundle_name_size();
this.M = listener.getEndcard2_support_close_button();
this.N = listener.getEndcard2_cta_width_ratio();
ImageView imageView2 = (ImageView) findViewById(ResourceUtils.getViewIdByName(this, "tp_img_mute"));
this.f = imageView2;
imageView2.setOnClickListener(this);
resizeView(this.f);
this.g = (ImageView) findViewById(ResourceUtils.getViewIdByName(this, "tp_img_close"));
this.h = (LinearLayout) findViewById(ResourceUtils.getViewIdByName(this, "tp_layout_close"));
this.g.setOnClickListener(this);
this.h.setOnClickListener(this);
resizeView(this.h);
resizeView(this.g);
this.T = (InnerConductView) findViewById(ResourceUtils.getViewIdByName(this, "tp_inner_conduct"));
this.S = (InnerAppDetailView) findViewById(ResourceUtils.getViewIdByName(this, "tp_inner_app_detail"));
this.l = (TextView) findViewById(ResourceUtils.getViewIdByName(this, "tp_tv_ad"));
TextView textView = (TextView) findViewById(ResourceUtils.getViewIdByName(this, "tp_img_skip"));
this.k = textView;
textView.setOnClickListener(this);
if (this.H) {
this.g.setBackgroundResource(ResourceUtils.getDrawableByName(this, "tp_inner_endcard2_skip"));
}
resizeView(this.k);
this.i = (LinearLayout) findViewById(ResourceUtils.getViewIdByName(this, "tp_layout_countdown"));
TextView textView2 = (TextView) findViewById(ResourceUtils.getViewIdByName(this, "tp_tv_countdown"));
this.j = textView2;
textView2.setOnClickListener(this);
this.o = (ImageView) findViewById(ResourceUtils.getViewIdByName(this, "tp_img_endcard"));
this.p = (ImageView) findViewById(ResourceUtils.getViewIdByName(this, "tp_img_blur"));
this.w = (ViewGroup) findViewById(ResourceUtils.getViewIdByName(this, "tp_inner_activity_main"));
this.q = (ImageView) findViewById(ResourceUtils.getViewIdByName(this, "tp_video_more"));
this.o.setOnClickListener(this);
this.q.setOnClickListener(this);
findViewById(ResourceUtils.getViewIdByName(this, "tp_layout_ad")).setOnClickListener(this);
this.p.setOnClickListener(this);
this.a = (TPInnerMediaView) findViewById(ResourceUtils.getViewIdByName(this, "tp_inner_mediaview"));
this.v = (LinearLayout) findViewById(ResourceUtils.getViewIdByName(this, "tp_layout_intersittial_webview"));
this.G = (InnerSecondEndCardView) findViewById(ResourceUtils.getViewIdByName(this, "tp_inner_second_endcard"));
this.U = (InnerProgressView) findViewById(ResourceUtils.getViewIdByName(this, "tp_top_progress"));
this.V = (InnerProgressView) findViewById(ResourceUtils.getViewIdByName(this, "tp_bottom_progress"));
this.l.setText(getResources().getString(ResourceUtils.getStringByName(this, "tp_ad")));
if (this.u) {
try {
if (this.b.getAdm().contains(Constants.MRAIDJS)) {
InnerSendEventMessage innerSendEventMessage = this.d;
TPPayloadInfo.SeatBid.Bid bid = this.b;
this.x = new m(this);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-2, -1);
layoutParams.gravity = 17;
this.v.addView(this.x, layoutParams);
this.x.setLoadListener(new i(this, innerSendEventMessage, bid));
} else {
InnerSendEventMessage innerSendEventMessage2 = this.d;
TPPayloadInfo.SeatBid.Bid bid2 = this.b;
this.x = new k(this);
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(-2, -1);
layoutParams2.gravity = 17;
this.v.addView(this.x, layoutParams2);
this.x.setLoadListener(new i(this, innerSendEventMessage2, bid2));
}
this.x.loadHtmlResponse(this.b.getAdm());
h();
g();
} catch (Throwable unused) {
TPInnerAdListener tPInnerAdListener2 = this.n;
if (tPInnerAdListener2 != null) {
tPInnerAdListener2.onAdClosed();
}
f("401");
finish();
}
} else {
VastVideoConfig vastVideoConfig = this.c;
if (vastVideoConfig != null && vastVideoConfig.getVastCompanionAdConfigs().iterator().hasNext()) {
this.r = this.c.getVastCompanionAdConfigs().iterator().next().getVastResource().getResource();
}
if (!TextUtils.isEmpty(this.r)) {
if (this.r.startsWith("<") || this.r.contains(Constants.MRAIDJS)) {
this.d0 = true;
} else {
InnerImageLoader.getInstance().loadImage(this.r, new zc.c(this));
}
}
}
this.d.sendShowAdStart();
if (!this.u) {
VastVideoConfig vastVideoConfig2 = this.c;
if (vastVideoConfig2 == null) {
f("100");
finish();
} else if (TextUtils.isEmpty(vastVideoConfig2.getDiskMediaFileUrl())) {
this.d.sendShowEndAd(1);
if (!i()) {
f("401");
finish();
} else if (InnerImpressionUtils.isDefaultImpressionSetting(this.B)) {
ib.a a = ib.a.a();
VastVideoConfig vastVideoConfig3 = this.c;
a.getClass();
ib.a.m(vastVideoConfig3);
j0.f(this.b, this.d, VastManager.getVastNetworkMediaUrl(this.c));
TPInnerAdListener tPInnerAdListener3 = this.n;
if (tPInnerAdListener3 != null) {
tPInnerAdListener3.onAdImpression();
}
InnerTaskManager.getInstance().runOnMainThread(new b(this, 4));
InnerTaskManager.getInstance().runOnMainThread(new b(this, 5));
} else {
InnerLog.v("InnerSDK", "checkVisible:");
b bVar = new b(this, 1);
synchronized (this) {
InnerTaskManager.getInstance().getThreadHandler().postDelayed(bVar, 1000L);
this.Y.add(bVar);
}
}
} else {
this.a.setVastVideoConfig(this.b, this.c);
InnerTaskManager.getInstance().runNormalTask(new a(this, 1));
this.a.setIsMute(this.m);
if (this.m) {
imageView = this.f;
i = 2131165923;
} else {
imageView = this.f;
i = 2131165924;
}
imageView.setBackgroundResource(i);
TPInnerMediaView tPInnerMediaView = this.a;
if (tPInnerMediaView != null) {
tPInnerMediaView.setMute(this.m);
}
this.a.setOnPlayerListener(new c(this));
this.a.setOnClickListener(this);
}
}
if (this.b.getExt() != null && !TextUtils.isEmpty(this.b.getExt().getAboutAdvertiserLink())) {
this.q.setVisibility(0);
}
InnerTaskManager.getInstance().runOnMainThread(new b(this, 3));
}
@Override
public final void onDestroy() {
this.z = false;
synchronized (this) {
try {
Iterator it = this.Y.iterator();
while (it.hasNext()) {
Runnable runnable = (Runnable) it.next();
if (runnable != null) {
InnerTaskManager.getInstance().getThreadHandler().removeCallbacks(runnable);
}
}
this.Y.clear();
} catch (Throwable th) {
throw th;
}
}
nc.i iVar = this.O;
if (iVar != null) {
nc.i iVar2 = iVar;
if (!iVar2.g) {
iVar2.c.a.clear();
}
this.O.c();
this.O = null;
}
InnerFullScreenMgr.InnerFullscreenAdMessager.getInstance().unRegister(this.e);
TPInnerMediaView tPInnerMediaView = this.a;
if (tPInnerMediaView != null) {
tPInnerMediaView.release();
}
Bitmap bitmap = this.Z;
if (bitmap != null) {
bitmap.recycle();
this.Z = null;
}
super.onDestroy();
}
@Override
public final boolean onKeyDown(int i, KeyEvent keyEvent) {
if (4 == i) {
return true;
}
return super.onKeyDown(i, keyEvent);
}
@Override
public final void onPause() {
this.e0 = true;
TPInnerMediaView tPInnerMediaView = this.a;
if (tPInnerMediaView != null) {
tPInnerMediaView.pause();
ib.a a = ib.a.a();
VastVideoConfig vastVideoConfig = this.c;
a.getClass();
ib.a.n(vastVideoConfig);
}
super.onPause();
}
@Override
public final void onResume() {
this.e0 = false;
TPInnerMediaView tPInnerMediaView = this.a;
if (tPInnerMediaView != null && !tPInnerMediaView.isPlaying() && !this.A) {
this.a.start();
ib.a a = ib.a.a();
VastVideoConfig vastVideoConfig = this.c;
a.getClass();
ib.a.p(vastVideoConfig);
}
super.onResume();
}
public void resizeView(View view) {
ViewGroup.LayoutParams layoutParams;
int i = this.F;
if (i == 100 || i <= 0 || view == null || (layoutParams = view.getLayoutParams()) == null) {
return;
}
float floatValue = new Float(this.F).floatValue() / 100.0f;
int i2 = layoutParams.width;
layoutParams.width = new Float(layoutParams.height * floatValue).intValue();
layoutParams.height = new Float(floatValue * i2).intValue();
}
}