Files
rr3-apk/decompiled/sources/com/applovin/impl/u9.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

977 lines
32 KiB
Java

package com.applovin.impl;
import android.app.Activity;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import com.applovin.adview.AppLovinAdView;
import com.applovin.communicator.AppLovinCommunicator;
import com.applovin.communicator.AppLovinCommunicatorMessage;
import com.applovin.communicator.AppLovinCommunicatorSubscriber;
import com.applovin.exoplayer2.ui.d;
import com.applovin.impl.adview.AppLovinTouchToClickListener;
import com.applovin.impl.bi;
import com.applovin.impl.ck;
import com.applovin.impl.qh;
import com.applovin.impl.rr;
import com.applovin.impl.sdk.utils.ImageViewUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.tm;
import com.applovin.impl.v4;
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 java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes.dex */
public class u9 extends p9 implements AppLovinCommunicatorSubscriber {
private final w9 K;
protected final com.applovin.exoplayer2.ui.e L;
protected final ck M;
protected final o N;
protected final com.applovin.impl.adview.g O;
protected h3 P;
protected final ImageView Q;
protected com.applovin.impl.adview.l R;
protected final ProgressBar S;
protected ProgressBar T;
private final d U;
private final Handler V;
private final Handler W;
protected final v4 X;
protected final v4 Y;
private final boolean Z;
protected boolean a0;
protected long b0;
protected int c0;
protected boolean d0;
protected boolean e0;
private long f0;
private final AtomicBoolean g0;
private final AtomicBoolean h0;
private long i0;
private long j0;
public void c(long j) {
this.b0 = j;
}
public void d(String str) {
if (com.applovin.impl.sdk.n.a()) {
this.c.b("AppLovinFullscreenActivity", "Encountered media error: " + str + " for ad: " + this.a);
}
if (StringUtils.containsAtLeastOneSubstring(str, this.b.c(sj.X2))) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Ignoring media error: " + str);
return;
}
return;
}
if (this.g0.compareAndSet(false, true)) {
if (yp.a(sj.i1, this.b)) {
this.b.B().d(this.a, com.applovin.impl.sdk.j.l());
}
AppLovinAdDisplayListener appLovinAdDisplayListener = this.C;
if (appLovinAdDisplayListener instanceof qb) {
((qb) appLovinAdDisplayListener).onAdDisplayFailed(str);
}
this.b.E().a(this.a instanceof aq ? "handleVastExoPlayerError" : "handleExoPlayerError", str, this.a);
f();
}
}
@Override // com.applovin.communicator.AppLovinCommunicatorEntity
public String getCommunicatorId() {
return "FullscreenVideoAdExoPlayerPresenter";
}
@Override // com.applovin.impl.p9
public void x() {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Pausing video");
}
if (!this.M.isPlaying()) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Nothing to pause");
return;
}
return;
}
this.f0 = this.M.getCurrentPosition();
this.M.a(false);
this.X.c();
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Paused video at position " + this.f0 + "ms");
}
}
public void d(boolean z) {
if (z3.f()) {
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.d.getDrawable(z ? R.drawable.applovin_ic_unmute_to_mute : R.drawable.applovin_ic_mute_to_unmute);
if (animatedVectorDrawable != null) {
this.Q.setScaleType(ImageView.ScaleType.FIT_XY);
this.Q.setImageDrawable(animatedVectorDrawable);
animatedVectorDrawable.start();
return;
}
}
ImageViewUtils.setImageUri(this.Q, z ? this.a.L() : this.a.f0(), this.b);
}
public u9(com.applovin.impl.sdk.ad.b bVar, Activity activity, Map map, com.applovin.impl.sdk.j jVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
super(bVar, activity, map, jVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
this.K = new w9(this.a, this.d, this.b);
a aVar = null;
d dVar = new d(this, aVar);
this.U = dVar;
Handler handler = new Handler(Looper.getMainLooper());
this.V = handler;
Handler handler2 = new Handler(Looper.getMainLooper());
this.W = handler2;
v4 v4Var = new v4(handler, this.b);
this.X = v4Var;
this.Y = new v4(handler2, this.b);
boolean I0 = this.a.I0();
this.Z = I0;
this.a0 = yp.e(this.b);
this.f0 = -1L;
this.g0 = new AtomicBoolean();
this.h0 = new AtomicBoolean();
this.i0 = -2L;
this.j0 = 0L;
if (bVar.hasVideoUrl()) {
f fVar = new f(this, aVar);
if (bVar.l0() >= 0) {
com.applovin.impl.adview.g gVar = new com.applovin.impl.adview.g(bVar.c0(), activity);
this.O = gVar;
gVar.setVisibility(8);
gVar.setOnClickListener(fVar);
} else {
this.O = null;
}
if (a(this.a0, jVar)) {
ImageView imageView = new ImageView(activity);
this.Q = imageView;
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
imageView.setClickable(true);
imageView.setOnClickListener(fVar);
d(this.a0);
} else {
this.Q = null;
}
String h0 = bVar.h0();
if (StringUtils.isValidString(h0)) {
rr rrVar = new rr(jVar);
rrVar.a(new WeakReference(dVar));
com.applovin.impl.adview.l lVar = new com.applovin.impl.adview.l(bVar.g0(), bVar, rrVar, activity);
this.R = lVar;
lVar.a(h0);
} else {
this.R = null;
}
if (I0) {
o oVar = new o(activity, ((Integer) jVar.a(sj.K2)).intValue(), android.R.attr.progressBarStyleLarge);
this.N = oVar;
oVar.setColor(Color.parseColor("#75FFFFFF"));
oVar.setBackgroundColor(Color.parseColor("#00000000"));
oVar.setVisibility(8);
AppLovinCommunicator.getInstance(activity).subscribe(this, "video_caching_failed");
} else {
this.N = null;
}
int g = g();
boolean z = ((Boolean) jVar.a(sj.p2)).booleanValue() && g > 0;
if (this.P == null && z) {
this.P = new h3(activity);
int p = bVar.p();
this.P.setTextColor(p);
this.P.setTextSize(((Integer) jVar.a(sj.o2)).intValue());
this.P.setFinishedStrokeColor(p);
this.P.setFinishedStrokeWidth(((Integer) jVar.a(sj.n2)).intValue());
this.P.setMax(g);
this.P.setProgress(g);
v4Var.a("COUNTDOWN_CLOCK", TimeUnit.SECONDS.toMillis(1L), new a(g));
}
if (bVar.s0()) {
Long l = (Long) jVar.a(sj.H2);
Integer num = (Integer) jVar.a(sj.I2);
ProgressBar progressBar = new ProgressBar(activity, null, android.R.attr.progressBarStyleHorizontal);
this.S = progressBar;
a(progressBar, bVar.r0(), num.intValue());
v4Var.a("PROGRESS_BAR", l.longValue(), new b(num));
} else {
this.S = null;
}
ck a2 = new ck.b(activity).a();
this.M = a2;
e eVar = new e(this, aVar);
a2.a((qh.c) eVar);
a2.a(0);
com.applovin.exoplayer2.ui.e eVar2 = new com.applovin.exoplayer2.ui.e(activity);
this.L = eVar2;
eVar2.c();
eVar2.setControllerVisibilityListener(eVar);
eVar2.setPlayer(a2);
eVar2.setOnTouchListener(new AppLovinTouchToClickListener(jVar, sj.D0, activity, eVar));
bVar.d().putString("video_view_address", zq.a(eVar2));
O();
return;
}
throw new IllegalStateException("Attempting to use fullscreen video ad presenter for non-video ad");
}
public class a implements v4.b {
final /* synthetic */ int a;
public a(int i) {
this.a = i;
}
@Override // com.applovin.impl.v4.b
public void a() {
u9 u9Var = u9.this;
if (u9Var.P != null) {
long seconds = this.a - TimeUnit.MILLISECONDS.toSeconds(u9Var.L.getPlayer().getCurrentPosition());
if (seconds <= 0) {
u9.this.u = true;
} else if (u9.this.P()) {
u9.this.P.setProgress((int) seconds);
}
}
}
@Override // com.applovin.impl.v4.b
public boolean b() {
return u9.this.P();
}
}
public class b implements v4.b {
final /* synthetic */ Integer a;
public b(Integer num) {
this.a = num;
}
@Override // com.applovin.impl.v4.b
public void a() {
u9 u9Var = u9.this;
if (u9Var.d0) {
u9Var.S.setVisibility(8);
} else {
u9.this.S.setProgress((int) ((u9Var.M.getCurrentPosition() / u9.this.b0) * this.a.intValue()));
}
}
@Override // com.applovin.impl.v4.b
public boolean b() {
return !u9.this.d0;
}
}
@Override // com.applovin.impl.p9
public void y() {
a((ViewGroup) null);
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void H() {
a(250L);
}
@Override // com.applovin.impl.kb.a
public void c() {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses");
}
}
public void O() {
a(!this.Z);
Activity activity = this.d;
bi a2 = new bi.b(new w5(activity, xp.a((Context) activity, "com.applovin.sdk"))).a(td.a(this.a.t0()));
this.M.a(!this.a0 ? 1 : 0);
this.M.a((be) a2);
this.M.b();
this.M.a(false);
}
public void N() {
if (this.h0.compareAndSet(false, true)) {
a(this.O, this.a.l0(), new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
u9.this.G();
}
});
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void G() {
this.i0 = -1L;
this.j0 = SystemClock.elapsedRealtime();
}
@Override // com.applovin.impl.p9
public void f() {
this.X.a();
this.Y.a();
this.V.removeCallbacksAndMessages(null);
this.W.removeCallbacksAndMessages(null);
o();
super.f();
}
@Override // com.applovin.impl.p9
public void t() {
if (((Boolean) this.b.a(sj.n6)).booleanValue()) {
tr.d(this.R);
this.R = null;
}
this.M.V();
if (this.Z) {
AppLovinCommunicator.getInstance(this.d).unsubscribe(this, "video_caching_failed");
}
super.t();
}
private void K() {
com.applovin.impl.adview.l lVar;
qq j0 = this.a.j0();
if (j0 == null || !j0.j() || this.d0 || (lVar = this.R) == null) {
return;
}
final boolean z = lVar.getVisibility() == 4;
final long h = j0.h();
AppLovinSdkUtils.runOnUiThread(new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
u9.this.b(z, h);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void b(boolean z, long j) {
if (z) {
zq.a(this.R, j, (Runnable) null);
} else {
zq.b(this.R, j, null);
}
}
public boolean P() {
return (this.u || this.d0 || !this.L.getPlayer().isPlaying()) ? false : true;
}
public void U() {
this.i0 = SystemClock.elapsedRealtime() - this.j0;
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Attempting to skip video with skip time: " + this.i0 + "ms");
}
if (Q()) {
x();
p();
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Prompting incentivized ad close warning");
}
this.E.e();
return;
}
B();
}
public void B() {
this.x++;
if (this.a.A()) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Dismissing ad on video skip...");
}
f();
} else {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Skipping video...");
}
T();
}
}
public void a(MotionEvent motionEvent, Bundle bundle) {
Context context;
if (this.a.H0()) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Clicking through video");
}
Uri k0 = this.a.k0();
if (k0 != null) {
if (!((Boolean) this.b.a(sj.F)).booleanValue() || (context = this.d) == null) {
AppLovinAdView appLovinAdView = this.i;
context = appLovinAdView != null ? appLovinAdView.getContext() : com.applovin.impl.sdk.j.l();
}
this.b.i().trackAndLaunchVideoClick(this.a, k0, motionEvent, bundle, this, context);
gc.a(this.B, this.a);
this.y++;
return;
}
return;
}
K();
}
public void V() {
this.c0 = A();
this.M.a(false);
}
public void L() {
if (this.d0) {
if (com.applovin.impl.sdk.n.a()) {
this.c.k("AppLovinFullscreenActivity", "Skip video resume - postitial shown");
return;
}
return;
}
if (this.b.f0().isApplicationPaused()) {
if (com.applovin.impl.sdk.n.a()) {
this.c.k("AppLovinFullscreenActivity", "Skip video resume - app paused");
return;
}
return;
}
long j = this.f0;
if (j >= 0) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Resuming video at position " + j + "ms for MediaPlayer: " + this.M);
}
this.M.a(true);
this.X.b();
this.f0 = -1L;
if (this.M.isPlaying()) {
return;
}
S();
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Invalid last video position, isVideoPlaying=" + this.M.isPlaying());
}
}
public void S() {
AppLovinSdkUtils.runOnUiThread(new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
u9.this.I();
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void I() {
o oVar = this.N;
if (oVar != null) {
oVar.a();
}
}
public void C() {
AppLovinSdkUtils.runOnUiThread(new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
u9.this.F();
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void F() {
o oVar = this.N;
if (oVar != null) {
oVar.b();
}
}
public boolean D() {
com.applovin.impl.sdk.ad.b bVar = this.a;
if (bVar == null) {
return false;
}
if (this.H && bVar.a1()) {
return true;
}
return E();
}
public boolean E() {
return A() >= this.a.n0();
}
public int A() {
ck ckVar = this.M;
if (ckVar == null) {
return 0;
}
long currentPosition = ckVar.getCurrentPosition();
if (this.e0) {
return 100;
}
return currentPosition > 0 ? (int) ((currentPosition / this.b0) * 100.0f) : this.c0;
}
public boolean Q() {
return k() && !D();
}
public void T() {
V();
long T = this.a.T();
if (T > 0) {
this.q = 0L;
Long l = (Long) this.b.a(sj.Q2);
Integer num = (Integer) this.b.a(sj.T2);
ProgressBar progressBar = new ProgressBar(this.d, null, android.R.attr.progressBarStyleHorizontal);
this.T = progressBar;
a(progressBar, this.a.S(), num.intValue());
this.Y.a("POSTITIAL_PROGRESS_BAR", l.longValue(), new c(T, num, l));
this.Y.b();
}
this.K.a(this.k, this.j, this.i, this.T);
a("javascript:al_onPoststitialShow(" + this.x + "," + this.y + ");", this.a.C());
if (this.k != null) {
if (this.a.o() >= 0) {
a(this.k, this.a.o(), new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
u9.this.J();
}
});
} else {
this.k.setVisibility(0);
}
}
ArrayList arrayList = new ArrayList();
com.applovin.impl.adview.g gVar = this.k;
if (gVar != null) {
arrayList.add(new og(gVar, FriendlyObstructionPurpose.CLOSE_AD, "close button"));
}
com.applovin.impl.adview.k kVar = this.j;
if (kVar != null && kVar.a()) {
com.applovin.impl.adview.k kVar2 = this.j;
arrayList.add(new og(kVar2, FriendlyObstructionPurpose.NOT_VISIBLE, kVar2.getIdentifier()));
}
ProgressBar progressBar2 = this.T;
if (progressBar2 != null) {
arrayList.add(new og(progressBar2, FriendlyObstructionPurpose.OTHER, "postitial progress bar"));
}
this.a.getAdEventTracker().b(this.i, arrayList);
r();
this.d0 = true;
}
public class c implements v4.b {
final /* synthetic */ long a;
final /* synthetic */ Integer b;
final /* synthetic */ Long c;
public c(long j, Integer num, Long l) {
this.a = j;
this.b = num;
this.c = l;
}
@Override // com.applovin.impl.v4.b
public void a() {
u9.this.T.setProgress((int) ((u9.this.q / this.a) * this.b.intValue()));
u9.this.q += this.c.longValue();
}
@Override // com.applovin.impl.v4.b
public boolean b() {
return u9.this.q < this.a;
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void J() {
this.p = SystemClock.elapsedRealtime();
}
public void W() {
boolean z = this.a0;
this.a0 = !z;
this.M.a(z ? 1.0f : 0.0f);
d(this.a0);
a(this.a0, 0L);
}
@Override // com.applovin.impl.p9
public void o() {
super.a(A(), this.Z, D(), this.i0);
}
public void M() {
long V;
long millis;
if (this.a.U() >= 0 || this.a.V() >= 0) {
if (this.a.U() >= 0) {
V = this.a.U();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.a;
long j = this.b0;
long j2 = j > 0 ? j : 0L;
if (aVar.X0()) {
int l1 = (int) ((com.applovin.impl.sdk.ad.a) this.a).l1();
if (l1 > 0) {
millis = TimeUnit.SECONDS.toMillis(l1);
} else {
int o = (int) aVar.o();
if (o > 0) {
millis = TimeUnit.SECONDS.toMillis(o);
}
}
j2 += millis;
}
V = (long) (j2 * (this.a.V() / 100.0d));
}
b(V);
}
}
@Override // com.applovin.impl.p9
public void b(boolean z) {
super.b(z);
if (z) {
a(0L);
if (this.d0) {
this.Y.b();
return;
}
return;
}
if (this.d0) {
this.Y.c();
} else {
x();
}
}
@Override // com.applovin.impl.p9
public void i() {
super.i();
this.K.a(this.R);
this.K.a((View) this.O);
if (!k() || this.d0) {
R();
}
}
@Override // com.applovin.impl.kb.a
public void b() {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AppLovinFullscreenActivity", "Skipping video from prompt");
}
B();
}
@Override // com.applovin.impl.p9
public void h() {
super.h();
R();
}
/* JADX INFO: Access modifiers changed from: private */
public void R() {
this.K.a(this.l);
this.p = SystemClock.elapsedRealtime();
}
@Override // com.applovin.communicator.AppLovinCommunicatorSubscriber
public void onMessageReceived(AppLovinCommunicatorMessage appLovinCommunicatorMessage) {
if ("video_caching_failed".equals(appLovinCommunicatorMessage.getTopic())) {
Bundle messageData = appLovinCommunicatorMessage.getMessageData();
if (messageData.getLong("ad_id") == this.a.getAdIdNumber() && this.Z) {
int i = messageData.getInt("load_response_code");
String string = messageData.getString("load_exception_message");
if ((string == null && i >= 200 && i < 300) || this.e0 || this.M.isPlaying()) {
return;
}
d("Video cache error during stream. ResponseCode=" + i + ", exception=" + string);
}
}
}
public class e implements qh.c, d.e, AppLovinTouchToClickListener.OnClickListener {
private e() {
}
@Override // com.applovin.impl.qh.c
public void b(int i) {
com.applovin.impl.sdk.n nVar = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Player state changed to state " + i + " and will play when ready: " + u9.this.M.l());
}
if (i == 2) {
u9.this.S();
return;
}
if (i != 3) {
if (i == 4) {
com.applovin.impl.sdk.n nVar2 = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Video completed");
}
u9 u9Var = u9.this;
u9Var.e0 = true;
if (!u9Var.s) {
u9Var.T();
return;
} else {
if (u9Var.k()) {
u9.this.R();
return;
}
return;
}
}
return;
}
u9 u9Var2 = u9.this;
u9Var2.M.a(!u9Var2.a0 ? 1 : 0);
u9 u9Var3 = u9.this;
u9Var3.t = (int) TimeUnit.MILLISECONDS.toSeconds(u9Var3.M.getDuration());
u9 u9Var4 = u9.this;
u9Var4.c(u9Var4.M.getDuration());
u9.this.M();
com.applovin.impl.sdk.n nVar3 = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "MediaPlayer prepared: " + u9.this.M);
}
u9.this.X.b();
u9 u9Var5 = u9.this;
if (u9Var5.O != null) {
u9Var5.N();
}
u9.this.C();
if (u9.this.E.b()) {
u9.this.x();
}
}
@Override // com.applovin.impl.qh.c
public void a(nh nhVar) {
u9.this.d("Video view error (" + yp.a(nhVar) + ")");
u9.this.f();
}
@Override // com.applovin.impl.adview.AppLovinTouchToClickListener.OnClickListener
public void onClick(View view, MotionEvent motionEvent) {
u9.this.a(motionEvent, (Bundle) null);
}
@Override // com.applovin.exoplayer2.ui.d.e
public void d(int i) {
if (i == 0) {
u9.this.L.c();
}
}
public /* synthetic */ e(u9 u9Var, a aVar) {
this();
}
}
public class f implements View.OnClickListener {
private f() {
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
u9 u9Var = u9.this;
if (view == u9Var.O) {
u9Var.U();
return;
}
if (view == u9Var.Q) {
u9Var.W();
return;
}
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.b("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
}
}
public /* synthetic */ f(u9 u9Var, a aVar) {
this();
}
}
public class d implements rr.a {
private d() {
}
@Override // com.applovin.impl.rr.a
public void b(com.applovin.impl.adview.l lVar) {
com.applovin.impl.sdk.n nVar = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Clicking through from video button...");
}
u9.this.a(lVar.getAndClearLastClickEvent(), (Bundle) null);
}
@Override // com.applovin.impl.rr.a
public void a(com.applovin.impl.adview.l lVar) {
com.applovin.impl.sdk.n nVar = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Closing ad from video button...");
}
u9.this.f();
}
@Override // com.applovin.impl.rr.a
public void d(com.applovin.impl.adview.l lVar) {
com.applovin.impl.sdk.n nVar = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Skipping video from video button...");
}
u9.this.U();
}
@Override // com.applovin.impl.rr.a
public void c(com.applovin.impl.adview.l lVar) {
com.applovin.impl.sdk.n nVar = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Fully Watched from video button...");
}
u9.this.H = true;
}
public /* synthetic */ d(u9 u9Var, a aVar) {
this();
}
@Override // com.applovin.impl.rr.a
public void a(com.applovin.impl.adview.l lVar, Bundle bundle) {
com.applovin.impl.sdk.n nVar = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Attempting to launch Direct Download from video button...");
}
u9.this.a(lVar.getAndClearLastClickEvent(), bundle);
}
@Override // com.applovin.impl.rr.a
public void b(Uri uri, com.applovin.impl.adview.l lVar) {
com.applovin.impl.sdk.n nVar = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Attempting to report a template error from video button...");
}
tp.b(uri, u9.this.i.getController().i(), u9.this.b);
}
@Override // com.applovin.impl.rr.a
public void a(Uri uri, com.applovin.impl.adview.l lVar) {
com.applovin.impl.sdk.n nVar = u9.this.c;
if (com.applovin.impl.sdk.n.a()) {
u9.this.c.a("AppLovinFullscreenActivity", "Attempting to load a url from video button...");
}
tp.a(uri, u9.this.i.getController(), u9.this.b);
}
}
private static boolean a(boolean z, com.applovin.impl.sdk.j jVar) {
if (!((Boolean) jVar.a(sj.z2)).booleanValue()) {
return false;
}
if (!((Boolean) jVar.a(sj.A2)).booleanValue() || z) {
return true;
}
return ((Boolean) jVar.a(sj.C2)).booleanValue();
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(String str) {
tr.a(this.R, str, "AppLovinFullscreenActivity", this.b);
}
@Override // com.applovin.impl.p9
public void a(final String str, long j) {
super.a(str, j);
if (this.R == null || j < 0 || !StringUtils.isValidString(str) || !((Boolean) this.b.a(sj.W2)).booleanValue()) {
return;
}
a(new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
u9.this.a(str);
}
}, j);
}
private void a(ProgressBar progressBar, int i, int i2) {
progressBar.setMax(i2);
progressBar.setPadding(0, 0, 0, 0);
if (z3.f()) {
progressBar.setProgressTintList(ColorStateList.valueOf(i));
}
}
@Override // com.applovin.impl.p9
public void a(ViewGroup viewGroup) {
this.K.a(this.Q, this.O, this.R, this.N, this.S, this.P, this.L, this.i, this.j, null, viewGroup);
com.applovin.impl.adview.k kVar = this.j;
if (kVar != null) {
kVar.b();
}
this.M.a(true);
if (this.a.d1()) {
this.E.b(this.a, new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda6
@Override // java.lang.Runnable
public final void run() {
u9.this.H();
}
});
}
if (this.Z) {
S();
}
this.i.renderAd(this.a);
if (this.O != null) {
this.b.j0().a(new jn(this.b, "scheduleSkipButton", new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda7
@Override // java.lang.Runnable
public final void run() {
u9.this.N();
}
}), tm.b.TIMEOUT, this.a.m0(), true);
}
super.c(this.a0);
}
@Override // com.applovin.impl.p9
public void a(long j) {
a(new Runnable() { // from class: com.applovin.impl.u9$$ExternalSyntheticLambda8
@Override // java.lang.Runnable
public final void run() {
u9.this.L();
}
}, j);
}
}