Recover Files v1.3.9版本的 MD5 值为:27a8b2c239c6cb7111d74d6bb07d21b2
以下内容为反编译后的 s0.java 源代码,内容仅作参考
package com.adcolony.sdk;
import a9.x;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import androidx.annotation.NonNull;
import com.adcolony.sdk.AdColonyAdView;
import com.adcolony.sdk.e0;
import com.adcolony.sdk.m;
import com.adcolony.sdk.m1;
import com.adcolony.sdk.s1;
import com.adcolony.sdk.y0;
import com.google.android.exoplayer2.audio.SilenceSkippingAudioProcessor;
import com.google.firebase.analytics.FirebaseAnalytics;
import java.io.File;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ScheduledExecutorService;
public class s0 {
public static String Z = "https://adc3-launch.adcolony.com/v4/launch";
public static volatile String f2623a0 = "";
public boolean A;
public boolean B;
public boolean C;
public boolean E;
public boolean F;
public boolean G;
public boolean H;
public boolean I;
public boolean J;
public boolean K;
public boolean L;
public int M;
public Application.ActivityLifecycleCallbacks O;
public boolean T;
public int X;
public p0 f2624a;
public o1 f2625b;
public p1 f2626c;
public com.adcolony.sdk.b0 f2627d;
public k1 f2628e;
public u1 f2629f;
public w1 f2630g;
public t1 f2631h;
public k0 f2632i;
public i1 f2633j;
public v0 f2634k;
public com.adcolony.sdk.z f2635l;
public a2 f2636m;
public AdColonyAdView f2637n;
public com.adcolony.sdk.m f2638o;
public com.adcolony.sdk.p f2639p;
public com.adcolony.sdk.g f2641r;
public n0 f2642s;
public h0 f2643t;
public String f2646w;
public String f2647x;
public String f2648y;
public HashMap<String, com.adcolony.sdk.i> f2640q = new HashMap<>();
public HashMap<String, com.adcolony.sdk.s> f2644u = new HashMap<>();
public HashMap<Integer, c1> f2645v = new HashMap<>();
public String f2649z = "";
public i0 D = new i0();
public int N = 1;
public eb.k P = null;
public h0 Q = new h0();
public long R = 500;
public long S = 500;
public long U = SilenceSkippingAudioProcessor.DEFAULT_PADDING_SILENCE_US;
public long V = 300000;
public long W = 15000;
public boolean Y = false;
public class a implements r0 {
public a() {
}
@Override
public void a(n0 n0Var) {
s0.this.Q(true, true);
}
}
public class a0 implements r0 {
public a0() {
}
@Override
public void a(n0 n0Var) {
s0.this.p0(n0Var);
}
}
public class b implements r0 {
public b(s0 s0Var) {
}
@Override
public void a(n0 n0Var) {
h0 h0Var = new h0();
com.adcolony.sdk.a0.u(h0Var, "crc32", e2.e(n0Var.a().K("data")));
n0Var.b(h0Var).e();
}
}
public class b0 implements r0 {
public b0() {
}
@Override
public void a(n0 n0Var) {
s0.this.r0(n0Var);
}
}
public class c implements r0 {
public c(s0 s0Var) {
}
@Override
public void a(n0 n0Var) {
h0 h0Var = new h0();
com.adcolony.sdk.a0.n(h0Var, "sha1", e2.D(n0Var.a().K("data")));
n0Var.b(h0Var).e();
}
}
public class d implements r0 {
public d(s0 s0Var) {
}
@Override
public void a(n0 n0Var) {
int E = n0Var.a().E("number");
h0 h0Var = new h0();
com.adcolony.sdk.a0.l(h0Var, "uuids", e2.g(E));
n0Var.b(h0Var).e();
}
}
public class e implements r0 {
public class a implements z1<String> {
public final n0 f2654a;
public a(n0 n0Var) {
this.f2654a = n0Var;
}
@Override
public void a(@NonNull String str) {
h0 h0Var = new h0();
com.adcolony.sdk.a0.n(h0Var, com.facebook.h0.f18311f, s0.this.H0().L());
com.adcolony.sdk.a0.w(h0Var, "limit_ad_tracking", s0.this.H0().a());
this.f2654a.b(h0Var).e();
}
@Override
public void a(@NonNull Throwable th2) {
e0.a aVar = new e0.a();
aVar.f2296a.append("Device.query_advertiser_info");
aVar.f2296a.append(" failed with error: ");
aVar.f2296a.append(Log.getStackTraceString(th2));
aVar.d(e0.f2291g);
}
}
public e() {
}
@Override
public void a(n0 n0Var) {
s0.this.H0().u(com.adcolony.sdk.v.a(), new a(n0Var));
}
}
public class f implements r0 {
public f() {
}
@Override
public void a(n0 n0Var) {
n1 c10 = s0.this.N0().c();
s0.this.H0().H(n0Var.a().K("version"));
if (c10 != null) {
c10.k(s0.this.H0().U());
}
}
}
public class g implements r0 {
public g() {
}
@Override
public void a(n0 n0Var) {
s0.this.Q = n0Var.a().H("signals");
}
}
public class h implements r0 {
public class a implements x1<y0.b> {
public final n0 f2659a;
public a(h hVar, n0 n0Var) {
this.f2659a = n0Var;
}
@Override
public void a(y0.b bVar) {
h0 h0Var = new h0();
if (bVar != null) {
com.adcolony.sdk.a0.m(h0Var, "odt", bVar.d());
}
this.f2659a.b(h0Var).e();
}
}
public h() {
}
@Override
public void a(n0 n0Var) {
if (s0.this.g()) {
z0.n().h(new a(this, n0Var), s0.this.t0());
return;
}
y0.b k10 = z0.n().k();
h0 h0Var = new h0();
if (k10 != null) {
com.adcolony.sdk.a0.m(h0Var, "odt", k10.d());
}
n0Var.b(h0Var).e();
}
}
public class i implements r0 {
public i(s0 s0Var) {
}
@Override
public void a(n0 n0Var) {
z0.n().c();
}
}
public class j implements r0 {
public j() {
}
@Override
public void a(n0 n0Var) {
s0.this.f2636m.c(n0Var);
}
}
public class k implements Runnable {
public k() {
}
@Override
public void run() {
Context a10 = com.adcolony.sdk.v.a();
if (!s0.this.L && a10 != null) {
try {
cb.a.a(a10.getApplicationContext());
s0.this.L = true;
} catch (IllegalArgumentException unused) {
e0.a aVar = new e0.a();
aVar.f2296a.append("IllegalArgumentException when activating Omid");
aVar.d(e0.f2293i);
s0.this.L = false;
}
}
s0 s0Var = s0.this;
if (s0Var.L && s0Var.P == null) {
try {
s0Var.P = eb.k.a("AdColony", "4.8.0");
} catch (IllegalArgumentException unused2) {
e0.a aVar2 = new e0.a();
aVar2.f2296a.append("IllegalArgumentException when creating Omid Partner");
aVar2.d(e0.f2293i);
s0.this.L = false;
}
}
}
}
public class l implements Runnable {
public class a implements m1.a {
public a() {
}
@Override
public void a(m1 m1Var, n0 n0Var, Map<String, List<String>> map) {
s0.this.G(m1Var);
}
}
public l() {
}
@Override
public void run() {
h0 h0Var = new h0();
com.adcolony.sdk.a0.n(h0Var, "url", s0.Z);
com.adcolony.sdk.a0.n(h0Var, FirebaseAnalytics.d.f23830h, "application/json");
com.adcolony.sdk.a0.n(h0Var, "content", s0.this.H0().Z().toString());
com.adcolony.sdk.a0.n(h0Var, "url", s0.Z);
if (s0.this.Y) {
h0 h0Var2 = new h0();
com.adcolony.sdk.a0.n(h0Var2, "request", h2.a.f31721h);
com.adcolony.sdk.a0.n(h0Var2, "response", h2.a.f31723j);
com.adcolony.sdk.a0.m(h0Var, "dictionaries_mapping", h0Var2);
}
s0.this.f2625b.e(new m1(new n0("WebServices.post", 0, h0Var), new a()));
}
}
public class m implements s1.c {
public m(s0 s0Var) {
}
@Override
public void a() {
z0.n().o();
}
}
public class n implements Runnable {
public final Context f2664b;
public final n0 f2665c;
public n(Context context, n0 n0Var) {
this.f2664b = context;
this.f2665c = n0Var;
}
@Override
public void run() {
com.adcolony.sdk.j W = com.adcolony.sdk.j.W(this.f2664b.getApplicationContext(), this.f2665c);
s0.this.f2645v.put(Integer.valueOf(W.getAdc3ModuleId()), W);
}
}
public class o implements Runnable {
public o() {
}
@Override
public void run() {
if (com.adcolony.sdk.v.h().Y0().q()) {
s0.this.k();
}
}
}
public class p implements m1.a {
public p() {
}
@Override
public void a(m1 m1Var, n0 n0Var, Map<String, List<String>> map) {
s0.this.n();
}
}
public class q implements Runnable {
public q() {
}
@Override
public void run() {
s0.this.l();
}
}
public class r implements m.f {
public r() {
}
@Override
public void a() {
s0.this.S();
}
}
public class s implements AdColonyAdView.c {
public s() {
}
@Override
public void a() {
s0.this.S();
}
}
public class t implements x1<x0> {
public t(s0 s0Var) {
}
@Override
public void a(x0 x0Var) {
z0.n().e(x0Var);
}
}
public class u implements Runnable {
public final n0 f2672b;
public u(n0 n0Var) {
this.f2672b = n0Var;
}
@Override
public void run() {
s0.this.f2639p.a(new com.adcolony.sdk.o(this.f2672b));
}
}
public class w implements r0 {
public w() {
}
@Override
public void a(n0 n0Var) {
s0.this.d0(n0Var);
}
}
public class x implements r0 {
public x() {
}
@Override
public void a(n0 n0Var) {
s0.this.E(n0Var);
}
}
public class y implements r0 {
public y() {
}
@Override
public void a(n0 n0Var) {
n1 c10 = s0.this.N0().c();
s0.this.D.b(true);
if (s0.this.J) {
h0 h0Var = new h0();
h0 h0Var2 = new h0();
com.adcolony.sdk.a0.n(h0Var2, "app_version", e2.J());
com.adcolony.sdk.a0.m(h0Var, "app_bundle_info", h0Var2);
new n0("AdColony.on_update", 1, h0Var).e();
s0.this.J = false;
}
if (s0.this.K) {
new n0("AdColony.on_install", 1).e();
}
h0 a10 = n0Var.a();
if (c10 != null) {
c10.l(a10.K("app_session_id"));
}
if (com.adcolony.sdk.k.b()) {
com.adcolony.sdk.k.d();
}
Integer D = a10.D("base_download_threads");
if (D != null) {
s0.this.f2625b.d(D.intValue());
}
Integer D2 = a10.D("concurrent_requests");
if (D2 != null) {
s0.this.f2625b.g(D2.intValue());
}
Integer D3 = a10.D("threads_keep_alive_time");
if (D3 != null) {
s0.this.f2625b.h(D3.intValue());
}
double C = a10.C("thread_pool_scaling_factor");
if (!Double.isNaN(C)) {
s0.this.f2625b.c(C);
}
s0.this.f2636m.f();
s0.this.m();
}
}
public class z implements r0 {
public z() {
}
@Override
public void a(n0 n0Var) {
s0.this.V(n0Var);
}
}
public void A(com.adcolony.sdk.g gVar, boolean z10) {
boolean z11;
boolean z12;
this.C = z10;
this.f2641r = gVar;
this.f2624a = new p0();
new u0();
i1 i1Var = new i1();
this.f2633j = i1Var;
i1Var.m();
o1 o1Var = new o1();
this.f2625b = o1Var;
o1Var.b();
p1 p1Var = new p1();
this.f2626c = p1Var;
p1Var.l();
com.adcolony.sdk.b0 b0Var = new com.adcolony.sdk.b0();
this.f2627d = b0Var;
b0Var.K();
this.f2628e = new k1();
u1 u1Var = new u1();
this.f2629f = u1Var;
u1Var.m();
k0 k0Var = new k0();
this.f2632i = k0Var;
k0Var.o();
t1 t1Var = new t1();
this.f2631h = t1Var;
t1Var.k();
w1 w1Var = new w1();
this.f2630g = w1Var;
w1Var.a();
this.f2634k = new v0();
this.f2636m = new a2();
this.f2634k.c();
com.adcolony.sdk.b.g(com.adcolony.sdk.v.a(), gVar);
boolean z13 = false;
if (!z10) {
this.G = new File(this.f2631h.c() + "026ae9c9824b3e483fa6c71fa88f57ae27816141").exists();
boolean exists = new File(this.f2631h.c() + "7bf3a1e7bbd31e612eda3310c2cdb8075c43c6b5").exists();
this.H = exists;
if (this.G && exists) {
if (com.adcolony.sdk.a0.z(this.f2631h.c() + "026ae9c9824b3e483fa6c71fa88f57ae27816141").K(x.b.f203m).equals(this.f2633j.i())) {
z12 = true;
this.F = z12;
s1.b().f(new m(this));
if (this.G) {
h0 z14 = com.adcolony.sdk.a0.z(this.f2631h.c() + "026ae9c9824b3e483fa6c71fa88f57ae27816141");
this.f2643t = z14;
U(z14);
}
P(this.F);
o();
}
}
z12 = false;
this.F = z12;
s1.b().f(new m(this));
if (this.G) {
}
P(this.F);
o();
}
com.adcolony.sdk.v.g("Module.load", new w());
com.adcolony.sdk.v.g("Module.unload", new x());
com.adcolony.sdk.v.g("AdColony.on_configured", new y());
com.adcolony.sdk.v.g("AdColony.get_app_info", new z());
com.adcolony.sdk.v.g("AdColony.v4vc_reward", new a0());
com.adcolony.sdk.v.g("AdColony.zone_info", new b0());
com.adcolony.sdk.v.g("AdColony.probe_launch_server", new a());
com.adcolony.sdk.v.g("Crypto.sha1", new c(this));
com.adcolony.sdk.v.g("Crypto.crc32", new b(this));
com.adcolony.sdk.v.g("Crypto.uuid", new d(this));
com.adcolony.sdk.v.g("Device.query_advertiser_info", new e());
com.adcolony.sdk.v.g("AdColony.controller_version", new f());
com.adcolony.sdk.v.g("AdColony.provide_signals", new g());
com.adcolony.sdk.v.g("AdColony.odt_calculate", new h());
com.adcolony.sdk.v.g("AdColony.odt_cache", new i(this));
com.adcolony.sdk.v.g("AdColony.heartbeat", new j());
int x10 = e2.x(this.f2631h);
if (x10 == 1) {
z11 = true;
} else {
z11 = false;
}
this.J = z11;
if (x10 == 2) {
z13 = true;
}
this.K = z13;
e2.G(new k());
}
public void B(com.adcolony.sdk.m mVar) {
this.f2638o = mVar;
}
public AdColonyAdView B0() {
return this.f2637n;
}
public void C(com.adcolony.sdk.p pVar) {
this.f2639p = pVar;
}
public void D(com.adcolony.sdk.z zVar) {
this.f2635l = zVar;
}
public com.adcolony.sdk.z D0() {
return this.f2635l;
}
public final void E(n0 n0Var) {
H(n0Var.a().E("id"));
}
public HashMap<String, com.adcolony.sdk.i> F0() {
return this.f2640q;
}
public final void G(m1 m1Var) {
if (m1Var.f2500o) {
h0 g10 = com.adcolony.sdk.a0.g(m1Var.f2499n, "Parsing launch response");
com.adcolony.sdk.a0.n(g10, x.b.f203m, H0().i());
com.adcolony.sdk.a0.G(g10, this.f2631h.c() + "026ae9c9824b3e483fa6c71fa88f57ae27816141");
if (!c0(g10)) {
if (!this.F) {
e0.a aVar = new e0.a();
aVar.f2296a.append("Incomplete or disabled launch server response. ");
aVar.f2296a.append("Disabling AdColony until next launch.");
aVar.d(e0.f2292h);
X(true);
return;
}
return;
}
if (I(g10)) {
h0 h0Var = new h0();
com.adcolony.sdk.a0.n(h0Var, "url", this.f2646w);
com.adcolony.sdk.a0.n(h0Var, "filepath", this.f2631h.c() + "7bf3a1e7bbd31e612eda3310c2cdb8075c43c6b5");
this.f2625b.e(new m1(new n0("WebServices.download", 0, h0Var), new p()));
}
this.f2643t = g10;
return;
}
s();
}
public boolean H(int i10) {
this.f2645v.remove(Integer.valueOf(i10));
return this.f2624a.o(i10);
}
public i1 H0() {
if (this.f2633j == null) {
i1 i1Var = new i1();
this.f2633j = i1Var;
i1Var.m();
}
return this.f2633j;
}
public final boolean I(h0 h0Var) {
if (!this.F) {
return true;
}
h0 h0Var2 = this.f2643t;
if (h0Var2 != null && h0Var2.H("controller").K("sha1").equals(h0Var.H("controller").K("sha1"))) {
return false;
}
e0.a aVar = new e0.a();
aVar.f2296a.append("Controller sha1 does not match, downloading new controller.");
aVar.d(e0.f2291g);
return true;
}
public boolean J(t0 t0Var) {
this.f2645v.remove(Integer.valueOf(t0Var.getAdc3ModuleId()));
return this.f2624a.p(t0Var);
}
public k1 K0() {
if (this.f2628e == null) {
this.f2628e = new k1();
}
return this.f2628e;
}
public u1 L0() {
if (this.f2629f == null) {
u1 u1Var = new u1();
this.f2629f = u1Var;
u1Var.m();
}
return this.f2629f;
}
public k0 N0() {
if (this.f2632i == null) {
k0 k0Var = new k0();
this.f2632i = k0Var;
k0Var.o();
}
return this.f2632i;
}
public final boolean O(String str) {
Context a10 = com.adcolony.sdk.v.a();
if (a10 != null) {
File file = new File(a10.getFilesDir().getAbsolutePath() + "/adc3/7bf3a1e7bbd31e612eda3310c2cdb8075c43c6b5");
if (file.exists()) {
return e2.t(str, file);
}
return false;
}
return false;
}
public final boolean P(boolean z10) {
return Q(z10, false);
}
public p0 P0() {
if (this.f2624a == null) {
p0 p0Var = new p0();
this.f2624a = p0Var;
p0Var.d();
}
return this.f2624a;
}
public final boolean Q(boolean z10, boolean z11) {
if (!com.adcolony.sdk.v.j()) {
return false;
}
this.I = z11;
this.F = z10;
if (z10 && !z11) {
if (!l()) {
return false;
}
this.I = true;
}
k();
return true;
}
public v0 R0() {
if (this.f2634k == null) {
this.f2634k = new v0();
}
return this.f2634k;
}
public final void S() {
int i10 = this.X - 1;
this.X = i10;
if (i10 == 0) {
p();
}
}
public void T(@NonNull com.adcolony.sdk.g gVar) {
this.f2641r = gVar;
}
public eb.k T0() {
return this.P;
}
public final void U(h0 h0Var) {
if (!com.adcolony.sdk.l.I) {
h0 H = h0Var.H("logging");
k0.f2402h = H.b("send_level", 1);
k0.f2400f = H.A("log_private");
k0.f2401g = H.b("print_level", 3);
this.f2632i.n(H.F("modules"));
this.f2632i.p(H.G("included_fields"));
}
h0 H2 = h0Var.H("metadata");
H0().v(H2);
Y0().b(H2.E("session_timeout"));
f2623a0 = h0Var.K("pie");
this.f2649z = h0Var.H("controller").K("version");
this.R = H2.c("signals_timeout", this.R);
this.S = H2.c("calculate_odt_timeout", this.S);
this.T = H2.l("async_odt_query", this.T);
this.U = H2.c("ad_request_timeout", this.U);
this.V = H2.c("controller_heartbeat_interval", this.V);
this.W = H2.c("controller_heartbeat_timeout", this.W);
this.Y = H2.l("enable_compression", false);
s1.b().c(H2.I("odt_config"), new t(this));
}
public final void V(n0 n0Var) {
h0 d10 = this.f2641r.d();
com.adcolony.sdk.a0.n(d10, "app_id", this.f2641r.b());
h0 h0Var = new h0();
com.adcolony.sdk.a0.m(h0Var, d5.b.f30582f0, d10);
n0Var.b(h0Var).e();
}
public com.adcolony.sdk.g V0() {
if (this.f2641r == null) {
this.f2641r = new com.adcolony.sdk.g();
}
return this.f2641r;
}
public String W0() {
return f2623a0;
}
public void X(boolean z10) {
this.D.b(false);
this.C = z10;
}
public com.adcolony.sdk.p X0() {
return this.f2639p;
}
public p1 Y0() {
if (this.f2626c == null) {
p1 p1Var = new p1();
this.f2626c = p1Var;
p1Var.l();
}
return this.f2626c;
}
public com.adcolony.sdk.b0 Z() {
if (this.f2627d == null) {
com.adcolony.sdk.b0 b0Var = new com.adcolony.sdk.b0();
this.f2627d = b0Var;
b0Var.K();
}
return this.f2627d;
}
public long Z0() {
return this.R;
}
public w1 a() {
if (this.f2630g == null) {
w1 w1Var = new w1();
this.f2630g = w1Var;
w1Var.a();
}
return this.f2630g;
}
public t1 a1() {
if (this.f2631h == null) {
t1 t1Var = new t1();
this.f2631h = t1Var;
t1Var.k();
}
return this.f2631h;
}
public HashMap<Integer, c1> b() {
return this.f2645v;
}
public void b0(boolean z10) {
this.B = z10;
}
public HashMap<String, com.adcolony.sdk.s> c() {
return this.f2644u;
}
public final boolean c0(h0 h0Var) {
if (h0Var == null) {
return false;
}
try {
try {
h0 H = h0Var.H("controller");
this.f2646w = H.K("url");
this.f2647x = H.K("sha1");
this.f2648y = h0Var.K("status");
U(h0Var);
if (com.adcolony.sdk.k.b()) {
com.adcolony.sdk.k.d();
}
} catch (Exception unused) {
new File(this.f2631h.c() + "026ae9c9824b3e483fa6c71fa88f57ae27816141").delete();
}
} catch (Exception unused2) {
}
if (this.f2648y.equals("disable") && !com.adcolony.sdk.l.I) {
try {
new File(this.f2631h.c() + "7bf3a1e7bbd31e612eda3310c2cdb8075c43c6b5").delete();
} catch (Exception unused3) {
}
e0.a aVar = new e0.a();
aVar.f2296a.append("Launch server response with disabled status. Disabling AdColony ");
aVar.f2296a.append("until next launch.");
aVar.d(e0.f2291g);
com.adcolony.sdk.b.C();
return false;
}
if ((this.f2646w.equals("") || this.f2648y.equals("")) && !com.adcolony.sdk.l.I) {
e0.a aVar2 = new e0.a();
aVar2.f2296a.append("Missing controller status or URL. Disabling AdColony until next ");
aVar2.f2296a.append("launch.");
aVar2.d(e0.f2293i);
return false;
}
return true;
}
public boolean d() {
if (this.f2641r != null) {
return true;
}
return false;
}
public final boolean d0(n0 n0Var) {
Context a10 = com.adcolony.sdk.v.a();
if (a10 == null) {
return false;
}
try {
int E = n0Var.a().E("id");
if (E > 0) {
H(E);
}
e2.G(new n(a10, n0Var));
return true;
} catch (RuntimeException e10) {
e0.a aVar = new e0.a();
aVar.f2296a.append(e10.toString() + ": during WebView initialization.");
aVar.f2296a.append(" Disabling AdColony.");
aVar.d(e0.f2292h);
com.adcolony.sdk.b.C();
return false;
}
}
public boolean e() {
return this.B;
}
public boolean f() {
return this.C;
}
public boolean g() {
return this.T;
}
public long g0() {
return this.U;
}
public boolean h() {
return this.Y;
}
public boolean i() {
return this.D.c();
}
public void i0(n0 n0Var) {
this.f2642s = n0Var;
}
public boolean j() {
return this.A;
}
public final void k() {
new Thread(new l()).start();
}
public void k0(boolean z10) {
this.E = z10;
}
public final boolean l() {
this.f2624a.d();
return true;
}
public h0 l0() {
return this.Q;
}
public final void m() {
h0 h0Var = new h0();
com.adcolony.sdk.a0.n(h0Var, "type", "AdColony.on_configuration_completed");
f0 f0Var = new f0();
Iterator<String> it = c().keySet().iterator();
while (it.hasNext()) {
f0Var.g(it.next());
}
h0 h0Var2 = new h0();
com.adcolony.sdk.a0.l(h0Var2, e6.a.f30872c, f0Var);
com.adcolony.sdk.a0.m(h0Var, "message", h0Var2);
new n0("CustomMessage.controller_send", 0, h0Var).e();
}
public final void n() {
if (!O(this.f2647x) && !com.adcolony.sdk.l.I) {
e0.a aVar = new e0.a();
aVar.f2296a.append("Downloaded controller sha1 does not match, retrying.");
aVar.d(e0.f2290f);
s();
return;
}
if (!this.F && !this.I) {
e2.G(new q());
}
if (this.F && this.I) {
q();
}
}
public final void o() {
Application application;
Context a10 = com.adcolony.sdk.v.a();
if (a10 != null && this.O == null) {
this.O = new v();
if (a10 instanceof Application) {
application = (Application) a10;
} else {
application = ((Activity) a10).getApplication();
}
application.registerActivityLifecycleCallbacks(this.O);
}
}
public void o0(boolean z10) {
this.A = z10;
}
public void p() {
this.D.b(false);
this.f2627d.p();
Object o10 = this.f2641r.o("force_ad_id");
if ((o10 instanceof String) && !((String) o10).isEmpty()) {
r();
}
com.adcolony.sdk.b.g(com.adcolony.sdk.v.a(), this.f2641r);
t();
this.f2644u.clear();
this.f2624a.d();
}
public boolean p0(n0 n0Var) {
if (this.f2639p != null) {
e2.G(new u(n0Var));
return true;
}
return false;
}
public void q() {
this.X = 0;
for (com.adcolony.sdk.m mVar : this.f2627d.E().values()) {
if (mVar.J()) {
this.X++;
mVar.f(new r());
}
}
for (AdColonyAdView adColonyAdView : this.f2627d.w().values()) {
this.X++;
adColonyAdView.setOnDestroyListenerOrCall(new s());
}
if (this.X == 0) {
p();
}
}
public String q0() {
return this.f2649z;
}
public void r() {
synchronized (this.f2627d.E()) {
Iterator<com.adcolony.sdk.m> it = this.f2627d.E().values().iterator();
while (it.hasNext()) {
it.next().M();
}
this.f2627d.E().clear();
}
}
public final void r0(n0 n0Var) {
com.adcolony.sdk.s sVar;
if (this.C) {
return;
}
String K = n0Var.a().K("zone_id");
if (this.f2644u.containsKey(K)) {
sVar = this.f2644u.get(K);
} else {
com.adcolony.sdk.s sVar2 = new com.adcolony.sdk.s(K);
this.f2644u.put(K, sVar2);
sVar = sVar2;
}
sVar.e(n0Var);
}
public final void s() {
if (com.adcolony.sdk.v.h().Y0().q()) {
int i10 = this.M + 1;
this.M = i10;
this.N = Math.min(this.N * i10, 120);
e2.r(new o(), this.N * 1000);
return;
}
e0.a aVar = new e0.a();
aVar.f2296a.append("Max launch server download attempts hit, or AdColony is no longer");
aVar.f2296a.append(" active.");
aVar.d(e0.f2291g);
}
public void t() {
H(1);
Iterator<c1> it = this.f2645v.values().iterator();
while (it.hasNext()) {
this.f2624a.p(it.next());
}
this.f2645v.clear();
}
public long t0() {
return this.S;
}
public long v0() {
return this.V;
}
public void w() {
this.f2627d.c();
p();
}
public void x(long j10) {
this.D.a(j10);
}
public long x0() {
return this.W;
}
public void y(AdColonyAdView adColonyAdView) {
this.f2637n = adColonyAdView;
}
public void z(com.adcolony.sdk.g gVar) {
this.D.b(false);
this.f2627d.p();
r();
com.adcolony.sdk.b.g(com.adcolony.sdk.v.a(), gVar);
t();
this.f2644u.clear();
this.f2641r = gVar;
this.f2624a.d();
Q(true, true);
}
public com.adcolony.sdk.m z0() {
return this.f2638o;
}
public class v implements Application.ActivityLifecycleCallbacks {
public final Set<Integer> f2674b = new HashSet();
public v() {
}
@Override
public void onActivityCreated(@NonNull Activity activity, Bundle bundle) {
if (!s0.this.f2626c.q()) {
s0.this.f2626c.k(true);
}
com.adcolony.sdk.v.c(activity);
}
@Override
public void onActivityPaused(@NonNull Activity activity) {
com.adcolony.sdk.v.f2785d = false;
s0.this.f2626c.m(false);
}
@Override
public void onActivityResumed(@NonNull Activity activity) {
ScheduledExecutorService scheduledExecutorService;
this.f2674b.add(Integer.valueOf(activity.hashCode()));
com.adcolony.sdk.v.f2785d = true;
com.adcolony.sdk.v.f2782a = activity;
n1 c10 = s0.this.N0().c();
Context context = com.adcolony.sdk.v.f2782a;
if (context != null && s0.this.f2626c.o() && (context instanceof com.adcolony.sdk.w) && !((com.adcolony.sdk.w) context).f2798e) {
return;
}
com.adcolony.sdk.v.f2782a = activity;
n0 n0Var = s0.this.f2642s;
if (n0Var != null) {
if (!Objects.equals(n0Var.a().K("m_origin"), "")) {
n0 n0Var2 = s0.this.f2642s;
n0Var2.b(n0Var2.a()).e();
}
s0.this.f2642s = null;
}
s0 s0Var = s0.this;
s0Var.B = false;
s0Var.f2626c.r(false);
s0 s0Var2 = s0.this;
if (s0Var2.E && !s0Var2.f2626c.q()) {
s0.this.f2626c.k(true);
}
s0.this.f2626c.m(true);
s0.this.f2628e.i();
if (c10 == null || (scheduledExecutorService = c10.f2506b) == null || scheduledExecutorService.isShutdown() || c10.f2506b.isTerminated()) {
com.adcolony.sdk.b.g(activity, com.adcolony.sdk.v.h().f2641r);
}
}
@Override
public void onActivityStarted(@NonNull Activity activity) {
s0.this.f2626c.n(true);
}
@Override
public void onActivityStopped(@NonNull Activity activity) {
this.f2674b.remove(Integer.valueOf(activity.hashCode()));
if (this.f2674b.isEmpty()) {
s0.this.f2626c.n(false);
}
}
@Override
public void onActivityDestroyed(@NonNull Activity activity) {
}
@Override
public void onActivitySaveInstanceState(@NonNull Activity activity, Bundle bundle) {
}
}
}