光速虚拟机 v3.8.2版本的 MD5 值为:a73059742a0ed25d6979f838470f59dd
以下内容为反编译后的 f.java 源代码,内容仅作参考
package com.applovin.impl.adview.activity.b;
import android.app.Activity;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.PointF;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.StrictMode;
import android.os.SystemClock;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import com.applovin.communicator.AppLovinCommunicator;
import com.applovin.communicator.AppLovinCommunicatorMessage;
import com.applovin.communicator.AppLovinCommunicatorSubscriber;
import com.applovin.impl.adview.AppLovinTouchToClickListener;
import com.applovin.impl.adview.AppLovinVideoView;
import com.applovin.impl.adview.h;
import com.applovin.impl.adview.k;
import com.applovin.impl.adview.n;
import com.applovin.impl.adview.w;
import com.applovin.impl.adview.x;
import com.applovin.impl.sdk.e.ac;
import com.applovin.impl.sdk.e.r;
import com.applovin.impl.sdk.o;
import com.applovin.impl.sdk.utils.AppLovinSdkExtraParameterKey;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.sdk.utils.u;
import com.applovin.impl.sdk.utils.z;
import com.applovin.impl.sdk.y;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.applovin.sdk.AppLovinSdkUtils;
import com.applovin.sdk.R;
import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose;
import com.safedk.android.analytics.brandsafety.creatives.CreativeInfoManager;
import com.safedk.android.internal.partials.AppLovinVideoBridge;
import com.safedk.android.internal.special.SpecialsBridge;
import com.safedk.android.utils.Logger;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
public class f extends com.applovin.impl.adview.activity.b.a implements AppLovinCommunicatorSubscriber {
protected final n A;
protected h B;
protected final ImageView C;
protected w D;
protected final ProgressBar E;
protected ProgressBar F;
protected ImageView G;
protected final k H;
protected final k I;
protected boolean J;
protected long K;
protected boolean L;
private final com.applovin.impl.adview.activity.a.c M;
private MediaPlayer N;
private final b O;
private final a P;
private final Handler Q;
private final Handler R;
private final boolean S;
private int T;
private int U;
private boolean V;
private final AtomicBoolean W;
private final AtomicBoolean X;
private long Y;
private long Z;
protected final AppLovinVideoView y;
protected final com.applovin.impl.adview.a z;
private class a implements x.a {
private a() {
}
@Override
public void a(Uri uri, w wVar) {
y yVar = f.this.c;
if (y.a()) {
f.this.c.b("AppLovinFullscreenActivity", "Attempting to load a url from video button...");
}
u.a(uri, f.this.f.getController(), f.this.b);
}
@Override
public void a(w wVar) {
y yVar = f.this.c;
if (y.a()) {
f.this.c.b("AppLovinFullscreenActivity", "Clicking through from video button...");
}
f.this.a(wVar.getAndClearLastClickLocation(), false);
}
@Override
public void b(w wVar) {
y yVar = f.this.c;
if (y.a()) {
f.this.c.b("AppLovinFullscreenActivity", "Closing ad from video button...");
}
f.this.h();
}
@Override
public void c(w wVar) {
y yVar = f.this.c;
if (y.a()) {
f.this.c.b("AppLovinFullscreenActivity", "Skipping video from video button...");
}
f.this.c();
}
@Override
public void d(w wVar) {
y yVar = f.this.c;
if (y.a()) {
f.this.c.b("AppLovinFullscreenActivity", "Attempting to install app from video button...");
}
f.this.a(wVar.getAndClearLastClickLocation(), true);
}
}
private class b implements MediaPlayer.OnCompletionListener, MediaPlayer.OnErrorListener, MediaPlayer.OnInfoListener, MediaPlayer.OnPreparedListener, AppLovinTouchToClickListener.OnClickListener {
private b() {
}
@Override
public void onClick(View view, PointF pointF) {
f.this.a(pointF, false);
}
@Override
public void onCompletion(MediaPlayer mediaPlayer) {
Logger.d("AppLovin|SafeDK: Execution> Lcom/applovin/impl/adview/activity/b/f$b;->onCompletion(Landroid/media/MediaPlayer;)V");
CreativeInfoManager.onVideoCompleted(com.safedk.android.utils.h.a, mediaPlayer);
safedk_f$b_onCompletion_f3c9649e1b61d3e6546d4a4e14acd82a(mediaPlayer);
}
@Override
public boolean onError(MediaPlayer mediaPlayer, int i, int i2) {
f fVar = f.this;
fVar.c("Video view error (" + i + "," + i2 + ")");
AppLovinVideoBridge.VideoViewPlay(f.this.y);
return true;
}
@Override
public boolean onInfo(MediaPlayer mediaPlayer, int i, int i2) {
y yVar = f.this.c;
if (y.a()) {
y yVar2 = f.this.c;
yVar2.b("AppLovinFullscreenActivity", "MediaPlayer Info: (" + i + ", " + i2 + ")");
}
if (i == 701) {
f.this.y();
f.this.d.g();
return false;
} else if (i != 3) {
if (i == 702) {
f.this.z();
return false;
}
return false;
} else {
f.this.H.a();
if (f.this.A != null) {
f.this.E();
}
f.this.z();
if (f.this.w.c()) {
f.this.e();
return false;
}
return false;
}
}
@Override
public void onPrepared(MediaPlayer mediaPlayer) {
f.this.N = mediaPlayer;
mediaPlayer.setOnInfoListener(f.this.O);
mediaPlayer.setOnErrorListener(f.this.O);
float f = !f.this.J ? 1 : 0;
mediaPlayer.setVolume(f, f);
f.this.n = (int) TimeUnit.MILLISECONDS.toSeconds(mediaPlayer.getDuration());
f.this.c(mediaPlayer.getDuration());
f.this.v();
y yVar = f.this.c;
if (y.a()) {
f.this.c.b("AppLovinFullscreenActivity", "MediaPlayer prepared: " + f.this.N);
}
}
public void safedk_f$b_onCompletion_f3c9649e1b61d3e6546d4a4e14acd82a(MediaPlayer mediaPlayer) {
y yVar = f.this.c;
if (y.a()) {
f.this.c.b("AppLovinFullscreenActivity", "Video completed");
}
f.this.V = true;
if (!f.this.m) {
f.this.B();
} else if (f.this.u()) {
f.this.H();
}
}
}
private class c implements View.OnClickListener {
private c() {
}
@Override
public void onClick(View view) {
if (view == f.this.A) {
if (!f.this.t()) {
f.this.c();
return;
}
f.this.e();
f.this.q();
f.this.w.b();
} else if (view == f.this.C) {
f.this.A();
} else {
y yVar = f.this.c;
if (y.a()) {
y yVar2 = f.this.c;
yVar2.e("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
}
}
}
}
public f(com.applovin.impl.sdk.ad.e eVar, Activity activity, Map<String, Object> map, o oVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
super(eVar, activity, map, oVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
this.M = new com.applovin.impl.adview.activity.a.c(this.a, this.e, this.b);
this.G = null;
b bVar = new b();
this.O = bVar;
a aVar = new a();
this.P = aVar;
Handler handler = new Handler(Looper.getMainLooper());
this.Q = handler;
Handler handler2 = new Handler(Looper.getMainLooper());
this.R = handler2;
k kVar = new k(handler, this.b);
this.H = kVar;
this.I = new k(handler2, this.b);
boolean f = this.a.f();
this.S = f;
this.J = com.applovin.impl.sdk.utils.w.c(this.b);
this.U = -1;
this.W = new AtomicBoolean();
this.X = new AtomicBoolean();
this.Y = -2L;
this.Z = 0L;
if (!eVar.hasVideoUrl()) {
throw new IllegalStateException("Attempting to use fullscreen video ad presenter for non-video ad");
}
AppLovinVideoView appLovinVideoView = new AppLovinVideoView(activity);
this.y = appLovinVideoView;
appLovinVideoView.setOnPreparedListener(bVar);
appLovinVideoView.setOnCompletionListener(bVar);
appLovinVideoView.setOnErrorListener(bVar);
appLovinVideoView.setOnTouchListener(new AppLovinTouchToClickListener(oVar, com.applovin.impl.sdk.c.b.bb, activity, bVar));
c cVar = new c();
if (eVar.r() >= 0) {
n nVar = new n(eVar.x(), activity);
this.A = nVar;
nVar.setVisibility(8);
nVar.setOnClickListener(cVar);
} else {
this.A = null;
}
boolean z = true;
if (a(this.J, oVar)) {
ImageView imageView = new ImageView(activity);
this.C = imageView;
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
imageView.setClickable(true);
imageView.setOnClickListener(cVar);
e(this.J);
} else {
this.C = null;
}
String C = eVar.C();
if (StringUtils.isValidString(C)) {
x xVar = new x(oVar);
xVar.a(new WeakReference<>(aVar));
w wVar = new w(xVar, activity);
this.D = wVar;
wVar.a(C);
} else {
this.D = null;
}
if (f) {
com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) oVar.a(com.applovin.impl.sdk.c.b.cY)).intValue(), 16842874);
this.z = aVar2;
aVar2.setColor(Color.parseColor("#75FFFFFF"));
aVar2.setBackgroundColor(Color.parseColor("#00000000"));
aVar2.setVisibility(8);
AppLovinCommunicator.getInstance(activity).subscribe(this, "video_caching_failed");
} else {
this.z = null;
}
final int m = m();
z = (!((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cI)).booleanValue() || m <= 0) ? false : false;
if (this.B == null && z) {
this.B = new h(activity);
int I = eVar.I();
this.B.setTextColor(I);
this.B.setTextSize(((Integer) oVar.a(com.applovin.impl.sdk.c.b.cH)).intValue());
this.B.setFinishedStrokeColor(I);
this.B.setFinishedStrokeWidth(((Integer) oVar.a(com.applovin.impl.sdk.c.b.cG)).intValue());
this.B.setMax(m);
this.B.setProgress(m);
kVar.a("COUNTDOWN_CLOCK", TimeUnit.SECONDS.toMillis(1L), new k.a() {
@Override
public void a() {
if (f.this.B != null) {
long seconds = m - TimeUnit.MILLISECONDS.toSeconds(f.this.y.getCurrentPosition());
if (seconds <= 0) {
f.this.o = true;
} else if (f.this.C()) {
f.this.B.setProgress((int) seconds);
}
}
}
@Override
public boolean b() {
return f.this.C();
}
});
}
if (!eVar.R()) {
this.E = null;
return;
}
final Integer num = (Integer) oVar.a(com.applovin.impl.sdk.c.b.cW);
ProgressBar progressBar = new ProgressBar(activity, null, 16842872);
this.E = progressBar;
a(progressBar, eVar.S(), num.intValue());
kVar.a("PROGRESS_BAR", ((Long) oVar.a(com.applovin.impl.sdk.c.b.cV)).longValue(), new k.a() {
@Override
public void a() {
if (f.this.L) {
f.this.E.setVisibility(8);
return;
}
f.this.E.setProgress((int) ((f.this.y.getCurrentPosition() / ((float) f.this.K)) * num.intValue()));
}
@Override
public boolean b() {
return !f.this.L;
}
});
}
public void E() {
if (this.X.compareAndSet(false, true)) {
a(this.A, this.a.r(), new Runnable() {
@Override
public void run() {
f.this.Y = -1L;
f.this.Z = SystemClock.elapsedRealtime();
}
});
}
}
private void F() {
w wVar;
com.applovin.impl.adview.u D = this.a.D();
if (D == null || !D.e() || this.L || (wVar = this.D) == null) {
return;
}
final boolean z = wVar.getVisibility() == 4;
final long f = D.f();
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
if (z) {
com.applovin.impl.sdk.utils.x.a(f.this.D, f, (Runnable) null);
} else {
com.applovin.impl.sdk.utils.x.b(f.this.D, f, null);
}
}
});
}
public void G() {
if (this.L) {
y yVar = this.c;
if (y.a()) {
this.c.d("AppLovinFullscreenActivity", "Skip video resume - postitial shown");
}
} else if (this.b.U().isApplicationPaused()) {
y yVar2 = this.c;
if (y.a()) {
this.c.d("AppLovinFullscreenActivity", "Skip video resume - app paused");
}
} else if (this.U < 0) {
y yVar3 = this.c;
if (y.a()) {
this.c.b("AppLovinFullscreenActivity", "Invalid last video position");
}
} else {
y yVar4 = this.c;
if (y.a()) {
y yVar5 = this.c;
yVar5.b("AppLovinFullscreenActivity", "Resuming video at position " + this.U + "ms for MediaPlayer: " + this.N);
}
this.y.seekTo(this.U);
AppLovinVideoBridge.VideoViewPlay(this.y);
this.H.a();
this.U = -1;
a(new Runnable() {
@Override
public void run() {
if (f.this.z != null) {
f.this.z.a();
f.this.a(new Runnable() {
@Override
public void run() {
f.this.z.b();
}
}, 2000L);
}
}
}, 250L);
}
}
public void H() {
this.M.a(this.i);
this.k = SystemClock.elapsedRealtime();
}
private void a(ProgressBar progressBar, int i, int i2) {
progressBar.setMax(i2);
progressBar.setPadding(0, 0, 0, 0);
if (com.applovin.impl.sdk.utils.h.d()) {
progressBar.setProgressTintList(ColorStateList.valueOf(i));
}
}
private static boolean a(boolean z, o oVar) {
if (((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cN)).booleanValue()) {
if (!((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cO)).booleanValue() || z) {
return true;
}
return ((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cQ)).booleanValue();
}
return false;
}
private void d(boolean z) {
this.T = D();
if (z) {
this.y.pause();
} else {
AppLovinVideoBridge.VideoViewStop(this.y);
}
}
private void e(boolean z) {
if (com.applovin.impl.sdk.utils.h.d()) {
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.e.getDrawable(z ? R.drawable.applovin_ic_unmute_to_mute : R.drawable.applovin_ic_mute_to_unmute);
if (animatedVectorDrawable != null) {
this.C.setScaleType(ImageView.ScaleType.FIT_XY);
this.C.setImageDrawable(animatedVectorDrawable);
animatedVectorDrawable.start();
return;
}
}
Uri aJ = z ? this.a.aJ() : this.a.aK();
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
this.C.setImageURI(aJ);
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
public void A() {
MediaPlayer mediaPlayer = this.N;
if (mediaPlayer == null) {
return;
}
try {
float f = !this.J ? 0 : 1;
mediaPlayer.setVolume(f, f);
boolean z = this.J ? false : true;
this.J = z;
e(z);
a(this.J, 0L);
} catch (Throwable unused) {
}
}
public void B() {
y yVar = this.c;
if (y.a()) {
this.c.b("AppLovinFullscreenActivity", "Showing postitial...");
}
d(this.a.aQ());
final long W = this.a.W();
if (W > 0) {
this.l = 0L;
final Long l = (Long) this.b.a(com.applovin.impl.sdk.c.b.df);
final Integer num = (Integer) this.b.a(com.applovin.impl.sdk.c.b.di);
ProgressBar progressBar = new ProgressBar(this.e, null, 16842872);
this.F = progressBar;
a(progressBar, this.a.V(), num.intValue());
this.I.a("POSTITIAL_PROGRESS_BAR", l.longValue(), new k.a() {
@Override
public void a() {
f.this.F.setProgress((int) ((((float) f.this.l) / ((float) W)) * num.intValue()));
f.this.l += l.longValue();
}
@Override
public boolean b() {
return f.this.l < W;
}
});
this.I.a();
}
this.M.a(this.h, this.g, this.f, this.F);
a("javascript:al_onPoststitialShow(" + this.p + "," + this.q + ");", this.a.X());
if (this.h != null) {
if (this.a.t() >= 0) {
a(this.h, this.a.t(), new Runnable() {
@Override
public void run() {
f.this.k = SystemClock.elapsedRealtime();
}
});
} else {
this.h.setVisibility(0);
}
}
ArrayList arrayList = new ArrayList();
if (this.h != null) {
arrayList.add(new com.applovin.impl.sdk.a.d(this.h, FriendlyObstructionPurpose.CLOSE_AD, "close button"));
}
if (this.g != null && this.g.b()) {
arrayList.add(new com.applovin.impl.sdk.a.d(this.g, FriendlyObstructionPurpose.NOT_VISIBLE, this.g.getIdentifier()));
}
ProgressBar progressBar2 = this.F;
if (progressBar2 != null) {
arrayList.add(new com.applovin.impl.sdk.a.d(progressBar2, FriendlyObstructionPurpose.OTHER, "postitial progress bar"));
}
this.a.o().a(this.f, arrayList);
w();
this.L = true;
}
protected boolean C() {
return (this.o || this.L || !this.y.isPlaying()) ? false : true;
}
public int D() {
long currentPosition = this.y.getCurrentPosition();
if (this.V) {
return 100;
}
return currentPosition > 0 ? (int) ((((float) currentPosition) / ((float) this.K)) * 100.0f) : this.T;
}
@Override
public void a() {
y yVar = this.c;
if (y.a()) {
this.c.b("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses");
}
}
@Override
public void a(long j) {
a(new Runnable() {
@Override
public void run() {
f.this.G();
}
}, j);
}
public void a(PointF pointF, boolean z) {
if (!this.a.E()) {
F();
return;
}
y yVar = this.c;
if (y.a()) {
this.c.b("AppLovinFullscreenActivity", "Clicking through video");
}
Uri k = this.a.k();
if (k != null) {
this.b.v().trackAndLaunchVideoClick(this.a, k, pointF, z, this, this.f != null ? this.f.getContext() : o.au());
com.applovin.impl.sdk.utils.o.a(this.t, this.a);
this.d.b();
this.q++;
}
}
@Override
public void a(ViewGroup viewGroup) {
String str;
this.M.a(this.C, this.A, this.D, this.z, this.E, this.B, this.y, this.f, this.g, this.G, viewGroup);
if (com.applovin.impl.sdk.utils.h.g() && (str = this.b.ay().getExtraParameters().get(AppLovinSdkExtraParameterKey.AUDIO_FOCUS_REQUEST)) != null) {
this.y.setAudioFocusRequest(Integer.parseInt(str));
}
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
a(!this.S);
AppLovinVideoBridge.VideoViewSetVideoUri(this.y, this.a.h());
StrictMode.setThreadPolicy(allowThreadDiskReads);
if (this.a.ar()) {
this.w.a(this.a, new Runnable() {
@Override
public void run() {
f.this.a(250L);
}
});
}
if (this.g != null) {
this.g.a();
}
AppLovinVideoBridge.VideoViewPlay(this.y);
if (this.S) {
y();
}
SpecialsBridge.appLovinAdViewRenderAd(this.f, this.a);
this.d.b(this.S ? 1L : 0L);
if (this.A != null) {
this.b.G().a(new ac(this.b, "scheduleSkipButton", new Runnable() {
@Override
public void run() {
f.this.E();
}
}), r.b.MAIN, this.a.s(), true);
}
super.b(this.J);
}
@Override
public void b() {
y yVar = this.c;
if (y.a()) {
this.c.b("AppLovinFullscreenActivity", "Skipping video from prompt");
}
c();
}
public void c() {
this.Y = SystemClock.elapsedRealtime() - this.Z;
y yVar = this.c;
if (y.a()) {
this.c.b("AppLovinFullscreenActivity", "Skipping video with skip time: " + this.Y + "ms");
}
this.d.f();
this.p++;
if (this.a.y()) {
h();
} else {
B();
}
}
public void c(long j) {
this.K = j;
}
public void c(String str) {
y yVar = this.c;
if (y.a()) {
y yVar2 = this.c;
yVar2.e("AppLovinFullscreenActivity", "Encountered media error: " + str + " for ad: " + this.a);
}
if (this.W.compareAndSet(false, true)) {
if (this.u instanceof com.applovin.impl.sdk.ad.h) {
((com.applovin.impl.sdk.ad.h) this.u).onAdDisplayFailed(str);
}
h();
}
}
@Override
public void c(boolean z) {
super.c(z);
if (z) {
a(0L);
if (this.L) {
this.I.a();
}
} else if (this.L) {
this.I.c();
} else {
e();
}
}
@Override
public void d() {
a((ViewGroup) null);
}
@Override
public void e() {
y yVar = this.c;
if (y.a()) {
this.c.b("AppLovinFullscreenActivity", "Pausing video");
}
this.U = this.y.getCurrentPosition();
this.y.pause();
this.H.c();
y yVar2 = this.c;
if (y.a()) {
y yVar3 = this.c;
yVar3.b("AppLovinFullscreenActivity", "Paused video at position " + this.U + "ms");
}
}
@Override
public String getCommunicatorId() {
return "FullscreenVideoAdPresenter";
}
@Override
public void h() {
this.H.b();
this.I.b();
this.Q.removeCallbacksAndMessages(null);
this.R.removeCallbacksAndMessages(null);
n();
super.h();
}
@Override
public void k() {
y yVar = this.c;
if (y.a()) {
this.c.c("AppLovinFullscreenActivity", "Destroying video components");
}
try {
if (((Boolean) this.b.a(com.applovin.impl.sdk.c.b.gH)).booleanValue()) {
z.a(this.D);
this.D = null;
}
if (this.S) {
AppLovinCommunicator.getInstance(this.e).unsubscribe(this, "video_caching_failed");
}
AppLovinVideoView appLovinVideoView = this.y;
if (appLovinVideoView != null) {
appLovinVideoView.pause();
AppLovinVideoBridge.VideoViewStop(this.y);
}
MediaPlayer mediaPlayer = this.N;
if (mediaPlayer != null) {
mediaPlayer.release();
}
} catch (Throwable th) {
y.c("AppLovinFullscreenActivity", "Unable to destroy presenter", th);
}
super.k();
}
@Override
protected void n() {
super.a(D(), this.S, s(), this.Y);
}
@Override
public void onMessageReceived(AppLovinCommunicatorMessage appLovinCommunicatorMessage) {
if ("video_caching_failed".equals(appLovinCommunicatorMessage.getTopic())) {
Bundle messageData = appLovinCommunicatorMessage.getMessageData();
long j = messageData.getLong("ad_id");
if (((Boolean) this.b.a(com.applovin.impl.sdk.c.b.go)).booleanValue() && j == this.a.getAdIdNumber() && this.S) {
int i = messageData.getInt("load_response_code");
String string = messageData.getString("load_exception_message");
if ((string == null && i >= 200 && i < 300) || this.V || this.y.isPlaying()) {
return;
}
c("Video cache error during stream. ResponseCode=" + i + ", exception=" + string);
}
}
}
@Override
public boolean s() {
return D() >= this.a.T();
}
@Override
protected boolean t() {
return u() && !s();
}
@Override
protected void v() {
long aj;
long millis;
if (this.a.ai() >= 0 || this.a.aj() >= 0) {
if (this.a.ai() >= 0) {
aj = this.a.ai();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.a;
long j = this.K;
long j2 = j > 0 ? 0 + j : 0L;
if (aVar.ak()) {
int l = (int) ((com.applovin.impl.sdk.ad.a) this.a).l();
if (l > 0) {
millis = TimeUnit.SECONDS.toMillis(l);
} else {
int t = (int) aVar.t();
if (t > 0) {
millis = TimeUnit.SECONDS.toMillis(t);
}
}
j2 += millis;
}
aj = (long) (j2 * (this.a.aj() / 100.0d));
}
b(aj);
}
}
@Override
public void x() {
super.x();
this.M.a(this.D);
this.M.a((View) this.A);
if (!u() || this.L) {
H();
}
}
public void y() {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
if (f.this.z != null) {
f.this.z.a();
}
}
});
}
public void z() {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
if (f.this.z != null) {
f.this.z.b();
}
}
});
}
}