- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
268 lines
8.5 KiB
Java
268 lines
8.5 KiB
Java
package com.fyber.inneractive.sdk.player.ui;
|
|
|
|
import android.content.Context;
|
|
import android.os.SystemClock;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewParent;
|
|
import com.fyber.inneractive.sdk.R;
|
|
import com.fyber.inneractive.sdk.config.IAConfigManager;
|
|
import com.fyber.inneractive.sdk.config.e0;
|
|
import com.fyber.inneractive.sdk.config.global.features.r;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import com.fyber.inneractive.sdk.util.c1;
|
|
import com.fyber.inneractive.sdk.util.p0;
|
|
import com.fyber.inneractive.sdk.util.q0;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public abstract class i extends s {
|
|
public static final p0 N;
|
|
public final com.fyber.inneractive.sdk.player.ui.a D;
|
|
public final LayoutInflater E;
|
|
public final com.fyber.inneractive.sdk.flow.e F;
|
|
public boolean G;
|
|
public c1 H;
|
|
public j I;
|
|
public int J;
|
|
public int K;
|
|
public View L;
|
|
public boolean M;
|
|
|
|
public class a implements c1.b {
|
|
public final /* synthetic */ int a;
|
|
|
|
public a(int i) {
|
|
this.a = i;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.util.c1.b
|
|
public final void a() {
|
|
if (i.this.h) {
|
|
IAlog.a("Autoclick is aborted - app in background", new Object[0]);
|
|
} else {
|
|
IAlog.a("Autoclick is triggered", new Object[0]);
|
|
((com.fyber.inneractive.sdk.player.controller.o) i.this.g).a(this.a, i.N);
|
|
}
|
|
i iVar = i.this;
|
|
if (iVar.H != null) {
|
|
IAlog.a("Autoclick is removed ", new Object[0]);
|
|
iVar.H.e = null;
|
|
iVar.H = null;
|
|
}
|
|
}
|
|
}
|
|
|
|
static {
|
|
p0 a2 = p0.a();
|
|
a2.c = true;
|
|
N = a2;
|
|
}
|
|
|
|
public i(Context context, com.fyber.inneractive.sdk.flow.e eVar, com.fyber.inneractive.sdk.player.ui.a aVar, com.fyber.inneractive.sdk.config.global.s sVar, String str) {
|
|
super(context, sVar, str);
|
|
this.G = false;
|
|
this.M = true;
|
|
this.F = eVar;
|
|
this.E = LayoutInflater.from(context);
|
|
this.D = aVar;
|
|
}
|
|
|
|
public abstract void a(int i);
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s, com.fyber.inneractive.sdk.player.ui.l
|
|
public void a(b bVar) {
|
|
View view = bVar.e;
|
|
this.L = view;
|
|
this.p = bVar.f;
|
|
if (view == null || this.u == null) {
|
|
return;
|
|
}
|
|
ViewParent parent = view.getParent();
|
|
if (parent instanceof ViewGroup) {
|
|
((ViewGroup) parent).removeView(this.L);
|
|
}
|
|
if (this.u != null) {
|
|
if (com.fyber.inneractive.sdk.model.vast.h.Static == bVar.f && (!r.c.NONE.equals(bVar.k))) {
|
|
a(this.u, bVar.k, bVar.l);
|
|
} else {
|
|
this.u.setVisibility(0);
|
|
}
|
|
}
|
|
this.u.addView(this.L, 0);
|
|
b(bVar);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s
|
|
public View getEndCardView() {
|
|
return this.L;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s
|
|
public int getMaxTickFactor() {
|
|
return 1000;
|
|
}
|
|
|
|
public int getSingleTickTime() {
|
|
return 1000 / getTickFraction();
|
|
}
|
|
|
|
public int getTickFraction() {
|
|
return 5;
|
|
}
|
|
|
|
public void i(boolean z) {
|
|
String string = getContext().getString(R.string.ia_video_app_info_text);
|
|
com.fyber.inneractive.sdk.config.global.s sVar = this.y;
|
|
if (sVar != null) {
|
|
this.M = ((com.fyber.inneractive.sdk.config.global.features.r) sVar.a(com.fyber.inneractive.sdk.config.global.features.r.class)).a(true, "show_ad_identifier_original_design");
|
|
string = ((com.fyber.inneractive.sdk.config.global.features.n) this.y.a(com.fyber.inneractive.sdk.config.global.features.n.class)).a("app_info_button_text", "App Info");
|
|
if (string != null && string.length() > 30) {
|
|
string = string.substring(0, 30);
|
|
}
|
|
}
|
|
if (z && this.M) {
|
|
b(false);
|
|
a(true, string);
|
|
c(true);
|
|
} else if (z) {
|
|
b(false);
|
|
a(true, string);
|
|
c(false);
|
|
} else if (!this.M) {
|
|
b(true);
|
|
c(false);
|
|
} else {
|
|
a(false, (String) null);
|
|
b(false);
|
|
c(true);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.d, android.view.View
|
|
public final void onWindowFocusChanged(boolean z) {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s
|
|
public final void q() {
|
|
this.w = this.D.a(this.d, this.q, this.r, this.v, this.b, this.m, this.l);
|
|
}
|
|
|
|
public final boolean r() {
|
|
com.fyber.inneractive.sdk.config.global.s sVar = this.y;
|
|
if (sVar == null || sVar.a(com.fyber.inneractive.sdk.config.global.features.r.class) == null) {
|
|
return false;
|
|
}
|
|
return ((com.fyber.inneractive.sdk.config.global.features.r) this.y.a(com.fyber.inneractive.sdk.config.global.features.r.class)).a(false, "cta_text_all_caps");
|
|
}
|
|
|
|
public void setEndCardView(View view) {
|
|
this.L = view;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s
|
|
public void b(int i, int i2) {
|
|
Runnable runnable = this.I;
|
|
if (runnable != null) {
|
|
removeCallbacks(runnable);
|
|
this.I = null;
|
|
}
|
|
this.K = getMaxTickFactor() + i2;
|
|
int maxTickFactor = (getMaxTickFactor() / getTickFractions()) + i2;
|
|
int i3 = this.K;
|
|
if (i3 <= 0 || i3 > i) {
|
|
return;
|
|
}
|
|
int i4 = this.J;
|
|
if (maxTickFactor < i4 && i4 > 0) {
|
|
a(i3);
|
|
return;
|
|
}
|
|
this.J = maxTickFactor;
|
|
a(maxTickFactor);
|
|
j jVar = new j(this);
|
|
this.I = jVar;
|
|
postDelayed(jVar, this.k);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s
|
|
public final void f() {
|
|
if (this.H != null) {
|
|
IAlog.a("Autoclick is removed ", new Object[0]);
|
|
this.H.e = null;
|
|
this.H = null;
|
|
}
|
|
this.G = true;
|
|
}
|
|
|
|
public String getLocalizedCtaButtonText() {
|
|
com.fyber.inneractive.sdk.config.global.s sVar = this.y;
|
|
com.fyber.inneractive.sdk.config.global.features.c cVar = sVar != null ? (com.fyber.inneractive.sdk.config.global.features.c) sVar.a(com.fyber.inneractive.sdk.config.global.features.c.class) : null;
|
|
if (cVar == null) {
|
|
return null;
|
|
}
|
|
cVar.d(IAConfigManager.L.o);
|
|
com.fyber.inneractive.sdk.model.vast.a aVar = cVar.e;
|
|
if (aVar == null || !aVar.d) {
|
|
return null;
|
|
}
|
|
return aVar.a;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s
|
|
public final void k() {
|
|
if (this.H != null) {
|
|
IAlog.a("Autoclick paused", new Object[0]);
|
|
c1 c1Var = this.H;
|
|
c1Var.d = true;
|
|
c1.a aVar = c1Var.c;
|
|
if (aVar != null) {
|
|
aVar.removeMessages(1932593528);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s
|
|
public final void l() {
|
|
if (this.H != null) {
|
|
IAlog.a("Autoclick resumed", new Object[0]);
|
|
c1 c1Var = this.H;
|
|
c1Var.d = false;
|
|
long uptimeMillis = SystemClock.uptimeMillis();
|
|
long uptimeMillis2 = (SystemClock.uptimeMillis() - uptimeMillis) + 50 + c1Var.f;
|
|
c1Var.f = uptimeMillis2;
|
|
if (c1Var.e != null && uptimeMillis2 > c1Var.a.toMillis(c1Var.b)) {
|
|
c1Var.e.a();
|
|
return;
|
|
}
|
|
c1.a aVar = c1Var.c;
|
|
if (aVar == null || c1Var.e == null) {
|
|
return;
|
|
}
|
|
aVar.removeMessages(1932593528);
|
|
c1Var.c.sendEmptyMessageDelayed(1932593528, 50L);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.d
|
|
public final void a(q0 q0Var, int i, int i2) {
|
|
this.D.a(this.d, this.q, this.r, this.s, q0Var, i, i2, this.b, ((e0) this.c).f.f.intValue());
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.ui.s
|
|
public final void a(int i, int i2) {
|
|
if (this.G || this.H != null) {
|
|
return;
|
|
}
|
|
IAlog.a("Start Autoclick timer - %d seconds", Integer.valueOf(i2));
|
|
c1 c1Var = new c1(TimeUnit.SECONDS, i2);
|
|
this.H = c1Var;
|
|
c1Var.e = new a(i);
|
|
c1.a aVar = new c1.a(c1Var);
|
|
c1Var.c = aVar;
|
|
c1Var.d = false;
|
|
aVar.sendEmptyMessage(1932593528);
|
|
}
|
|
}
|