Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,408 @@
package com.mbridge.msdk.dycreator.a;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Xml;
import android.view.InflateException;
import android.view.View;
import android.view.ViewGroup;
import com.ironsource.nb;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.Constructor;
import java.util.HashMap;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/* loaded from: classes4.dex */
public final class a {
private static final Class[] f = {Context.class, AttributeSet.class};
private static final HashMap<String, Constructor> g = new HashMap<>();
private static String j = "com.mbridge.msdk.dycreator.baseview.MB";
protected final Context a;
private InterfaceC0192a c;
private b d;
private HashMap<String, Boolean> h;
private long i;
private final boolean b = true;
private final Object[] e = new Object[2];
/* renamed from: com.mbridge.msdk.dycreator.a.a$a, reason: collision with other inner class name */
public interface InterfaceC0192a {
View a(String str, Context context, AttributeSet attributeSet);
}
public interface b {
boolean a(Class cls);
}
public a(Context context) {
this.a = context;
}
private XmlPullParser a(String str) {
XmlPullParser newPullParser = Xml.newPullParser();
try {
newPullParser.setInput(new FileInputStream(str), nb.N);
} catch (Exception e) {
e.printStackTrace();
}
return newPullParser;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r8v0, types: [android.view.View, android.view.ViewGroup, java.lang.Object] */
/* JADX WARN: Type inference failed for: r8v4 */
/* JADX WARN: Type inference failed for: r8v5, types: [android.view.View] */
private View a(XmlPullParser xmlPullParser, ViewGroup viewGroup, boolean z) {
int next;
ViewGroup.LayoutParams layoutParams;
synchronized (this.e) {
try {
AttributeSet asAttributeSet = Xml.asAttributeSet(xmlPullParser);
this.e[0] = this.a;
do {
next = xmlPullParser.next();
if (next == 2) {
break;
}
} while (next != 1);
if (next != 2) {
throw new InflateException(xmlPullParser.getPositionDescription() + ": No start tag found!");
}
String name = xmlPullParser.getName();
PrintStream printStream = System.out;
printStream.println("**************************");
printStream.println("Creating root view: " + name);
printStream.println("**************************");
if (!"merge".equals(name)) {
View a = a(name, asAttributeSet);
if (viewGroup != 0) {
printStream.println("Creating params from root: " + ((Object) viewGroup));
layoutParams = viewGroup.generateLayoutParams(asAttributeSet);
if (!z) {
a.setLayoutParams(layoutParams);
}
} else {
layoutParams = null;
}
printStream.println("-----> start inflating children");
a(xmlPullParser, a, asAttributeSet);
printStream.println("-----> done inflating children");
if (viewGroup != 0 && z) {
viewGroup.addView(a, layoutParams);
}
if (viewGroup == 0 || !z) {
viewGroup = a;
}
} else {
if (viewGroup == 0 || !z) {
throw new InflateException("<merge /> can be used only with a valid ViewGroup root and attachToRoot=true");
}
a(xmlPullParser, (View) viewGroup, asAttributeSet);
}
} catch (IOException e) {
InflateException inflateException = new InflateException(xmlPullParser.getPositionDescription() + ": " + e.getMessage());
inflateException.initCause(e);
throw inflateException;
} catch (XmlPullParserException e2) {
InflateException inflateException2 = new InflateException(e2.getMessage());
inflateException2.initCause(e2);
throw inflateException2;
} finally {
}
}
return viewGroup;
}
private View a(String str, String str2, AttributeSet attributeSet) throws ClassNotFoundException, InflateException {
String str3;
String str4;
HashMap<String, Constructor> hashMap = g;
Constructor<?> constructor = hashMap.get(str);
Class<?> cls = null;
try {
if (constructor == null) {
ClassLoader classLoader = this.a.getClassLoader();
if (str2 != null) {
str4 = str2 + str;
} else {
str4 = str;
}
cls = classLoader.loadClass(str4);
b bVar = this.d;
if (bVar != null && cls != null && !bVar.a(cls)) {
b(str, str2, attributeSet);
}
constructor = cls.getConstructor(f);
hashMap.put(str, constructor);
} else if (this.d != null) {
Boolean bool = this.h.get(str);
if (bool == null) {
ClassLoader classLoader2 = this.a.getClassLoader();
if (str2 != null) {
str3 = str2 + str;
} else {
str3 = str;
}
cls = classLoader2.loadClass(str3);
boolean z = cls != null && this.d.a(cls);
this.h.put(str, Boolean.valueOf(z));
if (!z) {
b(str, str2, attributeSet);
}
} else if (bool.equals(Boolean.FALSE)) {
b(str, str2, attributeSet);
}
}
Object[] objArr = this.e;
objArr[1] = attributeSet;
return (View) constructor.newInstance(objArr);
} catch (ClassNotFoundException e) {
throw e;
} catch (NoSuchMethodException e2) {
StringBuilder sb = new StringBuilder();
sb.append(attributeSet.getPositionDescription());
sb.append(": Error inflating class ");
if (str2 != null) {
str = str2 + str;
}
sb.append(str);
InflateException inflateException = new InflateException(sb.toString());
inflateException.initCause(e2);
throw inflateException;
} catch (Exception e3) {
StringBuilder sb2 = new StringBuilder();
sb2.append(attributeSet.getPositionDescription());
sb2.append(": Error inflating class ");
sb2.append(cls == null ? "<unknown>" : cls.getName());
InflateException inflateException2 = new InflateException(sb2.toString());
inflateException2.initCause(e3);
throw inflateException2;
}
}
private void b(String str, String str2, AttributeSet attributeSet) {
StringBuilder sb = new StringBuilder();
sb.append(attributeSet.getPositionDescription());
sb.append(": Class not allowed to be inflated ");
if (str2 != null) {
str = str2 + str;
}
sb.append(str);
throw new InflateException(sb.toString());
}
private View a(String str, AttributeSet attributeSet) {
View a;
if (str.equals("view")) {
str = attributeSet.getAttributeValue(null, "class");
}
PrintStream printStream = System.out;
printStream.println("******** Creating view: " + str);
try {
InterfaceC0192a interfaceC0192a = this.c;
View a2 = interfaceC0192a == null ? null : interfaceC0192a.a(str, this.a, attributeSet);
if (a2 == null) {
if (-1 != str.indexOf(46)) {
a2 = a(str, (String) null, attributeSet);
} else {
if (!str.equals("MBStarLevelLayoutView") && !str.equals("LuckPan")) {
a = a(str, j, attributeSet);
a2 = a;
}
a = a(str, "", attributeSet);
a2 = a;
}
}
printStream.println("Created view is: " + a2);
return a2;
} catch (InflateException e) {
throw e;
} catch (ClassNotFoundException e2) {
InflateException inflateException = new InflateException(attributeSet.getPositionDescription() + ": Error inflating class " + str);
inflateException.initCause(e2);
throw inflateException;
} catch (Exception e3) {
InflateException inflateException2 = new InflateException(attributeSet.getPositionDescription() + ": Error inflating class " + str);
inflateException2.initCause(e3);
throw inflateException2;
}
}
private void a(XmlPullParser xmlPullParser, View view, AttributeSet attributeSet) throws XmlPullParserException, IOException {
int next;
int depth = xmlPullParser.getDepth();
while (true) {
int next2 = xmlPullParser.next();
if ((next2 == 3 && xmlPullParser.getDepth() <= depth) || next2 == 1) {
return;
}
if (next2 == 2) {
String name = xmlPullParser.getName();
if (!"requestFocus".equals(name)) {
if ("include".equals(name)) {
if (xmlPullParser.getDepth() == 0) {
throw new InflateException("<include /> cannot be the root element");
}
b(xmlPullParser, view, attributeSet);
} else {
if ("merge".equals(name)) {
throw new InflateException("<merge /> must be the root element");
}
View a = a(name, attributeSet);
ViewGroup viewGroup = (ViewGroup) view;
ViewGroup.LayoutParams generateLayoutParams = viewGroup.generateLayoutParams(attributeSet);
a(xmlPullParser, a, attributeSet);
viewGroup.addView(a, generateLayoutParams);
}
} else {
view.requestFocus();
int depth2 = xmlPullParser.getDepth();
do {
next = xmlPullParser.next();
if (next != 3 || xmlPullParser.getDepth() > depth2) {
}
} while (next != 1);
}
}
}
}
/* JADX WARN: Code restructure failed: missing block: B:40:0x006f, code lost:
if (r8 != null) goto L27;
*/
/* JADX WARN: Code restructure failed: missing block: B:41:0x0071, code lost:
r2.setLayoutParams(r8);
*/
/* JADX WARN: Code restructure failed: missing block: B:42:0x007e, code lost:
a(r0, r2, r1);
r7.addView(r2);
*/
/* JADX WARN: Code restructure failed: missing block: B:45:0x007b, code lost:
if (r8 == null) goto L34;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void b(org.xmlpull.v1.XmlPullParser r6, android.view.View r7, android.util.AttributeSet r8) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
/*
r5 = this;
boolean r0 = r7 instanceof android.view.ViewGroup
if (r0 == 0) goto Lbc
r0 = 0
r1 = 0
java.lang.String r2 = "layout"
int r0 = r8.getAttributeResourceValue(r1, r2, r0)
if (r0 != 0) goto L38
java.lang.String r6 = r8.getAttributeValue(r1, r2)
if (r6 != 0) goto L1c
android.view.InflateException r6 = new android.view.InflateException
java.lang.String r7 = "You must specifiy a layout in the include tag: <include layout=\"@layout/layoutID\" />"
r6.<init>(r7)
throw r6
L1c:
android.view.InflateException r7 = new android.view.InflateException
java.lang.StringBuilder r8 = new java.lang.StringBuilder
r8.<init>()
java.lang.String r0 = "You must specifiy a valid layout reference. The layout ID "
r8.append(r0)
r8.append(r6)
java.lang.String r6 = " is not valid."
r8.append(r6)
java.lang.String r6 = r8.toString()
r7.<init>(r6)
throw r7
L38:
android.content.Context r1 = r5.a
android.content.res.Resources r1 = r1.getResources()
android.content.res.XmlResourceParser r0 = r1.getLayout(r0)
android.util.AttributeSet r1 = android.util.Xml.asAttributeSet(r0) // Catch: java.lang.Throwable -> L63
L46:
int r2 = r0.next() // Catch: java.lang.Throwable -> L63
r3 = 1
r4 = 2
if (r2 == r4) goto L51
if (r2 == r3) goto L51
goto L46
L51:
if (r2 != r4) goto L9d
java.lang.String r2 = r0.getName() // Catch: java.lang.Throwable -> L63
java.lang.String r4 = "merge"
boolean r4 = r4.equals(r2) // Catch: java.lang.Throwable -> L63
if (r4 == 0) goto L65
r5.a(r0, r7, r1) // Catch: java.lang.Throwable -> L63
goto L84
L63:
r6 = move-exception
goto Lb8
L65:
android.view.View r2 = r5.a(r2, r1) // Catch: java.lang.Throwable -> L63
android.view.ViewGroup r7 = (android.view.ViewGroup) r7 // Catch: java.lang.Throwable -> L63
android.view.ViewGroup$LayoutParams r8 = r7.generateLayoutParams(r8) // Catch: java.lang.Throwable -> L75 java.lang.RuntimeException -> L77
if (r8 == 0) goto L7e
L71:
r2.setLayoutParams(r8) // Catch: java.lang.Throwable -> L63
goto L7e
L75:
r6 = move-exception
goto L9c
L77:
android.view.ViewGroup$LayoutParams r8 = r7.generateLayoutParams(r1) // Catch: java.lang.Throwable -> L75
if (r8 == 0) goto L7e
goto L71
L7e:
r5.a(r0, r2, r1) // Catch: java.lang.Throwable -> L63
r7.addView(r2) // Catch: java.lang.Throwable -> L63
L84:
r0.close()
int r7 = r6.getDepth()
L8b:
int r8 = r6.next()
r0 = 3
if (r8 != r0) goto L98
int r0 = r6.getDepth()
if (r0 <= r7) goto L9b
L98:
if (r8 == r3) goto L9b
goto L8b
L9b:
return
L9c:
throw r6 // Catch: java.lang.Throwable -> L63
L9d:
android.view.InflateException r6 = new android.view.InflateException // Catch: java.lang.Throwable -> L63
java.lang.StringBuilder r7 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> L63
r7.<init>() // Catch: java.lang.Throwable -> L63
java.lang.String r8 = r0.getPositionDescription() // Catch: java.lang.Throwable -> L63
r7.append(r8) // Catch: java.lang.Throwable -> L63
java.lang.String r8 = ": No start tag found!"
r7.append(r8) // Catch: java.lang.Throwable -> L63
java.lang.String r7 = r7.toString() // Catch: java.lang.Throwable -> L63
r6.<init>(r7) // Catch: java.lang.Throwable -> L63
throw r6 // Catch: java.lang.Throwable -> L63
Lb8:
r0.close()
throw r6
Lbc:
android.view.InflateException r6 = new android.view.InflateException
java.lang.String r7 = "<include /> can only be used inside of a ViewGroup"
r6.<init>(r7)
throw r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.dycreator.a.a.b(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet):void");
}
public final View a(String str, ViewGroup viewGroup) {
boolean z = viewGroup != null;
this.i = System.currentTimeMillis();
System.out.println("INFLATING from resource: " + str);
return a(a(str), viewGroup, z);
}
}

View File

@@ -0,0 +1,356 @@
package com.mbridge.msdk.dycreator.a;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.text.TextUtils;
import android.util.TypedValue;
import android.util.Xml;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.core.view.ViewCompat;
import com.facebook.appevents.internal.ViewHierarchyConstants;
import com.ironsource.nb;
import com.mbridge.msdk.dycreator.baseview.GradientOrientationUtils;
import com.mbridge.msdk.dycreator.e.e;
import com.mbridge.msdk.dycreator.e.g;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.x;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.SoftReference;
import java.lang.reflect.Field;
import java.util.HashMap;
import org.xmlpull.v1.XmlPullParser;
/* loaded from: classes4.dex */
public class b {
private static volatile b g;
private SoftReference<HashMap<String, c>> a;
private SoftReference<HashMap<String, String>> b;
private SoftReference<HashMap<String, c>> c;
private String d;
private String e;
private Context f;
private b() {
}
public static b a() {
if (g == null) {
synchronized (b.class) {
try {
if (g == null) {
g = new b();
}
} finally {
}
}
}
return g;
}
public final void a(Context context, String str) {
try {
if (g.a) {
this.d = context.getFilesDir().toString();
} else {
this.d = str;
}
if (e.a(context).heightPixels > 320 && !g.a) {
this.e = "/drawable-hdpi/";
this.f = context;
com.mbridge.msdk.dycreator.e.b.a = a().d();
}
this.e = "/drawable-mdpi/";
this.f = context;
com.mbridge.msdk.dycreator.e.b.a = a().d();
} catch (Exception e) {
af.b("MBResource", e.getMessage());
}
}
public final void a(Context context) {
try {
if (e.a(context).heightPixels > 320 && !g.a) {
this.e = "/drawable-hdpi/";
this.f = context;
com.mbridge.msdk.dycreator.e.b.a = a().d();
}
this.e = "/drawable-mdpi/";
this.f = context;
com.mbridge.msdk.dycreator.e.b.a = a().d();
} catch (Exception e) {
af.b("MBResource", e.getMessage());
}
}
public final HashMap b() {
SoftReference<HashMap<String, c>> softReference = this.a;
if (softReference == null || softReference.get() == null) {
HashMap hashMap = new HashMap(45);
hashMap.put("layout_width", c.layout_width);
hashMap.put("layout_height", c.layout_height);
hashMap.put("orientation", c.orientation);
hashMap.put("layout_centerHorizontal", c.layout_centerHorizontal);
hashMap.put("layout_centerVertical", c.layout_centerVertical);
c cVar = c.layout_marginLeft;
hashMap.put("layout_marginLeft", cVar);
c cVar2 = c.layout_marginRight;
hashMap.put("layout_marginRight", cVar2);
hashMap.put("layout_margin", c.layout_margin);
hashMap.put("layout_gravity", c.layout_gravity);
hashMap.put("layout_alignParentRight", c.layout_alignParentRight);
hashMap.put("layout_weight", c.layout_weight);
hashMap.put("contentDescription", c.contentDescription);
hashMap.put("gravity", c.gravity);
hashMap.put("id", c.id);
hashMap.put("layout_below", c.layout_below);
hashMap.put("layout_above", c.layout_above);
hashMap.put("layout_toLeftOf", c.layout_toLeftOf);
hashMap.put("layout_toRightOf", c.layout_toRightOf);
hashMap.put("layout_toEndOf", c.layout_toEndOf);
hashMap.put("background", c.background);
hashMap.put("layout_marginTop", c.layout_marginTop);
hashMap.put("layout_marginBottom", c.layout_marginBottom);
hashMap.put("layout_marginLeft", cVar);
hashMap.put("layout_marginRight", cVar2);
hashMap.put("layout_alignParentBottom", c.layout_alignParentBottom);
hashMap.put("layout_alignParentTop", c.layout_alignParentTop);
hashMap.put("layout_alignParentLeft", c.layout_alignParentLeft);
hashMap.put("layout_alignWithParentIfMissing", c.layout_alignWithParentIfMissing);
hashMap.put("layout_alignTop", c.layout_alignTop);
hashMap.put("layout_alignBottom", c.layout_alignBottom);
hashMap.put("layout_alignLeft", c.layout_alignLeft);
hashMap.put("layout_alignRight", c.layout_alignRight);
hashMap.put("layout_centerInParent", c.layout_centerInParent);
hashMap.put("layout_alignParentEnd", c.layout_alignParentEnd);
this.a = new SoftReference<>(hashMap);
}
return this.a.get();
}
public final HashMap<String, c> c() {
SoftReference<HashMap<String, c>> softReference = this.c;
if (softReference == null || softReference.get() == null) {
HashMap hashMap = new HashMap(55);
hashMap.put("id", c.id);
hashMap.put("text", c.text);
hashMap.put("ellipsize", c.ellipsize);
hashMap.put("singleLine", c.singleLine);
hashMap.put("lines", c.lines);
hashMap.put("maxLength", c.maxLength);
hashMap.put("drawableLeft", c.drawableLeft);
hashMap.put("drawablePadding", c.drawablePadding);
hashMap.put("fadingEdge", c.fadingEdge);
hashMap.put("scrollHorizontally", c.scrollHorizontally);
hashMap.put("textColor", c.textColor);
hashMap.put("textSize", c.textSize);
hashMap.put(ViewHierarchyConstants.DIMENSION_VISIBILITY_KEY, c.visibility);
c cVar = c.background;
hashMap.put("background", cVar);
hashMap.put("textStyle", c.textStyle);
hashMap.put("style", c.style);
hashMap.put("layout_width", c.layout_width);
hashMap.put("layout_height", c.layout_height);
hashMap.put("layout_below", c.layout_below);
hashMap.put("layout_centerInParent", c.layout_centerInParent);
hashMap.put("contentDescription", c.contentDescription);
hashMap.put("src", c.src);
hashMap.put("gravity", c.gravity);
hashMap.put("orientation", c.orientation);
hashMap.put("numColumns", c.numColumns);
hashMap.put("verticalSpacing", c.verticalSpacing);
hashMap.put("horizontalSpacing", c.horizontalSpacing);
hashMap.put("background", cVar);
hashMap.put("layout_marginBottom", c.layout_marginBottom);
hashMap.put("scaleType", c.scaleType);
hashMap.put("tag", c.tag);
hashMap.put("layout_gravity", c.layout_gravity);
hashMap.put("parent_view", c.parent_view);
hashMap.put("padding", c.padding);
hashMap.put("paddingTop", c.paddingTop);
hashMap.put("paddingBottom", c.paddingBottom);
hashMap.put("paddingLeft", c.paddingLeft);
hashMap.put("paddingRight", c.paddingRight);
hashMap.put("divider", c.divider);
hashMap.put("scrollbars", c.scrollbars);
hashMap.put("listSelector", c.listSelector);
this.c = new SoftReference<>(hashMap);
}
return this.c.get();
}
public final int a(String str) {
if (TextUtils.isEmpty(str)) {
return ViewCompat.MEASURED_STATE_MASK;
}
if (str.startsWith("#")) {
int length = str.length();
if (length == 7) {
return (int) Long.decode(str.replace("#", "#FF")).longValue();
}
if (length == 9) {
return (int) Long.decode(str).longValue();
}
g.a("返回白色背景");
return -1;
}
if (!str.startsWith("@color/")) {
return ViewCompat.MEASURED_STATE_MASK;
}
return com.mbridge.msdk.foundation.controller.c.m().c().getColor(x.a(com.mbridge.msdk.foundation.controller.c.m().c(), str.substring(7), "color"));
}
public final GradientDrawable a(String[] strArr) {
try {
GradientDrawable gradientDrawable = new GradientDrawable(GradientOrientationUtils.getOrientation(strArr[2]), new int[]{Color.parseColor(strArr[0]), Color.parseColor(strArr[1])});
gradientDrawable.setGradientType(0);
return gradientDrawable;
} catch (Exception e) {
af.b("MBResource", e.getMessage());
return null;
}
}
public final int b(String str) {
try {
return Integer.parseInt(str);
} catch (Exception unused) {
int indexOf = str.indexOf("d");
int indexOf2 = str.indexOf("s");
if (indexOf == -1) {
indexOf = indexOf2;
}
int parseInt = Integer.parseInt(str.substring(0, indexOf));
if (!str.contains("d")) {
str.contains("s");
return parseInt;
}
return (int) TypedValue.applyDimension(1, parseInt, this.f.getResources().getDisplayMetrics());
}
}
public final int c(String str) {
String[] split = str.toUpperCase().split("\\|");
int i = 48;
try {
Class<?> cls = Class.forName("android.view.Gravity");
for (String str2 : split) {
i = cls.getField(str2).getInt(null);
}
} catch (Exception e) {
e.printStackTrace();
}
return i;
}
public final int d(String str) {
if (this.f != null) {
String g2 = com.mbridge.msdk.foundation.controller.c.m().g();
if (TextUtils.isEmpty(g2)) {
g2 = this.f.getPackageName();
}
StringBuilder sb = new StringBuilder();
sb.append(g2);
sb.append(".R$");
String[] split = str.split("\\.");
sb.append(split[1]);
try {
Class<?> cls = Class.forName(sb.toString());
Object newInstance = cls.newInstance();
Field declaredField = cls.getDeclaredField(split[2]);
declaredField.setAccessible(true);
return ((Integer) declaredField.get(newInstance)).intValue();
} catch (Exception e) {
e.printStackTrace();
}
}
return 0;
}
public final String e(String str) {
if (TextUtils.isEmpty(str)) {
return null;
}
if (!str.startsWith("@")) {
return str;
}
SoftReference<HashMap<String, String>> softReference = this.b;
if (softReference == null || softReference.get() == null) {
this.b = new SoftReference<>(d());
}
String substring = str.substring(8);
if (this.b.get() == null || this.b.get().size() <= 0) {
return null;
}
String str2 = this.b.get().get(substring);
if (!TextUtils.isEmpty(str2)) {
return str2;
}
try {
return com.mbridge.msdk.foundation.controller.c.m().c().getString(x.a(com.mbridge.msdk.foundation.controller.c.m().c(), substring, "string"));
} catch (Exception e) {
af.b("MBResource", e.getMessage());
return null;
}
}
private HashMap<String, String> d() {
InputStream inputStream;
try {
inputStream = this.f.getAssets().open("rv_binddatas.xml");
} catch (IOException e) {
e.printStackTrace();
inputStream = null;
}
XmlPullParser newPullParser = Xml.newPullParser();
try {
newPullParser.setInput(inputStream, nb.N);
HashMap<String, String> hashMap = new HashMap<>();
for (int eventType = newPullParser.getEventType(); eventType != 1; eventType = newPullParser.next()) {
if (eventType == 2) {
if ("string".equals(newPullParser.getName())) {
hashMap.put(newPullParser.getAttributeValue(0), newPullParser.nextText());
}
}
}
return hashMap;
} catch (Exception e2) {
e2.printStackTrace();
return null;
}
}
public final void a(String str, ImageView imageView) {
Context context;
if (str == null || !str.startsWith("@drawable/") || (context = this.f) == null) {
return;
}
try {
Resources resources = context.getResources();
String g2 = com.mbridge.msdk.foundation.controller.c.m().g();
if (TextUtils.isEmpty(g2)) {
g2 = this.f.getPackageName();
}
imageView.setImageResource(resources.getIdentifier(str, "drawable", g2));
} catch (Exception e) {
af.b("MBResource", e.getMessage());
}
}
public final View f(String str) {
if (this.f != null) {
try {
a aVar = new a(this.f);
g.a(str.toString());
return aVar.a(str, (ViewGroup) null);
} catch (Exception e) {
af.b("MBResource", e.getMessage());
}
}
return null;
}
}

View File

@@ -0,0 +1,71 @@
package com.mbridge.msdk.dycreator.a;
/* loaded from: classes4.dex */
public enum c {
id,
layout_width,
layout_height,
orientation,
layout_centerHorizontal,
layout_centerVertical,
layout_below,
layout_above,
layout_toRightOf,
layout_toLeftOf,
layout_toEndOf,
layout_marginLeft,
layout_marginRight,
layout_marginTop,
layout_marginBottom,
layout_bottom,
layout_margin,
layout_gravity,
layout_alignParentRight,
layout_alignParentLeft,
layout_alignParentBottom,
layout_alignParentTop,
layout_alignWithParentIfMissing,
layout_weight,
layout_alignParentEnd,
divider,
scrollbars,
listSelector,
splitMotionEvents,
cacheColorHint,
verticalSpacing,
horizontalSpacing,
text,
ellipsize,
singleLine,
maxLength,
lines,
fadingEdge,
scrollHorizontally,
textColor,
textSize,
visibility,
background,
textStyle,
style,
src,
gravity,
numColumns,
contentDescription,
scaleType,
tag,
parent_view,
drawableLeft,
drawablePadding,
layout_alignBottom,
layout_alignTop,
layout_centerInParent,
layout_alignLeft,
layout_alignRight,
padding,
paddingTop,
paddingBottom,
paddingLeft,
paddingRight,
paddingStart,
paddingEnd
}