package com.applovin.impl; import android.content.Context; import android.os.Bundle; import android.widget.ListAdapter; import android.widget.ListView; import androidx.core.internal.view.SupportMenu; import androidx.core.view.ViewCompat; import com.applovin.impl.dc; import com.applovin.impl.ec; import com.applovin.impl.rn; import com.applovin.sdk.R; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /* loaded from: classes.dex */ public abstract class n3 extends se { private com.applovin.impl.sdk.j a; private ec b; public enum c { MISSING_TC_NETWORKS, MISSING_AC_NETWORKS, LISTED_TC_NETWORKS, LISTED_AC_NETWORKS, OTHER_NETWORKS } @Override // com.applovin.impl.se public com.applovin.impl.sdk.j getSdk() { return this.a; } public class a extends ec { final /* synthetic */ List f; final /* synthetic */ List g; final /* synthetic */ List h; final /* synthetic */ List i; final /* synthetic */ List j; @Override // com.applovin.impl.ec public int b() { return c.values().length; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public a(Context context, List list, List list2, List list3, List list4, List list5) { super(context); this.f = list; this.g = list2; this.h = list3; this.i = list4; this.j = list5; } @Override // com.applovin.impl.ec public int d(int i) { if (i == c.MISSING_TC_NETWORKS.ordinal()) { return this.f.size(); } if (i == c.MISSING_AC_NETWORKS.ordinal()) { return this.g.size(); } if (i == c.LISTED_TC_NETWORKS.ordinal()) { return this.h.size(); } if (i == c.LISTED_AC_NETWORKS.ordinal()) { return this.i.size(); } return this.j.size(); } @Override // com.applovin.impl.ec public dc e(int i) { if (i == c.MISSING_TC_NETWORKS.ordinal()) { return new fj("MISSING TCF VENDORS (TC STRING)"); } if (i == c.MISSING_AC_NETWORKS.ordinal()) { return new fj("MISSING ATP NETWORKS (AC STRING)"); } if (i == c.LISTED_TC_NETWORKS.ordinal()) { return new fj("LISTED TCF VENDORS (TC STRING)"); } if (i == c.LISTED_AC_NETWORKS.ordinal()) { return new fj("LISTED ATP NETWORKS (AC STRING)"); } return new fj("NON-CONFIGURABLE NETWORKS"); } @Override // com.applovin.impl.ec public List c(int i) { List list; boolean z = true; if (i == c.MISSING_TC_NETWORKS.ordinal()) { list = this.f; } else if (i == c.MISSING_AC_NETWORKS.ordinal()) { list = this.g; } else { z = false; if (i == c.LISTED_TC_NETWORKS.ordinal()) { list = this.h; } else { list = i == c.LISTED_AC_NETWORKS.ordinal() ? this.i : this.j; } } ArrayList arrayList = new ArrayList(list.size()); Iterator it = list.iterator(); while (it.hasNext()) { arrayList.add(n3.this.a((rn) it.next(), z)); } return arrayList; } } public void initialize(List list, List list2, List list3, List list4, List list5, com.applovin.impl.sdk.j jVar) { this.a = jVar; a aVar = new a(this, list, list2, list3, list4, list5); this.b = aVar; aVar.a(new b()); this.b.notifyDataSetChanged(); } public class b implements ec.a { public b() { } @Override // com.applovin.impl.ec.a public void a(lb lbVar, dc dcVar) { yp.a(dcVar.c(), dcVar.b(), n3.this); } } @Override // com.applovin.impl.se, android.app.Activity public void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.mediation_debugger_list_view); setTitle("Configured CMP Networks"); ((ListView) findViewById(R.id.listView)).setAdapter((ListAdapter) this.b); } /* JADX INFO: Access modifiers changed from: private */ public dc a(rn rnVar, boolean z) { dc.b a2 = dc.a(); boolean b2 = this.a.k0().b(); rn.a f = rnVar.f(); rn.a aVar = rn.a.TCF_VENDOR; if (f != aVar && (rnVar.f() != rn.a.ATP_NETWORK || !b2)) { a2.d(rnVar.b()); } else { String c2 = rnVar.c(); String str = rnVar.f() == aVar ? "IAB Vendor ID: " : "Google ATP ID: "; a2.d(c2).d(z ? SupportMenu.CATEGORY_MASK : ViewCompat.MEASURED_STATE_MASK).b(c2).a(str + rnVar.d()).a(true); } return a2.a(); } }