WeChat.apk(点击下载) / t2.java


package com.tencent.mm.ui;

import android.content.Context;
import android.content.res.TypedArray;
import android.text.Editable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.InflateException;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CheckedTextView;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RadioButton;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.widget.h;
import bw3.qy5;
import bw3.ry5;
import com.tencent.mm.R;
import com.tencent.mm.accessibility.core.provider.AccProviderFactory;
import com.tencent.mm.kiss.widget.textview.StaticTextView;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.WeChatBrands;
import com.tencent.mm.ui.base.MMVerticalTextView;
import com.tencent.mm.ui.widget.MMCollapsibleTextView;
import com.tencent.mm.ui.widget.MMNeat7extView;
import com.tencent.mm.ui.widget.imageview.WeImageButton;
import com.tencent.mm.ui.widget.imageview.WeImageView;
import hy3.k;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Stack;
import lh4.m;
import v84.g;
import v84.j;
import v84.q;
import w84.a;

public final class t2 {

    /* renamed from: a  reason: collision with root package name */
    public static final int[] f185941a = {16843087, 16843088, 16843379};

    /* renamed from: b  reason: collision with root package name */
    public static final int[] f185942b = {16843379};

    /* renamed from: c  reason: collision with root package name */
    public static final int[] f185943c = {16842904, 16842906, 16842964};

    /* renamed from: d  reason: collision with root package name */
    public static final int[] f185944d = {16842904, 16842964};

    /* renamed from: e  reason: collision with root package name */
    public static final int[] f185945e = {16842904, 16843015};

    /* renamed from: f  reason: collision with root package name */
    public static int f185946f;

    public static class b implements LayoutInflater.Factory {

        /* renamed from: d  reason: collision with root package name */
        public LayoutInflater f185947d;

        /* renamed from: e  reason: collision with root package name */
        public j f185948e;

        /* renamed from: f  reason: collision with root package name */
        public int f185949f;

        /* renamed from: g  reason: collision with root package name */
        public int f185950g;

        /* renamed from: h  reason: collision with root package name */
        public b f185951h;

        public b(a aVar) {
        }

        public static View b(String str, View view, Context context, AttributeSet attributeSet) {
            int attributeResourceValue;
            int attributeResourceValue2;
            int hashCode = str.hashCode();
            if (hashCode != -938935918 && hashCode != 2001146706 && hashCode != 1666676343 && hashCode != 1601505219 && hashCode != 776382189 && hashCode != 1125864064 && hashCode != -307023012 && hashCode != 742575657 && hashCode != 1622375284 && hashCode != -1455429095 && hashCode != 1690268602 && hashCode != 321475187 && hashCode != 913567 && hashCode != -472572735 && hashCode != 295445588 && hashCode != -720637559 && hashCode != -124208923 && hashCode != 310672300 && hashCode != 1524180521 && hashCode != -1299757303 && hashCode != -527895810 && hashCode != -1374364899 && hashCode != 132421285 && hashCode != 418111674 && hashCode != 540561289 && hashCode != 1079639440 && hashCode != 2077030397 && hashCode != 2076872964 && hashCode != -771693267 && hashCode != 200122345 && hashCode != 999067519 && hashCode != -1489232690 && hashCode != -1259604263 && hashCode != -1601904316 && hashCode != 1226216429 && hashCode != 960005444 && hashCode != -1568925917 && hashCode != -251296369 && hashCode != 687897231 && hashCode != -602931483 && hashCode != -1992485345 && hashCode != -1159437000 && hashCode != 1262601901 && hashCode != -455447493 && hashCode != 1215740217 && hashCode != -1142652473 && hashCode != 863703231 && hashCode != -978427796 && hashCode != -602460368 && hashCode != -529817397 && hashCode != -1880646591) {
                return view;
            }
            int i15 = 3;
            int i16 = 0;
            if (yk.a.a()) {
                int i17 = 2;
                if (view instanceof RadioButton) {
                    RadioButton radioButton = (RadioButton) view;
                    if (attributeSet != null) {
                        int attributeResourceValue3 = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "textColor", -1);
                        if (attributeResourceValue3 > 0) {
                            radioButton.setTextColor(radioButton.getContext().getResources().getColorStateList(attributeResourceValue3));
                        }
                        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, t2.f185945e);
                        int i18 = 0;
                        while (true) {
                            int[] iArr = t2.f185945e;
                            if (i18 >= 2) {
                                break;
                            }
                            int resourceId = obtainStyledAttributes.getResourceId(i18, 0);
                            if (resourceId != 0) {
                                int i19 = iArr[i18];
                                if (i19 == 16842904) {
                                    radioButton.setTextColor(radioButton.getContext().getResources().getColorStateList(resourceId));
                                } else if (i19 == 16843015 && yk.a.a() && resourceId == R.drawable.axu) {
                                    radioButton.setButtonDrawable(R.drawable.axv);
                                }
                            }
                            i18++;
                        }
                    }
                } else if (view instanceof Button) {
                    Button button = (Button) view;
                    if (attributeSet != null) {
                        int attributeResourceValue4 = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "textColor", -1);
                        if (attributeResourceValue4 > 0) {
                            button.setTextColor(button.getContext().getResources().getColorStateList(attributeResourceValue4));
                        }
                        TypedArray obtainStyledAttributes2 = context.obtainStyledAttributes(attributeSet, t2.f185944d);
                        int i25 = 0;
                        while (true) {
                            int[] iArr2 = t2.f185944d;
                            if (i25 >= i17) {
                                break;
                            }
                            int resourceId2 = obtainStyledAttributes2.getResourceId(i25, i16);
                            if (resourceId2 != 0) {
                                int i26 = iArr2[i25];
                                if (i26 == 16842904) {
                                    button.setTextColor(button.getContext().getResources().getColorStateList(resourceId2));
                                } else if (i26 == 16842964 && yk.a.a()) {
                                    if (resourceId2 == R.drawable.f360417jk) {
                                        button.setBackgroundResource(R.drawable.f360418jl);
                                    } else if (resourceId2 == R.drawable.f360421jo || resourceId2 == R.drawable.f360414jg) {
                                        button.setBackgroundResource(R.drawable.f360422jp);
                                    } else if (resourceId2 == R.drawable.aoe) {
                                        button.setBackgroundResource(R.drawable.aog);
                                    } else if (resourceId2 == R.drawable.aoi) {
                                        button.setBackgroundResource(R.drawable.aoj);
                                    }
                                }
                            }
                            i25++;
                            i16 = 0;
                            i17 = 2;
                        }
                    }
                } else if (view instanceof TextView) {
                    TextView textView = (TextView) view;
                    if (attributeSet != null) {
                        int attributeResourceValue5 = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "textColor", -1);
                        if (attributeResourceValue5 > 0) {
                            textView.setTextColor(textView.getContext().getResources().getColorStateList(attributeResourceValue5));
                        }
                        int attributeResourceValue6 = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "textColorHint", -1);
                        if (attributeResourceValue6 > 0) {
                            textView.setHintTextColor(textView.getContext().getResources().getColor(attributeResourceValue6));
                        }
                        TypedArray obtainStyledAttributes3 = context.obtainStyledAttributes(attributeSet, t2.f185943c);
                        int i27 = 0;
                        while (true) {
                            int[] iArr3 = t2.f185943c;
                            if (i27 >= i15) {
                                break;
                            }
                            int resourceId3 = obtainStyledAttributes3.getResourceId(i27, 0);
                            if (resourceId3 != 0) {
                                int i28 = iArr3[i27];
                                if (i28 == 16842904) {
                                    textView.setTextColor(textView.getContext().getResources().getColorStateList(resourceId3));
                                } else if (i28 == 16842906) {
                                    textView.setHintTextColor(textView.getContext().getResources().getColorStateList(resourceId3));
                                } else if (i28 == 16842964 && yk.a.a() && (resourceId3 == R.drawable.f360421jo || resourceId3 == R.drawable.f360414jg)) {
                                    textView.setBackgroundResource(R.drawable.f360422jp);
                                    i27++;
                                    i15 = 3;
                                }
                            }
                            i27++;
                            i15 = 3;
                        }
                    }
                } else if (view instanceof EditText) {
                    EditText editText = (EditText) view;
                    if (attributeSet != null) {
                        int attributeResourceValue7 = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "textColor", -1);
                        if (attributeResourceValue7 > 0) {
                            editText.setTextColor(editText.getContext().getResources().getColor(attributeResourceValue7));
                        }
                        int attributeResourceValue8 = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "textColorHint", -1);
                        if (attributeResourceValue8 > 0) {
                            editText.setHintTextColor(editText.getContext().getResources().getColor(attributeResourceValue8));
                        }
                        TypedArray obtainStyledAttributes4 = context.obtainStyledAttributes(attributeSet, t2.f185943c);
                        int i29 = 0;
                        while (true) {
                            int[] iArr4 = t2.f185943c;
                            if (i29 >= 3) {
                                break;
                            }
                            int resourceId4 = obtainStyledAttributes4.getResourceId(i29, 0);
                            if (resourceId4 != 0) {
                                int i35 = iArr4[i29];
                                if (i35 == 16842904) {
                                    editText.setTextColor(editText.getContext().getResources().getColor(resourceId4));
                                } else if (i35 == 16842906) {
                                    editText.setHintTextColor(editText.getContext().getResources().getColorStateList(resourceId4));
                                }
                            }
                            i29++;
                        }
                    }
                } else if (view instanceof MMNeat7extView) {
                    MMNeat7extView mMNeat7extView = (MMNeat7extView) view;
                    if (attributeSet != null) {
                        int attributeResourceValue9 = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "textColor", -1);
                        if (attributeResourceValue9 > 0) {
                            mMNeat7extView.setTextColor(mMNeat7extView.getContext().getResources().getColor(attributeResourceValue9));
                        }
                        TypedArray obtainStyledAttributes5 = context.obtainStyledAttributes(attributeSet, t2.f185943c);
                        int i36 = 0;
                        while (true) {
                            int[] iArr5 = t2.f185943c;
                            if (i36 >= 3) {
                                break;
                            }
                            int resourceId5 = obtainStyledAttributes5.getResourceId(i36, 0);
                            if (resourceId5 != 0 && iArr5[i36] == 16842904) {
                                mMNeat7extView.setTextColor(mMNeat7extView.getContext().getResources().getColor(resourceId5));
                            }
                            i36++;
                        }
                    }
                }
            }
            boolean z15 = view instanceof TextView;
            if (z15) {
                TextView textView2 = (TextView) view;
                float lineSpacingMultiplier = textView2.getLineSpacingMultiplier();
                float lineSpacingExtra = textView2.getLineSpacingExtra();
                if (((double) lineSpacingMultiplier) < 1.1d && lineSpacingExtra == 0.0f) {
                    textView2.setLineSpacing(0.0f, 1.1f);
                }
            } else if (view instanceof MMNeat7extView) {
                MMNeat7extView mMNeat7extView2 = (MMNeat7extView) view;
                float lineSpacingMultiplier2 = mMNeat7extView2.getLineSpacingMultiplier();
                mMNeat7extView2.getLineSpacingExtra();
                if (((double) lineSpacingMultiplier2) < 1.1d) {
                    mMNeat7extView2.k(0.0f, 1.1f);
                }
            } else if (view instanceof StaticTextView) {
                StaticTextView staticTextView = (StaticTextView) view;
                float lineSpacingMultiplier3 = staticTextView.getLineSpacingMultiplier();
                float lineSpacingExtra2 = staticTextView.getLineSpacingExtra();
                if (((double) lineSpacingMultiplier3) < 1.1d && lineSpacingExtra2 == 0.0f) {
                    staticTextView.e(0.0f, 1.1f);
                }
            }
            float p15 = gy3.a.p(context);
            j5.f185491b = p15;
            if (!((!x4.L(p15, gy3.a.t(context)) && !x4.L(p15, gy3.a.u(context))) || hashCode == 1690268602 || hashCode == 321475187 || hashCode == -771693267 || hashCode == 200122345 || hashCode == 999067519 || hashCode == -472572735 || hashCode == -602931483 || hashCode == -1992485345 || hashCode == -1159437000 || hashCode == 1262601901 || hashCode == 295445588)) {
                p15 = gy3.a.s(context);
            }
            if (hashCode == -938935918 || hashCode == 1690268602 || hashCode == 321475187 || hashCode == 960005444 || hashCode == 2076872964 || hashCode == -251296369 || hashCode == 863703231) {
                TextView textView3 = (TextView) view;
                float textSize = (textView3.getTextSize() * p15) / gy3.a.g(textView3.getContext());
                textView3.setTextSize(1, textSize);
                if (hashCode == -251296369) {
                    h.b(textView3, 1, (int) textSize, 1, 1);
                }
                if (k.c(context.getAssets()).g()) {
                    TypedArray obtainStyledAttributes6 = context.obtainStyledAttributes(attributeSet, t2.f185941a);
                    int i37 = 0;
                    while (true) {
                        int[] iArr6 = t2.f185941a;
                        if (i37 >= 3) {
                            break;
                        }
                        int resourceId6 = obtainStyledAttributes6.getResourceId(i37, 0);
                        if (resourceId6 != 0) {
                            int i38 = iArr6[i37];
                            if (i38 == 16843379) {
                                textView3.setContentDescription(context.getString(resourceId6));
                            } else if (i38 == 16843088) {
                                textView3.setHint(context.getString(resourceId6));
                            } else {
                                textView3.setText(context.getString(resourceId6));
                            }
                        }
                        i37++;
                    }
                    obtainStyledAttributes6.recycle();
                } else {
                    m34.c.f257849a.a(view, 1);
                }
            } else if (hashCode == 2001146706 || hashCode == 687897231) {
                Button button2 = (Button) view;
                float textSize2 = (button2.getTextSize() * p15) / gy3.a.g(button2.getContext());
                button2.setTextSize(1, textSize2);
                if (hashCode == 687897231) {
                    h.b(button2, 1, (int) textSize2, 1, 1);
                }
                if (k.c(context.getAssets()).g()) {
                    TypedArray obtainStyledAttributes7 = context.obtainStyledAttributes(attributeSet, t2.f185941a);
                    int i39 = 0;
                    while (true) {
                        int[] iArr7 = t2.f185941a;
                        if (i39 >= 3) {
                            break;
                        }
                        int resourceId7 = obtainStyledAttributes7.getResourceId(i39, 0);
                        if (resourceId7 != 0) {
                            int i45 = iArr7[i39];
                            if (i45 == 16843379) {
                                button2.setContentDescription(context.getString(resourceId7));
                            } else if (i45 == 16843088) {
                                button2.setHint(context.getString(resourceId7));
                            } else {
                                button2.setText(context.getString(resourceId7));
                            }
                        }
                        i39++;
                    }
                    obtainStyledAttributes7.recycle();
                }
            } else if (hashCode == 1666676343 || hashCode == 913567 || hashCode == -720637559 || hashCode == -124208923 || hashCode == 132421285 || hashCode == 310672300 || hashCode == 1524180521 || hashCode == -1489232690) {
                EditText editText2 = (EditText) view;
                editText2.setTextSize(1, (editText2.getTextSize() * p15) / gy3.a.g(editText2.getContext()));
                if (k.c(context.getAssets()).g()) {
                    TypedArray obtainStyledAttributes8 = context.obtainStyledAttributes(attributeSet, t2.f185941a);
                    int i46 = 0;
                    while (true) {
                        int[] iArr8 = t2.f185941a;
                        if (i46 >= 3) {
                            break;
                        }
                        int resourceId8 = obtainStyledAttributes8.getResourceId(i46, 0);
                        if (resourceId8 != 0) {
                            int i47 = iArr8[i46];
                            if (i47 == 16843379) {
                                editText2.setContentDescription(context.getString(resourceId8));
                            } else if (i47 == 16843088) {
                                editText2.setHint(context.getString(resourceId8));
                            } else {
                                editText2.setText(context.getString(resourceId8));
                            }
                        }
                        i46++;
                    }
                    obtainStyledAttributes8.recycle();
                } else {
                    m34.c.f257849a.a(view, 1);
                }
            } else if (hashCode == -602460368 || hashCode == -529817397 || hashCode == -978427796 || hashCode == -1880646591) {
                EditText editText3 = (EditText) view;
                m34.c.f257849a.a(view, 1);
            } else if (hashCode == -602931483 || hashCode == -1992485345 || hashCode == 1262601901) {
                com.tencent.mm.ui.widget.cedit.api.a aVar = (com.tencent.mm.ui.widget.cedit.api.a) view;
                aVar.setTextSize(1, (aVar.getTextSize() * p15) / gy3.a.g(aVar.h()));
                if (k.c(context.getAssets()).g()) {
                    TypedArray obtainStyledAttributes9 = context.obtainStyledAttributes(attributeSet, t2.f185941a);
                    int i48 = 0;
                    while (true) {
                        int[] iArr9 = t2.f185941a;
                        if (i48 >= 3) {
                            break;
                        }
                        int resourceId9 = obtainStyledAttributes9.getResourceId(i48, 0);
                        if (resourceId9 != 0) {
                            int i49 = iArr9[i48];
                            if (i49 == 16843379) {
                                aVar.setContentDescription(context.getString(resourceId9));
                            } else if (i49 == 16843088) {
                                aVar.setHint(context.getString(resourceId9));
                            } else {
                                aVar.setText(context.getString(resourceId9));
                            }
                        }
                        i48++;
                    }
                    obtainStyledAttributes9.recycle();
                } else {
                    Editable text = aVar.getText();
                    if (!TextUtils.isEmpty(text)) {
                        aVar.setText(d.b(text));
                    }
                    CharSequence hint = aVar.getHint();
                    if (!TextUtils.isEmpty(hint)) {
                        aVar.setHint(d.b(hint));
                    }
                    CharSequence contentDescription = aVar.getContentDescription();
                    if (!TextUtils.isEmpty(contentDescription)) {
                        aVar.setContentDescription(d.b(contentDescription));
                    }
                    m34.c.f257849a.a(view, 1);
                }
            } else if (hashCode == 1601505219) {
                CheckBox checkBox = (CheckBox) view;
                checkBox.setTextSize(1, (checkBox.getTextSize() * p15) / gy3.a.g(checkBox.getContext()));
                if (k.c(context.getAssets()).g()) {
                    TypedArray obtainStyledAttributes10 = context.obtainStyledAttributes(attributeSet, t2.f185941a);
                    int i55 = 0;
                    while (true) {
                        int[] iArr10 = t2.f185941a;
                        if (i55 >= 3) {
                            break;
                        }
                        int resourceId10 = obtainStyledAttributes10.getResourceId(i55, 0);
                        if (resourceId10 != 0) {
                            int i56 = iArr10[i55];
                            if (i56 == 16843379) {
                                checkBox.setContentDescription(context.getString(resourceId10));
                            } else if (i56 == 16843088) {
                                checkBox.setHint(context.getString(resourceId10));
                            } else {
                                checkBox.setText(context.getString(resourceId10));
                            }
                        }
                        i55++;
                    }
                    obtainStyledAttributes10.recycle();
                }
            } else if (hashCode == 1125864064) {
                ImageView imageView = (ImageView) view;
                if (k.c(context.getAssets()).g()) {
                    TypedArray obtainStyledAttributes11 = context.obtainStyledAttributes(attributeSet, t2.f185942b);
                    int i57 = 0;
                    while (true) {
                        int[] iArr11 = t2.f185942b;
                        if (i57 >= 1) {
                            break;
                        }
                        int resourceId11 = obtainStyledAttributes11.getResourceId(i57, 0);
                        if (resourceId11 != 0 && iArr11[i57] == 16843379) {
                            imageView.setContentDescription(context.getString(resourceId11));
                        }
                        i57++;
                    }
                    obtainStyledAttributes11.recycle();
                } else {
                    CharSequence contentDescription2 = imageView.getContentDescription();
                    if (!TextUtils.isEmpty(contentDescription2)) {
                        imageView.setContentDescription(d.b(contentDescription2));
                    }
                }
            } else if (hashCode == -307023012) {
                if (yk.a.a()) {
                    WeImageView weImageView = (WeImageView) view;
                    if (attributeSet != null && (attributeResourceValue2 = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res-auto", "iconColor", -1)) > 0) {
                        weImageView.setIconColor(weImageView.getContext().getResources().getColor(attributeResourceValue2));
                    }
                }
            } else if (hashCode == 742575657) {
                if (yk.a.a()) {
                    WeImageButton weImageButton = (WeImageButton) view;
                    if (attributeSet != null && (attributeResourceValue = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res-auto", "btnIconColor", -1)) > 0) {
                        weImageButton.setIconColor(weImageButton.getContext().getResources().getColor(attributeResourceValue));
                    }
                }
            } else if (hashCode == -472572735) {
                MMNeat7extView mMNeat7extView3 = (MMNeat7extView) view;
                mMNeat7extView3.l(1, (mMNeat7extView3.getTextSize() * p15) / gy3.a.g(mMNeat7extView3.getContext()));
                CharSequence a15 = mMNeat7extView3.a();
                if (!TextUtils.isEmpty(a15)) {
                    mMNeat7extView3.b(d.b(a15));
                }
                CharSequence hint2 = mMNeat7extView3.getHint();
                if (!TextUtils.isEmpty(hint2)) {
                    mMNeat7extView3.setHint(d.b(hint2));
                }
                CharSequence contentDescription3 = mMNeat7extView3.getContentDescription();
                if (!TextUtils.isEmpty(contentDescription3)) {
                    mMNeat7extView3.setContentDescription(d.b(contentDescription3));
                }
                m34.c.f257849a.a(view, 1);
            } else if (hashCode == -1568925917) {
                MMVerticalTextView mMVerticalTextView = (MMVerticalTextView) view;
                mMVerticalTextView.setTextSize(mMVerticalTextView.getTextSize() * p15);
            } else if (hashCode == 295445588) {
                MMCollapsibleTextView mMCollapsibleTextView = (MMCollapsibleTextView) view;
                mMCollapsibleTextView.u(1, (mMCollapsibleTextView.getTextSize() * p15) / gy3.a.g(mMCollapsibleTextView.getContext()));
            } else {
                if (hashCode == -1601904316) {
                    m34.c.f257849a.a(view, 1);
                }
                if (z15) {
                    TextView textView4 = (TextView) view;
                    textView4.setTextSize(1, (textView4.getTextSize() * p15) / gy3.a.g(textView4.getContext()));
                }
            }
            return view;
        }

        public View a(String str, Context context, AttributeSet attributeSet) {
            View view;
            int hashCode = str.hashCode();
            if (hashCode == 1127291599) {
                view = new LinearLayout(context, attributeSet);
            } else if (hashCode == 1125864064) {
                view = new ImageView(context, attributeSet);
            } else if (hashCode == -938935918) {
                view = new TextView(context, attributeSet);
            } else if (hashCode == 2001146706) {
                view = new Button(context, attributeSet);
            } else if (hashCode == 1666676343) {
                view = new EditText(context, attributeSet);
            } else if (hashCode == 1601505219) {
                view = new CheckBox(context, attributeSet);
            } else if (hashCode == 1310765783) {
                view = new FrameLayout(context, attributeSet);
            } else if (hashCode == -443652810) {
                view = new RelativeLayout(context, attributeSet);
            } else if (hashCode == -1455429095) {
                view = new CheckedTextView(context, attributeSet);
            } else if (hashCode == 1410352259) {
                view = new ListView(context, attributeSet);
            } else if (hashCode == 2666181) {
                view = new View(context, attributeSet);
            } else if (hashCode == 1260470547) {
                view = new ViewStub(context, attributeSet);
            } else if (hashCode == -1406842887) {
                view = new WebView(context, attributeSet);
            } else if (hashCode == -1495589242) {
                view = new ProgressBar(context, attributeSet);
            } else {
                view = null;
            }
            if (view == null && str.indexOf(".") > 0) {
                view = this.f185947d.createView(str, null, attributeSet);
            }
            if (view == null) {
                view = this.f185947d.createView(str, "android.widget.", attributeSet);
            }
            if (view == null) {
                view = this.f185947d.createView(str, "android.view.", attributeSet);
            }
            if (view != null) {
                view.setTag(R.id.nw_, Integer.valueOf(this.f185949f));
                view.setTag(R.id.nwa, Integer.valueOf(t2.f185946f));
            }
            return view;
        }

        public View onCreateView(String str, Context context, AttributeSet attributeSet) {
            b bVar;
            View view = null;
            try {
                j jVar = this.f185948e;
                if (jVar != null) {
                    view = jVar.b(context, attributeSet, str, this.f185950g);
                }
                if (view == null) {
                    view = a(str, context, attributeSet);
                    if (view == null && (bVar = this.f185951h) != null) {
                        view = bVar.onCreateView(str, context, attributeSet);
                    }
                    a14.c cVar = a14.c.f685a;
                    if (view != null) {
                        b(str, view, context, attributeSet);
                        if (view instanceof TextView) {
                            d.a((TextView) view);
                        }
                    } else {
                        Log.w("MicroMsg.MMLayoutInflater", "Inflate view, ClassNotFound " + str);
                    }
                }
                if (view instanceof ViewStub) {
                    ((ViewStub) view).setLayoutInflater(this.f185947d);
                }
                this.f185950g++;
            } catch (ClassNotFoundException e15) {
                Log.w("MicroMsg.MMLayoutInflater", "[cpan] class not found. name:%s. Use default Inflate. Exception:%s", str, e15.getMessage());
            } catch (InflateException e16) {
                Log.w("MicroMsg.MMLayoutInflater", "[cpan] Inflate failed. name:%s. Use default Inflate. Exception:%s", str, e16.getMessage());
            }
            return view;
        }
    }

    public static class c extends LayoutInflater {

        /* renamed from: a  reason: collision with root package name */
        public b f185952a;

        public c(LayoutInflater layoutInflater, Context context) {
            super(layoutInflater, context);
        }

        public LayoutInflater cloneInContext(Context context) {
            return new c(this, context);
        }

        /* JADX WARNING: Removed duplicated region for block: B:23:0x006e A[SYNTHETIC, Splitter:B:23:0x006e] */
        /* JADX WARNING: Removed duplicated region for block: B:56:0x0120  */
        /* JADX WARNING: Removed duplicated region for block: B:57:0x0125  */
        @Override // android.view.LayoutInflater
        public View inflate(int i15, ViewGroup viewGroup, boolean z15) {
            boolean z16;
            View view;
            long j15;
            boolean z17;
            boolean z18;
            View view2;
            boolean z19;
            j jVar;
            int i16;
            b bVar;
            b bVar2;
            LayoutInflater layoutInflater;
            j jVar2;
            View view3;
            boolean z25;
            g e15;
            q.c cVar = q.f323759a;
            cVar.getClass();
            Boolean bool = (Boolean) q.f323765g.get();
            if (bool == null) {
                z16 = false;
            } else {
                z16 = bool.booleanValue();
            }
            cVar.getClass();
            if (!q.f323764f || z16 || (e15 = q.a().e()) == null) {
                view = null;
            } else {
                view = e15.a(getContext(), i15, viewGroup, z15);
            }
            if (view != null) {
                if (getContext() instanceof MMFragmentActivity) {
                    try {
                        j15 = ((Long) view.getTag(R.id.a5e)).longValue();
                    } catch (Throwable th5) {
                        Log.printErrStackTrace("MicroMsg.MMLayoutInflater", th5, "get time Tag err", new Object[0]);
                    }
                    if (getContext() instanceof MMFragmentActivity) {
                        try {
                            z25 = ((Boolean) view.getTag(R.id.hgy)).booleanValue();
                        } catch (Throwable th6) {
                            Log.printErrStackTrace("MicroMsg.MMLayoutInflater", th6, "get creator Tag err", new Object[0]);
                        }
                        z18 = z25;
                        z17 = true;
                    }
                    z25 = false;
                    z18 = z25;
                    z17 = true;
                }
                j15 = 0;
                if (getContext() instanceof MMFragmentActivity) {
                }
                z25 = false;
                z18 = z25;
                z17 = true;
            } else {
                z18 = false;
                z17 = false;
                j15 = 0;
            }
            Context context = getContext();
            q.c cVar2 = q.f323759a;
            cVar2.getClass();
            m.g(context, "context");
            if (!z16 && (context instanceof AppCompatActivity) && q.f323764f) {
                if (cVar2.b().b().a(context.getClass().getSimpleName())) {
                    if (cVar2.b().b().c(context.getClass().getSimpleName(), i15)) {
                        q.f323768j.push(Integer.valueOf(i15));
                    }
                }
            }
            if (view == null) {
                long nanoTime = System.nanoTime();
                cVar2.getClass();
                if (!q.f323764f) {
                    jVar2 = null;
                } else {
                    jVar2 = cVar2.b().f(i15);
                }
                if (jVar2 != null) {
                    if (viewGroup != null) {
                        try {
                            view3 = jVar2.a(getContext(), viewGroup, z15);
                        } catch (Exception e16) {
                            Log.printErrStackTrace("MicroMsg.MMLayoutInflater", e16, "X2CCreateLayoutView %s", jVar2.c());
                        }
                    } else {
                        view3 = jVar2.d(getContext());
                    }
                    long nanoTime2 = System.nanoTime() - nanoTime;
                    view2 = view3;
                    if (view3 == null) {
                        jVar = jVar2;
                        j15 = nanoTime2;
                        z19 = true;
                    } else {
                        z19 = z18;
                        jVar = jVar2;
                    }
                }
                view3 = null;
                long nanoTime22 = System.nanoTime() - nanoTime;
                view2 = view3;
                if (view3 == null) {
                }
            } else {
                view2 = view;
                z19 = z18;
                jVar = null;
            }
            if (view2 == null) {
                long nanoTime3 = System.nanoTime();
                b bVar3 = this.f185952a;
                if (bVar3 != null) {
                    bVar3.f185949f = i15;
                    bVar3.f185950g = 0;
                    bVar3.f185948e = jVar;
                    b bVar4 = bVar3.f185951h;
                    if (bVar4 != null) {
                        bVar4.f185949f = i15;
                    }
                }
                try {
                    view2 = super.inflate(i15, viewGroup, z15);
                } catch (Exception e17) {
                    Log.printErrStackTrace("MicroMsg.MMLayoutInflater", e17, "MMLayoutInflaterWrapper.inflate", new Object[0]);
                }
                if (!(view2 != null || (bVar = this.f185952a) == null || (bVar2 = bVar.f185951h) == null || (layoutInflater = bVar2.f185947d) == null)) {
                    try {
                        view2 = layoutInflater.inflate(i15, viewGroup, z15);
                    } catch (Exception e18) {
                        Log.printErrStackTrace("MicroMsg.MMLayoutInflater", e18, "MMLayoutInflaterWrapper.originInflate", new Object[0]);
                    }
                }
                j15 = System.nanoTime() - nanoTime3;
            }
            Context context2 = getContext();
            if (viewGroup != null) {
                i16 = 1;
            } else {
                i16 = 0;
            }
            q.c cVar3 = q.f323759a;
            cVar3.getClass();
            m.g(context2, "context");
            if (!z16 && (context2 instanceof AppCompatActivity) && q.f323764f) {
                String simpleName = context2.getClass().getSimpleName();
                if (cVar3.b().b().a(simpleName)) {
                    if (cVar3.b().b().c(context2.getClass().getSimpleName(), i15)) {
                        Stack<Integer> stack = q.f323768j;
                        if (stack.size() > 0) {
                            Integer pop = stack.pop();
                            if (stack.empty() && pop != null && pop.intValue() == i15) {
                                ry5 ry5 = new ry5();
                                ry5.f35901d = i15;
                                ry5.f35902e = i16;
                                HashMap<String, v84.m> hashMap = q.f323767i;
                                v84.m mVar = hashMap.get(simpleName);
                                if (mVar == null) {
                                    qy5 qy5 = new qy5();
                                    qy5.f34759d = simpleName;
                                    qy5.f34760e.add(ry5);
                                    v84.m mVar2 = new v84.m(qy5);
                                    mVar2.f323757b = context2.hashCode();
                                    hashMap.put(simpleName, mVar2);
                                } else if (context2.hashCode() != mVar.f323757b) {
                                    qy5 qy52 = new qy5();
                                    qy52.f34759d = simpleName;
                                    qy52.f34760e.add(ry5);
                                    v84.m mVar3 = new v84.m(qy52);
                                    mVar3.f323757b = context2.hashCode();
                                    hashMap.put(simpleName, mVar3);
                                } else if (mVar.f323756a.f34760e.size() < 100) {
                                    mVar.f323756a.f34760e.add(ry5);
                                }
                            }
                        }
                    }
                }
            }
            if (view2 != null) {
                if (!z16) {
                    view2.setTag(R.id.nw_, Integer.valueOf(i15));
                    AccProviderFactory.INSTANCE.onInflateRootAsync(view2);
                }
                if (z16) {
                    view2.setTag(R.id.a5e, Long.valueOf(j15));
                    view2.setTag(R.id.hgy, Boolean.valueOf(z19));
                } else if ((getContext() instanceof MMFragmentActivity) && j15 > 0) {
                    boolean z26 = !z17;
                    w84.a aVar = ((MMFragmentActivity) getContext()).inflateXMLInfo;
                    Context context3 = getContext();
                    aVar.getClass();
                    m.g(context3, "context");
                    if (!z26 && Log.isDebug()) {
                        context3.getResources().getResourceEntryName(i15);
                    }
                    try {
                        ((ArrayList) aVar.f331557c).add(new a.b(i15, j15, z26));
                    } catch (Throwable th7) {
                        Log.printErrStackTrace("InflateXMLInfo", th7, "add item err", new Object[0]);
                    }
                }
            }
            return view2;
        }
    }

    public static final class d {
        public static void a(TextView textView) {
            CharSequence text = textView.getText();
            if (!TextUtils.isEmpty(text)) {
                textView.setText(b(text));
            }
            CharSequence hint = textView.getHint();
            if (!TextUtils.isEmpty(hint)) {
                textView.setHint(b(hint));
            }
            CharSequence contentDescription = textView.getContentDescription();
            if (!TextUtils.isEmpty(contentDescription)) {
                textView.setContentDescription(b(contentDescription));
            }
        }

        public static String b(CharSequence charSequence) {
            if (charSequence == null) {
                return null;
            }
            String charSequence2 = charSequence.toString();
            if (TextUtils.isEmpty(charSequence2)) {
                return charSequence2;
            }
            return WeChatBrands.Wordings.translate(charSequence2);
        }
    }

    public static LayoutInflater a(LayoutInflater layoutInflater, Context context) {
        gy3.a.p(context);
        LayoutInflater cloneInContext = layoutInflater.cloneInContext(context);
        b bVar = new b(null);
        bVar.f185947d = cloneInContext;
        cloneInContext.setFactory(bVar);
        c cVar = new c(cloneInContext, cloneInContext.getContext());
        b bVar2 = new b(null);
        bVar2.f185947d = cVar;
        bVar2.f185951h = bVar;
        cVar.setFactory(bVar2);
        cVar.f185952a = bVar2;
        return cVar;
    }

    public static LayoutInflater b(Context context) {
        gy3.a.p(context);
        LayoutInflater cloneInContext = LayoutInflater.from(context).cloneInContext(context);
        b bVar = new b(null);
        bVar.f185947d = cloneInContext;
        cloneInContext.setFactory(bVar);
        c cVar = new c(cloneInContext, cloneInContext.getContext());
        b bVar2 = new b(null);
        bVar2.f185947d = cVar;
        bVar2.f185951h = bVar;
        cVar.setFactory(bVar2);
        cVar.f185952a = bVar2;
        return cVar;
    }

    public static LayoutInflater c(LayoutInflater layoutInflater) {
        gy3.a.p(layoutInflater.getContext());
        LayoutInflater cloneInContext = layoutInflater.cloneInContext(layoutInflater.getContext());
        b bVar = new b(null);
        bVar.f185947d = cloneInContext;
        cloneInContext.setFactory(bVar);
        c cVar = new c(cloneInContext, cloneInContext.getContext());
        b bVar2 = new b(null);
        bVar2.f185947d = cVar;
        bVar2.f185951h = bVar;
        cVar.setFactory(bVar2);
        cVar.f185952a = bVar2;
        return cVar;
    }
}