- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
191 lines
7.0 KiB
Java
191 lines
7.0 KiB
Java
package com.mbridge.msdk.dycreator.baseview;
|
|
|
|
import android.animation.Animator;
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.ViewGroup;
|
|
import android.widget.TextView;
|
|
import com.fyber.inneractive.sdk.external.InneractiveMediationDefs;
|
|
import com.mbridge.msdk.dycreator.a.b;
|
|
import com.mbridge.msdk.dycreator.baseview.inter.InterBase;
|
|
import com.mbridge.msdk.dycreator.baseview.inter.InterEffect;
|
|
import com.mbridge.msdk.dycreator.e.a;
|
|
import com.mbridge.msdk.dycreator.e.c;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.same.report.k;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class MBTextView extends TextView implements InterBase, InterEffect {
|
|
private boolean a;
|
|
public AttributeSet attrs;
|
|
private Animator b;
|
|
private Map<String, String> c;
|
|
private Map<String, Boolean> d;
|
|
private String e;
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterEffect
|
|
public void setAnimator(Animator animator) {
|
|
this.b = animator;
|
|
}
|
|
|
|
public MBTextView(Context context) {
|
|
super(context);
|
|
this.a = false;
|
|
this.e = "";
|
|
}
|
|
|
|
public MBTextView(Context context, AttributeSet attributeSet) {
|
|
super(context);
|
|
this.a = false;
|
|
this.e = "";
|
|
this.attrs = attributeSet;
|
|
try {
|
|
this.c = c.a(context, attributeSet);
|
|
a.a(this, attributeSet);
|
|
setLayoutParams(generateLayoutParams(attributeSet));
|
|
c.a(this.c, this);
|
|
} catch (Exception e) {
|
|
af.b("TextView", e.getMessage());
|
|
}
|
|
}
|
|
|
|
public MBTextView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
this.a = false;
|
|
this.e = "";
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public boolean isFocused() {
|
|
if (this.a) {
|
|
return true;
|
|
}
|
|
return super.isFocused();
|
|
}
|
|
|
|
@Override // android.widget.TextView, android.view.View
|
|
public void onAttachedToWindow() {
|
|
super.onAttachedToWindow();
|
|
Animator animator = this.b;
|
|
if (animator != null) {
|
|
try {
|
|
animator.start();
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
Map<String, Boolean> map = this.d;
|
|
if (map != null && map.containsKey("mbridgeAttached") && this.d.get("mbridgeAttached").booleanValue()) {
|
|
new k.a("mbridgeAttached").a().a(this.e);
|
|
}
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public void onDetachedFromWindow() {
|
|
super.onDetachedFromWindow();
|
|
Animator animator = this.b;
|
|
if (animator != null) {
|
|
try {
|
|
animator.cancel();
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
Map<String, Boolean> map = this.d;
|
|
if (map != null && map.containsKey("mbridgeDetached") && this.d.get("mbridgeDetached").booleanValue()) {
|
|
new k.a("mbridgeDetached").a().a(this.e);
|
|
}
|
|
}
|
|
|
|
public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attributeSet) {
|
|
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(-1, -1);
|
|
HashMap b = b.a().b();
|
|
int attributeCount = attributeSet.getAttributeCount();
|
|
for (int i = 0; i < attributeCount; i++) {
|
|
com.mbridge.msdk.dycreator.a.c cVar = (com.mbridge.msdk.dycreator.a.c) b.get(attributeSet.getAttributeName(i));
|
|
if (cVar != null) {
|
|
int i2 = AnonymousClass1.a[cVar.ordinal()];
|
|
if (i2 == 1) {
|
|
String attributeValue = attributeSet.getAttributeValue(i);
|
|
if (attributeValue.startsWith(InneractiveMediationDefs.GENDER_FEMALE) || attributeValue.startsWith(InneractiveMediationDefs.GENDER_MALE)) {
|
|
layoutParams.width = -1;
|
|
} else if (attributeValue.startsWith("wrap")) {
|
|
layoutParams.width = -2;
|
|
} else {
|
|
layoutParams.width = b.a().b(attributeValue);
|
|
}
|
|
} else if (i2 == 2) {
|
|
String attributeValue2 = attributeSet.getAttributeValue(i);
|
|
if (attributeValue2.startsWith(InneractiveMediationDefs.GENDER_FEMALE) || attributeValue2.startsWith(InneractiveMediationDefs.GENDER_MALE)) {
|
|
layoutParams.height = -1;
|
|
} else if (attributeValue2.startsWith("wrap")) {
|
|
layoutParams.height = -2;
|
|
} else {
|
|
layoutParams.height = b.a().b(attributeValue2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return layoutParams;
|
|
}
|
|
|
|
/* renamed from: com.mbridge.msdk.dycreator.baseview.MBTextView$1, reason: invalid class name */
|
|
public static /* synthetic */ class AnonymousClass1 {
|
|
static final /* synthetic */ int[] a;
|
|
|
|
static {
|
|
int[] iArr = new int[com.mbridge.msdk.dycreator.a.c.values().length];
|
|
a = iArr;
|
|
try {
|
|
iArr[com.mbridge.msdk.dycreator.a.c.layout_width.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
a[com.mbridge.msdk.dycreator.a.c.layout_height.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getBindDataDes() {
|
|
Map<String, String> map = this.c;
|
|
return (map == null || !map.containsKey("mbridgeData")) ? "" : this.c.get("mbridgeData");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getActionDes() {
|
|
Map<String, String> map = this.c;
|
|
return (map == null || !map.containsKey("mbridgeAction")) ? "" : this.c.get("mbridgeAction");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getStrategyDes() {
|
|
Map<String, String> map = this.c;
|
|
return (map == null || !map.containsKey("mbridgeStrategy")) ? "" : this.c.get("mbridgeStrategy");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getEffectDes() {
|
|
Map<String, String> map = this.c;
|
|
return (map == null || !map.containsKey("mbridgeEffect")) ? "" : this.c.get("mbridgeEffect");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getReportDes() {
|
|
Map<String, String> map = this.c;
|
|
return (map == null || !map.containsKey("mbridgeReport")) ? "" : this.c.get("mbridgeReport");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public void setDynamicReport(String str, CampaignEx campaignEx) {
|
|
this.d = c.a(str);
|
|
if (campaignEx != null) {
|
|
this.e = campaignEx.getCampaignUnitId();
|
|
}
|
|
}
|
|
}
|