Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.applovin.impl.mediation.debugger.ui.b;
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.mediation.debugger.ui.b.b;
import com.applovin.impl.mediation.debugger.ui.d.c;
import com.applovin.impl.mediation.debugger.ui.d.d;
import com.applovin.impl.sdk.o;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.sdk.utils.Utils;
import com.applovin.impl.sdk.utils.b;
import com.applovin.mediation.MaxDebuggerAdUnitsListActivity;
import com.applovin.mediation.MaxDebuggerDetailActivity;
import com.applovin.mediation.MaxDebuggerTestLiveNetworkActivity;
import com.applovin.mediation.MaxDebuggerTestModeNetworkActivity;
import com.applovin.sdk.R;
public class a extends com.applovin.impl.mediation.debugger.ui.a {
private b f1240a;
private DataSetObserver b;
private FrameLayout c;
private ListView d;
private com.applovin.impl.adview.a e;
@Override
protected o getSdk() {
b bVar = this.f1240a;
if (bVar != null) {
return bVar.c();
}
return null;
}
@Override
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);
this.d = (ListView) findViewById(R.id.listView);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.mediation_debugger_activity_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem menuItem) {
if (R.id.action_share == menuItem.getItemId()) {
a();
return true;
}
return super.onOptionsItemSelected(menuItem);
}
@Override
protected void onStart() {
super.onStart();
this.d.setAdapter((ListAdapter) this.f1240a);
b bVar = this.f1240a;
if (bVar == null || bVar.a()) {
return;
}
b();
}
@Override
public void onDestroy() {
super.onDestroy();
b bVar = this.f1240a;
if (bVar != null) {
bVar.unregisterDataSetObserver(this.b);
this.f1240a.a((d.a) null);
}
}
public void setListAdapter(b bVar, final com.applovin.impl.sdk.a aVar) {
DataSetObserver dataSetObserver;
b bVar2 = this.f1240a;
if (bVar2 != null && (dataSetObserver = this.b) != null) {
bVar2.unregisterDataSetObserver(dataSetObserver);
}
this.f1240a = bVar;
this.b = new DataSetObserver() {
@Override
public void onChanged() {
a.this.c();
a aVar2 = a.this;
aVar2.a((Context) aVar2);
}
};
a((Context) this);
this.f1240a.registerDataSetObserver(this.b);
this.f1240a.a(new d.a() {
@Override
public void onClick(com.applovin.impl.mediation.debugger.ui.d.a aVar2, final c cVar) {
int a2 = aVar2.a();
if (a2 == b.d.APP_INFO.ordinal()) {
Utils.showAlert(cVar.l(), cVar.m(), a.this);
return;
}
if (a2 == b.d.MAX.ordinal()) {
o c = a.this.f1240a.c();
if (c.af().b()) {
if (aVar2.b() == b.c.PRIVACY_POLICY_URL.ordinal()) {
if (c.af().d() != null) {
Utils.openUri(c.af().d(), o.z(), c);
return;
} else {
Utils.showAlert("Missing Privacy Policy URL", "You cannot use the AppLovin SDK's consent flow without defining a Privacy Policy URL", a.this);
return;
}
}
if (aVar2.b() == b.c.TERMS_OF_SERVICE_URL.ordinal()) {
if (c.af().e() != null) {
Utils.openUri(c.af().e(), o.z(), c);
return;
}
return;
}
}
Utils.showAlert(cVar.l(), cVar.m(), a.this);
return;
}
if (a2 == b.d.ADS.ordinal()) {
if (aVar2.b() == b.a.AD_UNITS.ordinal()) {
if (a.this.f1240a.d().size() > 0) {
com.applovin.impl.sdk.utils.b.a(a.this, MaxDebuggerAdUnitsListActivity.class, aVar, new b.a<MaxDebuggerAdUnitsListActivity>() {
@Override
public void onActivityCreated(MaxDebuggerAdUnitsListActivity maxDebuggerAdUnitsListActivity) {
maxDebuggerAdUnitsListActivity.initialize(a.this.f1240a.d(), false, a.this.f1240a.c());
}
});
return;
} else {
Utils.showAlert("No live ad units", "Please setup or enable your MAX ad units on https://applovin.com.", a.this);
return;
}
}
if (aVar2.b() == b.a.SELECT_LIVE_NETWORKS.ordinal()) {
if (a.this.f1240a.i().size() > 0 || a.this.f1240a.j().size() > 0) {
if (a.this.f1240a.c().aw().a()) {
Utils.showAlert("Restart Required", cVar.m(), a.this);
return;
} else {
com.applovin.impl.sdk.utils.b.a(a.this, MaxDebuggerTestLiveNetworkActivity.class, aVar, new b.a<MaxDebuggerTestLiveNetworkActivity>() {
@Override
public void onActivityCreated(MaxDebuggerTestLiveNetworkActivity maxDebuggerTestLiveNetworkActivity) {
maxDebuggerTestLiveNetworkActivity.initialize(a.this.f1240a.i(), a.this.f1240a.j(), a.this.f1240a.c());
}
});
return;
}
}
Utils.showAlert("Complete Integrations", "Please complete integrations in order to access this.", a.this);
return;
}
if (aVar2.b() == b.a.SELECT_TEST_MODE_NETWORKS.ordinal()) {
if (a.this.f1240a.c().aw().a()) {
if (a.this.f1240a.k().size() > 0) {
com.applovin.impl.sdk.utils.b.a(a.this, MaxDebuggerTestModeNetworkActivity.class, aVar, new b.a<MaxDebuggerTestModeNetworkActivity>() {
@Override
public void onActivityCreated(MaxDebuggerTestModeNetworkActivity maxDebuggerTestModeNetworkActivity) {
maxDebuggerTestModeNetworkActivity.initialize(a.this.f1240a.k(), a.this.f1240a.c());
}
});
return;
} else {
Utils.showAlert("Complete Integrations", "Please complete integrations in order to access this.", a.this);
return;
}
}
a.this.getSdk().aw().d();
Utils.showAlert("Restart Required", cVar.m(), a.this);
return;
}
if (aVar2.b() == b.a.INITIALIZATION_AD_UNITS.ordinal()) {
com.applovin.impl.sdk.utils.b.a(a.this, MaxDebuggerAdUnitsListActivity.class, aVar, new b.a<MaxDebuggerAdUnitsListActivity>() {
@Override
public void onActivityCreated(MaxDebuggerAdUnitsListActivity maxDebuggerAdUnitsListActivity) {
maxDebuggerAdUnitsListActivity.initialize(a.this.f1240a.f(), true, a.this.f1240a.c());
}
});
return;
}
return;
}
if ((a2 == b.d.INCOMPLETE_NETWORKS.ordinal() || a2 == b.d.COMPLETED_NETWORKS.ordinal()) && (cVar instanceof com.applovin.impl.mediation.debugger.ui.b.a.a)) {
com.applovin.impl.sdk.utils.b.a(a.this, MaxDebuggerDetailActivity.class, aVar, new b.a<MaxDebuggerDetailActivity>() {
@Override
public void onActivityCreated(MaxDebuggerDetailActivity maxDebuggerDetailActivity) {
maxDebuggerDetailActivity.initialize(((com.applovin.impl.mediation.debugger.ui.b.a.a) cVar).f());
}
});
}
}
});
}
private void a() {
String l = this.f1240a.l();
if (TextUtils.isEmpty(l)) {
return;
}
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.TEXT", l);
intent.putExtra("android.intent.extra.TITLE", "Mediation Debugger logs");
intent.putExtra("android.intent.extra.SUBJECT", "MAX Mediation Debugger logs");
startActivity(Intent.createChooser(intent, null));
}
private void b() {
c();
com.applovin.impl.adview.a aVar = new com.applovin.impl.adview.a(this, 50, android.R.attr.progressBarStyleLarge);
this.e = aVar;
aVar.setColor(-3355444);
this.c.addView(this.e, new FrameLayout.LayoutParams(-1, -1, 17));
this.c.bringChildToFront(this.e);
this.e.a();
}
public void c() {
com.applovin.impl.adview.a aVar = this.e;
if (aVar != null) {
aVar.b();
this.c.removeView(this.e);
this.e = null;
}
}
public void a(final Context context) {
if (!StringUtils.isValidString(this.f1240a.h()) || this.f1240a.b()) {
return;
}
this.f1240a.a(true);
runOnUiThread(new Runnable() {
@Override
public void run() {
Utils.showAlert(a.this.f1240a.g(), a.this.f1240a.h(), context);
}
});
}
}