- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
105 lines
4.2 KiB
Java
105 lines
4.2 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Color;
|
|
import android.text.SpannableString;
|
|
import android.text.SpannableStringBuilder;
|
|
import android.text.SpannedString;
|
|
import android.text.TextUtils;
|
|
import androidx.core.internal.view.SupportMenu;
|
|
import androidx.core.view.ViewCompat;
|
|
import com.applovin.impl.dc;
|
|
import com.applovin.impl.ke;
|
|
import com.applovin.impl.sdk.utils.StringUtils;
|
|
import com.applovin.sdk.R;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class cg extends dc {
|
|
private final ke n;
|
|
private final Context o;
|
|
|
|
@Override // com.applovin.impl.dc
|
|
public int e() {
|
|
return t3.a(R.color.applovin_sdk_disclosureButtonColor, this.o);
|
|
}
|
|
|
|
public ke r() {
|
|
return this.n;
|
|
}
|
|
|
|
public String toString() {
|
|
return "MediatedNetworkListItemViewModel{text=" + ((Object) this.c) + ", detailText=" + ((Object) this.d) + ", network=" + this.n + "}";
|
|
}
|
|
|
|
public cg(ke keVar, Context context) {
|
|
super(dc.c.DETAIL);
|
|
this.n = keVar;
|
|
this.o = context;
|
|
this.c = t();
|
|
this.d = s();
|
|
}
|
|
|
|
@Override // com.applovin.impl.dc
|
|
public boolean o() {
|
|
return this.n.q() != ke.a.MISSING;
|
|
}
|
|
|
|
@Override // com.applovin.impl.dc
|
|
public int h() {
|
|
int h = this.n.h();
|
|
return h > 0 ? h : R.drawable.applovin_ic_mediation_placeholder;
|
|
}
|
|
|
|
@Override // com.applovin.impl.dc
|
|
public int d() {
|
|
return o() ? R.drawable.applovin_ic_disclosure_arrow : super.h();
|
|
}
|
|
|
|
private SpannedString t() {
|
|
return StringUtils.createSpannedString(this.n.g(), o() ? ViewCompat.MEASURED_STATE_MASK : -7829368, 18, 1);
|
|
}
|
|
|
|
private SpannedString s() {
|
|
if (!o()) {
|
|
return null;
|
|
}
|
|
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
|
|
spannableStringBuilder.append((CharSequence) u());
|
|
spannableStringBuilder.append((CharSequence) new SpannableString("\n"));
|
|
spannableStringBuilder.append((CharSequence) q());
|
|
if (this.n.q() == ke.a.INVALID_INTEGRATION) {
|
|
spannableStringBuilder.append((CharSequence) new SpannableString("\n"));
|
|
spannableStringBuilder.append((CharSequence) StringUtils.createListItemDetailSpannedString("Invalid Integration", SupportMenu.CATEGORY_MASK));
|
|
}
|
|
return new SpannedString(spannableStringBuilder);
|
|
}
|
|
|
|
private SpannedString u() {
|
|
if (this.n.D()) {
|
|
if (!StringUtils.isValidString(this.n.p())) {
|
|
return StringUtils.createListItemDetailSpannedString(this.n.z() ? "Retrieving SDK Version..." : "SDK Found", ViewCompat.MEASURED_STATE_MASK);
|
|
}
|
|
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(StringUtils.createListItemDetailSubSpannedString("SDK\t\t\t\t\t ", -7829368));
|
|
spannableStringBuilder.append((CharSequence) StringUtils.createListItemDetailSpannedString(this.n.p(), ViewCompat.MEASURED_STATE_MASK));
|
|
return new SpannedString(spannableStringBuilder);
|
|
}
|
|
return StringUtils.createListItemDetailSpannedString("SDK Missing", SupportMenu.CATEGORY_MASK);
|
|
}
|
|
|
|
private SpannedString q() {
|
|
if (this.n.z()) {
|
|
if (!TextUtils.isEmpty(this.n.c())) {
|
|
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(StringUtils.createListItemDetailSubSpannedString("ADAPTER ", -7829368));
|
|
spannableStringBuilder.append((CharSequence) StringUtils.createListItemDetailSpannedString(this.n.c(), ViewCompat.MEASURED_STATE_MASK));
|
|
if (this.n.A()) {
|
|
spannableStringBuilder.append((CharSequence) StringUtils.createListItemDetailSubSpannedString(" LATEST ", Color.rgb(255, 127, 0)));
|
|
spannableStringBuilder.append((CharSequence) StringUtils.createListItemDetailSpannedString(this.n.k(), ViewCompat.MEASURED_STATE_MASK));
|
|
}
|
|
return new SpannedString(spannableStringBuilder);
|
|
}
|
|
return StringUtils.createListItemDetailSpannedString("Adapter Found", ViewCompat.MEASURED_STATE_MASK);
|
|
}
|
|
return StringUtils.createListItemDetailSpannedString("Adapter Missing", SupportMenu.CATEGORY_MASK);
|
|
}
|
|
}
|