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


package lt1;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import com.tencent.mm.R;
import com.tencent.mm.plugin.finder.utils.a5;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.ui.widget.imageview.WeImageView;
import ek0.v2;
import java.util.ArrayList;
import k30.a;
import k30.c;
import kh4.l;
import kh4.p;
import lh4.m;
import rs1.d;
import t32.e6;
import wg4.b0;
import xg4.q0;
import yz3.j;

public final class n7 implements View.OnClickListener {
    public boolean A = true;
    public int B;
    public long C;

    /* renamed from: d  reason: collision with root package name */
    public final ViewGroup f255494d;

    /* renamed from: e  reason: collision with root package name */
    public final String f255495e = "FinderLivePrecheckWidget";

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

    /* renamed from: g  reason: collision with root package name */
    public String f255497g = "";

    /* renamed from: h  reason: collision with root package name */
    public String f255498h = "";

    /* renamed from: i  reason: collision with root package name */
    public p<? super String, ? super Integer, b0> f255499i;

    /* renamed from: j  reason: collision with root package name */
    public l<? super Boolean, b0> f255500j;

    /* renamed from: n  reason: collision with root package name */
    public Button f255501n;

    /* renamed from: o  reason: collision with root package name */
    public TextView f255502o;

    /* renamed from: p  reason: collision with root package name */
    public WeImageView f255503p;

    /* renamed from: q  reason: collision with root package name */
    public TextView f255504q;

    /* renamed from: r  reason: collision with root package name */
    public WeImageView f255505r;

    /* renamed from: s  reason: collision with root package name */
    public View f255506s;

    /* renamed from: t  reason: collision with root package name */
    public TextView f255507t;

    /* renamed from: u  reason: collision with root package name */
    public TextView f255508u;

    /* renamed from: v  reason: collision with root package name */
    public WeImageView f255509v;

    /* renamed from: w  reason: collision with root package name */
    public boolean f255510w;

    /* renamed from: x  reason: collision with root package name */
    public boolean f255511x = true;

    /* renamed from: y  reason: collision with root package name */
    public boolean f255512y;

    /* renamed from: z  reason: collision with root package name */
    public boolean f255513z = true;

    public n7(ViewGroup viewGroup) {
        m.g(viewGroup, "root");
        this.f255494d = viewGroup;
    }

    public final void a(String str, int i15) {
        if (i15 != 4) {
            if (str == null || str.length() == 0) {
                Log.e(this.f255495e, "gotoFaceVerify error url is empty!");
                d dVar = d.f297303a;
                Context context = this.f255494d.getContext();
                m.f(context, "root.context");
                dVar.b2(context, "检测地址为空");
                return;
            }
        }
        ((e6) j.c(e6.class)).e4(7, this.B, this.C, q0.b(new wg4.l("certification_type", Integer.valueOf(i15))));
        p<? super String, ? super Integer, b0> pVar = this.f255499i;
        if (pVar != null) {
            pVar.invoke(str, Integer.valueOf(i15));
        }
    }

    public final void b() {
        this.f255511x = m60.d.u(this.f255496f, 4);
        boolean u15 = m60.d.u(this.f255496f, 32);
        this.f255512y = u15;
        this.f255513z = u15 | this.f255511x | m60.d.u(this.f255496f, 8);
        this.A = m60.d.u(this.f255496f, 16);
    }

    public final void c() {
        if (this.f255513z) {
            TextView textView = this.f255504q;
            if (textView != null) {
                textView.setText(R.string.e5w);
            }
            TextView textView2 = this.f255504q;
            if (textView2 != null) {
                textView2.setTextColor(MMApplicationContext.getContext().getResources().getColor(R.color.f357965ac));
            }
            WeImageView weImageView = this.f255505r;
            if (weImageView != null) {
                weImageView.setVisibility(4);
            }
            TextView textView3 = this.f255504q;
            if (textView3 != null) {
                textView3.setEnabled(true);
                return;
            }
            return;
        }
        TextView textView4 = this.f255504q;
        if (textView4 != null) {
            textView4.setText(R.string.e5x);
        }
        TextView textView5 = this.f255504q;
        if (textView5 != null) {
            textView5.setTextColor(MMApplicationContext.getContext().getResources().getColor(R.color.Brand_100));
        }
        WeImageView weImageView2 = this.f255505r;
        if (weImageView2 != null) {
            weImageView2.setVisibility(4);
        }
        TextView textView6 = this.f255504q;
        if (textView6 != null) {
            textView6.setEnabled(false);
        }
    }

    public final void d() {
        if (this.f255510w) {
            Button button = this.f255501n;
            if (button != null) {
                button.setText(R.string.e5s);
            }
        } else {
            Button button2 = this.f255501n;
            if (button2 != null) {
                button2.setText(R.string.e5r);
            }
        }
        boolean z15 = true;
        if (this.f255511x || this.f255513z || this.A || this.f255512y) {
            z15 = false;
        }
        Button button3 = this.f255501n;
        if (button3 != null) {
            button3.setEnabled(z15);
        }
    }

    public final void e(String str) {
        boolean z15 = true;
        if (this.A) {
            View view = this.f255506s;
            if (view != null) {
                a aVar = new a();
                ThreadLocal<a> threadLocal = c.f244265a;
                aVar.c(0);
                j30.a.d(view, aVar.b(), "com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "setOthers", "(Ljava/lang/String;)V", "android/view/View_EXEC_", "setVisibility", "(I)V");
                view.setVisibility(((Integer) aVar.a(0)).intValue());
                j30.a.e(view, "com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "setOthers", "(Ljava/lang/String;)V", "android/view/View_EXEC_", "setVisibility", "(I)V");
            }
            TextView textView = this.f255508u;
            if (textView != null) {
                textView.setText(R.string.e5w);
            }
            TextView textView2 = this.f255508u;
            if (textView2 != null) {
                textView2.setTextColor(MMApplicationContext.getContext().getResources().getColor(R.color.f357965ac));
            }
            TextView textView3 = this.f255507t;
            if (textView3 != null) {
                textView3.setText(str);
            }
            WeImageView weImageView = this.f255509v;
            if (weImageView != null) {
                weImageView.setVisibility(0);
            }
            TextView textView4 = this.f255508u;
            if (textView4 != null) {
                textView4.setEnabled(true);
                return;
            }
            return;
        }
        if (!(str == null || str.length() == 0)) {
            z15 = false;
        }
        if (!z15) {
            View view2 = this.f255506s;
            if (view2 != null) {
                a aVar2 = new a();
                ThreadLocal<a> threadLocal2 = c.f244265a;
                aVar2.c(0);
                j30.a.d(view2, aVar2.b(), "com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "setOthers", "(Ljava/lang/String;)V", "android/view/View_EXEC_", "setVisibility", "(I)V");
                view2.setVisibility(((Integer) aVar2.a(0)).intValue());
                j30.a.e(view2, "com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "setOthers", "(Ljava/lang/String;)V", "android/view/View_EXEC_", "setVisibility", "(I)V");
            }
            TextView textView5 = this.f255508u;
            if (textView5 != null) {
                textView5.setText(R.string.e5x);
            }
            TextView textView6 = this.f255508u;
            if (textView6 != null) {
                textView6.setTextColor(MMApplicationContext.getContext().getResources().getColor(R.color.Brand_100));
            }
            TextView textView7 = this.f255507t;
            if (textView7 != null) {
                textView7.setText(str);
            }
            WeImageView weImageView2 = this.f255509v;
            if (weImageView2 != null) {
                weImageView2.setVisibility(4);
            }
            TextView textView8 = this.f255508u;
            if (textView8 != null) {
                textView8.setEnabled(false);
                return;
            }
            return;
        }
        View view3 = this.f255506s;
        if (view3 != null) {
            a aVar3 = new a();
            ThreadLocal<a> threadLocal3 = c.f244265a;
            aVar3.c(8);
            j30.a.d(view3, aVar3.b(), "com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "setOthers", "(Ljava/lang/String;)V", "android/view/View_EXEC_", "setVisibility", "(I)V");
            view3.setVisibility(((Integer) aVar3.a(0)).intValue());
            j30.a.e(view3, "com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "setOthers", "(Ljava/lang/String;)V", "android/view/View_EXEC_", "setVisibility", "(I)V");
        }
    }

    public final void f() {
        String str = this.f255495e;
        Log.i(str, "setRealname realnameCheckFail" + this.f255511x + ", finderRealNameCheckFail:" + this.f255512y);
        boolean z15 = this.f255511x;
        if (z15 || this.f255512y) {
            if (z15) {
                TextView textView = this.f255502o;
                if (textView != null) {
                    textView.setText(R.string.e5w);
                }
            } else {
                TextView textView2 = this.f255502o;
                if (textView2 != null) {
                    textView2.setText(R.string.e6b);
                }
            }
            TextView textView3 = this.f255502o;
            if (textView3 != null) {
                textView3.setTextColor(MMApplicationContext.getContext().getResources().getColor(R.color.f357965ac));
            }
            WeImageView weImageView = this.f255503p;
            if (weImageView != null) {
                weImageView.setVisibility(0);
            }
            TextView textView4 = this.f255502o;
            if (textView4 != null) {
                textView4.setEnabled(true);
                return;
            }
            return;
        }
        TextView textView5 = this.f255502o;
        if (textView5 != null) {
            textView5.setText(R.string.e5x);
        }
        TextView textView6 = this.f255502o;
        if (textView6 != null) {
            textView6.setTextColor(MMApplicationContext.getContext().getResources().getColor(R.color.Brand_100));
        }
        WeImageView weImageView2 = this.f255503p;
        if (weImageView2 != null) {
            weImageView2.setVisibility(4);
        }
        TextView textView7 = this.f255502o;
        if (textView7 != null) {
            textView7.setEnabled(false);
        }
    }

    public final void g(boolean z15, int i15) {
        String str = this.f255495e;
        Log.i(str, "updatePrecheck precheckType:" + i15 + ", " + z15);
        if (i15 == 1) {
            if (z15) {
                this.f255511x = false;
            }
            f();
        } else if (i15 == 2) {
            if (z15) {
                this.f255513z = false;
            }
            c();
        } else if (i15 == 3) {
            if (z15) {
                this.A = false;
            }
            e(this.f255498h);
        } else if (i15 == 4) {
            if (z15) {
                this.f255512y = false;
            }
            f();
        }
        d();
        String str2 = this.f255495e;
        Log.i(str2, "updatePrecheck realnameCheckFail:" + this.f255511x + ", finderRealNameCheckFail:" + this.f255512y + ", ageCheckFail:" + this.f255513z + ", othersCheckFail:" + this.A);
    }

    public void onClick(View view) {
        Integer num;
        boolean z15;
        boolean z16;
        l<? super Boolean, b0> lVar;
        ArrayList arrayList = new ArrayList();
        arrayList.add(view);
        Object[] array = arrayList.toArray();
        arrayList.clear();
        j30.a.b("com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V", this, array);
        if (view != null) {
            num = Integer.valueOf(view.getId());
        } else {
            num = null;
        }
        boolean z17 = false;
        if ((num != null && num.intValue() == R.id.l2m) || (num != null && num.intValue() == R.id.l2k)) {
            z15 = true;
        } else {
            z15 = false;
        }
        if (!z15) {
            if ((num != null && num.intValue() == R.id.l2b) || (num != null && num.intValue() == R.id.l2_)) {
                z16 = true;
            } else {
                z16 = false;
            }
            if (!z16) {
                if ((num != null && num.intValue() == R.id.l2h) || (num != null && num.intValue() == R.id.l2f)) {
                    z17 = true;
                }
                if (z17) {
                    a(this.f255497g, 3);
                } else if (num != null && num.intValue() == R.id.l2d) {
                    if (a5.f118672a.N()) {
                        j30.a.g(this, "com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V");
                        return;
                    } else if (this.f255510w) {
                        l<? super Boolean, b0> lVar2 = this.f255500j;
                        if (lVar2 != null) {
                            lVar2.invoke(Boolean.TRUE);
                        }
                    } else {
                        Context context = this.f255494d.getContext();
                        m.e(context, "null cannot be cast to non-null type android.app.Activity");
                        Intent intent = new Intent();
                        intent.putExtra("KEY_PATH", "https://weixin.qq.com/cgi-bin/readtemplate?t=finder_live_privacy");
                        intent.putExtra("KEY_TYPE", "TYPE_LICENSE");
                        intent.putExtra("KEY_PARAMS_ANCHOR_LIVE_PATH_ENTRANCE_TYPE", this.B);
                        intent.putExtra("KEY_PARAMS_ANCHOR_LIVE_PATH_ENTRANCE_ID", this.C);
                        ((v2) j.c(v2.class)).YJ((Activity) context, intent, 10123);
                    }
                } else if (!(num == null || num.intValue() != R.id.ofa || (lVar = this.f255500j) == null)) {
                    lVar.invoke(Boolean.FALSE);
                }
            }
        } else if (this.f255511x) {
            a(this.f255497g, 1);
        } else {
            a("", 4);
        }
        j30.a.g(this, "com/tencent/mm/plugin/finder/live/widget/FinderLivePrecheckWidget", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V");
    }
}