- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
365 lines
13 KiB
Java
365 lines
13 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.database.DataSetObserver;
|
|
import android.os.Bundle;
|
|
import android.text.TextUtils;
|
|
import android.view.Menu;
|
|
import android.view.MenuItem;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.ListAdapter;
|
|
import android.widget.ListView;
|
|
import com.applovin.impl.ec;
|
|
import com.applovin.impl.i4;
|
|
import com.applovin.impl.r;
|
|
import com.applovin.impl.sdk.utils.StringUtils;
|
|
import com.applovin.impl.te;
|
|
import com.applovin.mediation.MaxDebuggerAdUnitsListActivity;
|
|
import com.applovin.mediation.MaxDebuggerDetailActivity;
|
|
import com.applovin.mediation.MaxDebuggerTcfConsentStatusesListActivity;
|
|
import com.applovin.mediation.MaxDebuggerTcfInfoListActivity;
|
|
import com.applovin.mediation.MaxDebuggerTestLiveNetworkActivity;
|
|
import com.applovin.mediation.MaxDebuggerTestModeNetworkActivity;
|
|
import com.applovin.mediation.MaxDebuggerUnifiedFlowActivity;
|
|
import com.applovin.sdk.R;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class re extends se {
|
|
private te a;
|
|
private DataSetObserver b;
|
|
private FrameLayout c;
|
|
private ListView d;
|
|
private o f;
|
|
|
|
@Override // android.app.Activity
|
|
public boolean onOptionsItemSelected(MenuItem menuItem) {
|
|
if (R.id.action_share != menuItem.getItemId()) {
|
|
return super.onOptionsItemSelected(menuItem);
|
|
}
|
|
b();
|
|
return true;
|
|
}
|
|
|
|
@Override // com.applovin.impl.se
|
|
public com.applovin.impl.sdk.j getSdk() {
|
|
te teVar = this.a;
|
|
if (teVar != null) {
|
|
return teVar.t();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.applovin.impl.se, android.app.Activity
|
|
public void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
setTitle("MAX Mediation Debugger");
|
|
setContentView(R.layout.mediation_debugger_list_view);
|
|
this.c = (FrameLayout) findViewById(android.R.id.content);
|
|
ListView listView = (ListView) findViewById(R.id.listView);
|
|
this.d = listView;
|
|
listView.setAdapter((ListAdapter) this.a);
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
|
getMenuInflater().inflate(R.menu.mediation_debugger_activity_menu, menu);
|
|
return true;
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onStart() {
|
|
super.onStart();
|
|
te teVar = this.a;
|
|
if (teVar == null || teVar.x()) {
|
|
return;
|
|
}
|
|
c();
|
|
}
|
|
|
|
@Override // com.applovin.impl.se, android.app.Activity
|
|
public void onDestroy() {
|
|
super.onDestroy();
|
|
te teVar = this.a;
|
|
if (teVar != null) {
|
|
teVar.unregisterDataSetObserver(this.b);
|
|
this.a.a((ec.a) null);
|
|
}
|
|
}
|
|
|
|
public void setListAdapter(te teVar, q qVar) {
|
|
DataSetObserver dataSetObserver;
|
|
te teVar2 = this.a;
|
|
if (teVar2 != null && (dataSetObserver = this.b) != null) {
|
|
teVar2.unregisterDataSetObserver(dataSetObserver);
|
|
}
|
|
this.a = teVar;
|
|
this.b = new a();
|
|
b((Context) this);
|
|
this.a.registerDataSetObserver(this.b);
|
|
this.a.a(new b(qVar));
|
|
}
|
|
|
|
public class a extends DataSetObserver {
|
|
public a() {
|
|
}
|
|
|
|
@Override // android.database.DataSetObserver
|
|
public void onChanged() {
|
|
re.this.a();
|
|
re reVar = re.this;
|
|
reVar.b((Context) reVar);
|
|
}
|
|
}
|
|
|
|
public class b implements ec.a {
|
|
final /* synthetic */ q a;
|
|
|
|
public b(q qVar) {
|
|
this.a = qVar;
|
|
}
|
|
|
|
@Override // com.applovin.impl.ec.a
|
|
public void a(lb lbVar, dc dcVar) {
|
|
int b = lbVar.b();
|
|
if (b == te.f.APP_INFO.ordinal()) {
|
|
yp.a(dcVar.c(), dcVar.b(), re.this);
|
|
return;
|
|
}
|
|
if (b == te.f.MAX.ordinal()) {
|
|
com.applovin.impl.sdk.j t = re.this.a.t();
|
|
if (t.u().k()) {
|
|
int a2 = lbVar.a();
|
|
if (t.u().e() == i4.a.UNIFIED) {
|
|
if (re.this.a.a(dcVar)) {
|
|
r.a(re.this, MaxDebuggerUnifiedFlowActivity.class, this.a, new a(t));
|
|
return;
|
|
}
|
|
} else {
|
|
int i = a2 + 1;
|
|
if (i == te.d.PRIVACY_POLICY_URL.ordinal()) {
|
|
if (t.u().h() != null) {
|
|
tp.a(t.u().h(), com.applovin.impl.sdk.j.l(), t);
|
|
return;
|
|
} else {
|
|
yp.a("Missing Privacy Policy URL", "You cannot use the AppLovin SDK's consent flow without defining a Privacy Policy URL", re.this);
|
|
return;
|
|
}
|
|
}
|
|
if (i == te.d.TERMS_OF_SERVICE_URL.ordinal()) {
|
|
if (t.u().i() != null) {
|
|
tp.a(t.u().i(), com.applovin.impl.sdk.j.l(), t);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
yp.a(dcVar.c(), dcVar.b(), re.this);
|
|
return;
|
|
}
|
|
if (b == te.f.PRIVACY.ordinal()) {
|
|
if (lbVar.a() == te.e.CMP.ordinal()) {
|
|
if (StringUtils.isValidString(re.this.a.t().k0().k())) {
|
|
r.a(re.this, MaxDebuggerTcfInfoListActivity.class, this.a, new C0035b());
|
|
return;
|
|
} else {
|
|
yp.a(dcVar.c(), dcVar.b(), re.this);
|
|
return;
|
|
}
|
|
}
|
|
if (lbVar.a() == te.e.NETWORK_CONSENT_STATUSES.ordinal()) {
|
|
r.a(re.this, MaxDebuggerTcfConsentStatusesListActivity.class, this.a, new c());
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (b == te.f.ADS.ordinal()) {
|
|
if (lbVar.a() == te.b.AD_UNITS.ordinal()) {
|
|
if (re.this.a.e().size() > 0) {
|
|
r.a(re.this, MaxDebuggerAdUnitsListActivity.class, this.a, new d());
|
|
return;
|
|
} else {
|
|
yp.a("No live ad units", "Please setup or enable your MAX ad units on https://applovin.com.", re.this);
|
|
return;
|
|
}
|
|
}
|
|
if (lbVar.a() == te.b.SELECT_LIVE_NETWORKS.ordinal()) {
|
|
if (re.this.a.j().size() > 0 || re.this.a.w().size() > 0) {
|
|
if (re.this.a.t().l0().c()) {
|
|
yp.a("Restart Required", dcVar.b(), re.this);
|
|
return;
|
|
} else {
|
|
r.a(re.this, MaxDebuggerTestLiveNetworkActivity.class, this.a, new e());
|
|
return;
|
|
}
|
|
}
|
|
yp.a("Complete Integrations", "Please complete integrations in order to access this.", re.this);
|
|
return;
|
|
}
|
|
if (lbVar.a() == te.b.SELECT_TEST_MODE_NETWORKS.ordinal()) {
|
|
if (re.this.a.t().l0().c()) {
|
|
if (re.this.a.v().size() > 0) {
|
|
r.a(re.this, MaxDebuggerTestModeNetworkActivity.class, this.a, new f());
|
|
return;
|
|
} else {
|
|
yp.a("Complete Integrations", "Please complete integrations in order to access this.", re.this);
|
|
return;
|
|
}
|
|
}
|
|
re.this.getSdk().l0().a();
|
|
yp.a("Restart Required", dcVar.b(), re.this);
|
|
return;
|
|
}
|
|
if (lbVar.a() == te.b.INITIALIZATION_AD_UNITS.ordinal()) {
|
|
r.a(re.this, MaxDebuggerAdUnitsListActivity.class, this.a, new g());
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if ((b == te.f.INCOMPLETE_NETWORKS.ordinal() || b == te.f.COMPLETED_NETWORKS.ordinal()) && (dcVar instanceof cg)) {
|
|
r.a(re.this, MaxDebuggerDetailActivity.class, this.a, new h(dcVar));
|
|
}
|
|
}
|
|
|
|
public class a implements r.b {
|
|
final /* synthetic */ com.applovin.impl.sdk.j a;
|
|
|
|
public a(com.applovin.impl.sdk.j jVar) {
|
|
this.a = jVar;
|
|
}
|
|
|
|
@Override // com.applovin.impl.r.b
|
|
public void a(MaxDebuggerUnifiedFlowActivity maxDebuggerUnifiedFlowActivity) {
|
|
maxDebuggerUnifiedFlowActivity.initialize(this.a);
|
|
}
|
|
}
|
|
|
|
/* renamed from: com.applovin.impl.re$b$b, reason: collision with other inner class name */
|
|
public class C0035b implements r.b {
|
|
public C0035b() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.r.b
|
|
public void a(MaxDebuggerTcfInfoListActivity maxDebuggerTcfInfoListActivity) {
|
|
maxDebuggerTcfInfoListActivity.initialize(re.this.a.t());
|
|
}
|
|
}
|
|
|
|
public class c implements r.b {
|
|
public c() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.r.b
|
|
public void a(MaxDebuggerTcfConsentStatusesListActivity maxDebuggerTcfConsentStatusesListActivity) {
|
|
maxDebuggerTcfConsentStatusesListActivity.initialize(re.this.a.t());
|
|
}
|
|
}
|
|
|
|
public class d implements r.b {
|
|
public d() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.r.b
|
|
public void a(MaxDebuggerAdUnitsListActivity maxDebuggerAdUnitsListActivity) {
|
|
maxDebuggerAdUnitsListActivity.initialize(re.this.a.e(), false, re.this.a.t());
|
|
}
|
|
}
|
|
|
|
public class e implements r.b {
|
|
public e() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.r.b
|
|
public void a(MaxDebuggerTestLiveNetworkActivity maxDebuggerTestLiveNetworkActivity) {
|
|
maxDebuggerTestLiveNetworkActivity.initialize(re.this.a.j(), re.this.a.w(), re.this.a.t());
|
|
}
|
|
}
|
|
|
|
public class f implements r.b {
|
|
public f() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.r.b
|
|
public void a(MaxDebuggerTestModeNetworkActivity maxDebuggerTestModeNetworkActivity) {
|
|
maxDebuggerTestModeNetworkActivity.initialize(re.this.a.v(), re.this.a.t());
|
|
}
|
|
}
|
|
|
|
public class g implements r.b {
|
|
public g() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.r.b
|
|
public void a(MaxDebuggerAdUnitsListActivity maxDebuggerAdUnitsListActivity) {
|
|
maxDebuggerAdUnitsListActivity.initialize(re.this.a.n(), true, re.this.a.t());
|
|
}
|
|
}
|
|
|
|
public class h implements r.b {
|
|
final /* synthetic */ dc a;
|
|
|
|
public h(dc dcVar) {
|
|
this.a = dcVar;
|
|
}
|
|
|
|
@Override // com.applovin.impl.r.b
|
|
public void a(MaxDebuggerDetailActivity maxDebuggerDetailActivity) {
|
|
maxDebuggerDetailActivity.initialize(((cg) this.a).r());
|
|
}
|
|
}
|
|
}
|
|
|
|
private void c() {
|
|
a();
|
|
o oVar = new o(this, 50, android.R.attr.progressBarStyleLarge);
|
|
this.f = oVar;
|
|
oVar.setColor(-3355444);
|
|
this.c.addView(this.f, new FrameLayout.LayoutParams(-1, -1, 17));
|
|
this.c.bringChildToFront(this.f);
|
|
this.f.a();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void b(final Context context) {
|
|
if (!StringUtils.isValidString(this.a.g()) || this.a.d()) {
|
|
return;
|
|
}
|
|
this.a.b(true);
|
|
runOnUiThread(new Runnable() { // from class: com.applovin.impl.re$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
re.this.a(context);
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void a(Context context) {
|
|
yp.a(this.a.h(), this.a.g(), context);
|
|
}
|
|
|
|
private void b() {
|
|
String o = this.a.o();
|
|
if (TextUtils.isEmpty(o)) {
|
|
return;
|
|
}
|
|
Intent intent = new Intent("android.intent.action.SEND");
|
|
intent.setType("text/plain");
|
|
intent.putExtra("android.intent.extra.TEXT", o);
|
|
intent.putExtra("android.intent.extra.TITLE", "Mediation Debugger logs");
|
|
intent.putExtra("android.intent.extra.SUBJECT", "MAX Mediation Debugger logs");
|
|
startActivity(Intent.createChooser(intent, null));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void a() {
|
|
o oVar = this.f;
|
|
if (oVar != null) {
|
|
oVar.b();
|
|
this.c.removeView(this.f);
|
|
this.f = null;
|
|
}
|
|
}
|
|
}
|