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


package xj1;

import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.text.SpannableString;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import bw3.e02;
import bw3.lo0;
import bw3.qo0;
import bw3.xi0;
import com.tencent.mm.R;
import com.tencent.mm.plugin.finder.activity.uic.FinderActivityParticipateUIC;
import com.tencent.mm.plugin.finder.utils.b3;
import com.tencent.mm.plugin.finder.utils.h4;
import com.tencent.mm.plugin.finder.view.p4;
import com.tencent.mm.protocal.protobuf.FinderContact;
import com.tencent.mm.sdk.platformtools.LocaleUtil;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.h5;
import com.tencent.mm.ui.t2;
import com.tencent.mm.ui.widget.imageview.WeImageView;
import com.tencent.tinker.loader.hotplug.EnvConsts;
import d60.z;
import gh.h;
import hy1.p;
import i14.d0;
import i14.l0;
import i14.p0;
import java.util.Arrays;
import kh4.l;
import lh4.m;
import lh4.o;
import m60.d;
import wg4.b0;
import wk1.d4;
import y24.r;
import yf0.n;
import yf0.y;

public final class b extends sj1.a implements n {

    /* renamed from: f  reason: collision with root package name */
    public final e02 f339220f;

    /* renamed from: g  reason: collision with root package name */
    public lo0 f339221g;

    /* renamed from: h  reason: collision with root package name */
    public p64.n f339222h;

    public static final class a implements l0 {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ b f339223d;

        public a(b bVar) {
            this.f339223d = bVar;
        }

        @Override // i14.l0
        public final void onCreateMMMenu(d0 d0Var) {
            String str;
            FinderContact finderContact;
            int i15;
            long j15;
            lo0 lo02;
            lo0 lo03;
            FinderContact finderContact2;
            if (d0Var.v()) {
                boolean f15 = this.f339223d.f();
                b bVar = this.f339223d;
                lo0 lo04 = bVar.f339221g;
                String str2 = null;
                if (lo04 == null || (finderContact2 = lo04.f28736e) == null) {
                    str = null;
                } else {
                    str = finderContact2.username;
                }
                boolean z15 = false;
                if (m.b(str, r32.b.c(bVar.f301986d))) {
                    h4 h4Var = h4.f119006a;
                    e02 e022 = bVar.f339220f;
                    if (e022 == null || (lo03 = e022.f19948w) == null) {
                        i15 = 0;
                    } else {
                        i15 = lo03.f28747s;
                    }
                    if (e022 == null || (lo02 = e022.f19948w) == null) {
                        j15 = 0;
                    } else {
                        j15 = lo02.f28748t;
                    }
                    if (!h4Var.Q0(i15, j15)) {
                        z15 = true;
                    }
                }
                if (z15) {
                    d0Var.k(10004, this.f339223d.f301986d.getResources().getString(R.string.cic), R.raw.finder_outlined_turnoff, f15);
                    return;
                }
                b bVar2 = this.f339223d;
                lo0 lo05 = bVar2.f339221g;
                if (!(lo05 == null || (finderContact = lo05.f28736e) == null)) {
                    str2 = finderContact.username;
                }
                if (!m.b(str2, r32.b.c(bVar2.f301986d))) {
                    d0Var.k(10005, this.f339223d.f301986d.getResources().getString(R.string.dy4), R.raw.icons_outlined_report_problem, f15);
                }
            }
        }
    }

    /* renamed from: xj1.b$b  reason: collision with other inner class name */
    public static final class C6126b implements p0 {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ b f339224d;

        public C6126b(b bVar) {
            this.f339224d = bVar;
        }

        @Override // i14.p0
        public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
            long j15;
            int itemId = menuItem.getItemId();
            if (itemId == 10004) {
                b bVar = this.f339224d;
                if (bVar.f339222h == null) {
                    p64.n nVar = new p64.n((Context) bVar.f301986d, 1, true);
                    nVar.m(bVar.f301986d.getResources().getString(R.string.cib), 17, bVar.f301986d.getResources().getDimensionPixelSize(R.dimen.f359312ja));
                    nVar.f281245i = new c(bVar);
                    nVar.f281259q = new d(bVar);
                    nVar.f281235d = new e(bVar);
                    bVar.f339222h = nVar;
                }
                p64.n nVar2 = bVar.f339222h;
                if (nVar2 != null && !nVar2.h()) {
                    nVar2.q();
                }
            } else if (itemId == 10005) {
                b bVar2 = this.f339224d;
                AppCompatActivity appCompatActivity = bVar2.f301986d;
                lo0 lo02 = bVar2.f339221g;
                if (lo02 != null) {
                    j15 = lo02.f28735d;
                } else {
                    j15 = 0;
                }
                m.g(appCompatActivity, "context");
                String format = String.format("https://weixin110.qq.com/security/readtemplate?t=weixin_report/w_type&scene=%d&topic_id=%s", Arrays.copyOf(new Object[]{68, d.p(j15)}, 2));
                m.f(format, "format(format, *args)");
                Intent intent = new Intent();
                intent.putExtra("rawUrl", format);
                sv3.b.j(appCompatActivity, "webview", ".ui.tools.WebViewUI", intent, null);
            }
        }
    }

    public static final class c extends o implements l<String, b0> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ b f339225d;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(b bVar) {
            super(1);
            this.f339225d = bVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kh4.l
        public b0 invoke(String str) {
            m.g(str, LocaleUtil.ITALIAN);
            Log.i("FinderActivityShareHandler", "setAnnounceView");
            h4.f119006a.t1(this.f339225d.f301986d);
            return b0.f332794a;
        }
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public b(e02 e022, AppCompatActivity appCompatActivity) {
        super(appCompatActivity);
        lo0 lo02;
        m.g(appCompatActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        this.f339220f = e022;
        if (e022 != null) {
            lo02 = e022.f19948w;
        } else {
            lo02 = null;
        }
        this.f339221g = lo02;
    }

    @Override // sj1.a
    public void b(p64.n nVar) {
        m.g(nVar, "bottomSheet");
        nVar.f281247j = new a(this);
        nVar.f281263s = new C6126b(this);
    }

    @Override // sj1.a
    public View c() {
        View inflate = t2.b(this.f301986d).inflate(R.layout.adw, (ViewGroup) null);
        TextView textView = (TextView) inflate.findViewById(R.id.f361718ht);
        String string = this.f301986d.getResources().getString(R.string.ci_);
        m.f(string, "activity.resources.getSt…r_activity_announce_name)");
        String string2 = this.f301986d.getResources().getString(R.string.f4k, string);
        m.f(string2, "activity.resources.getSt…n_announce, announceName)");
        SpannableString spannableString = new SpannableString(string2 + ' ');
        AppCompatActivity appCompatActivity = this.f301986d;
        Drawable d15 = h5.d(appCompatActivity, R.raw.icons_outlined_arrow, appCompatActivity.getResources().getColor(R.color.FG_1));
        d15.setBounds(0, 0, (int) this.f301986d.getResources().getDimension(R.dimen.f359825xh), (int) this.f301986d.getResources().getDimension(R.dimen.f359061c9));
        spannableString.setSpan(new f64.d(d15, 1), spannableString.length() - 1, spannableString.length(), 17);
        spannableString.setSpan(new p4(string2, this.f301986d.getResources().getColor(R.color.f358689uf), this.f301986d.getResources().getColor(R.color.a9e), false, false, new c(this)), string2.length() - 6, string2.length(), 17);
        textView.setOnTouchListener(new kv3.d0(this.f301986d));
        textView.setText(spannableString);
        return inflate;
    }

    @Override // sj1.a
    public boolean f() {
        String str;
        lo0 lo02 = this.f339221g;
        String str2 = null;
        if (lo02 != null) {
            str = lo02.f28737f;
        } else {
            str = null;
        }
        boolean isNullOrNil = Util.isNullOrNil(str);
        StringBuilder sb5 = new StringBuilder();
        sb5.append("notShare ");
        sb5.append(isNullOrNil);
        sb5.append(", ");
        lo0 lo03 = this.f339221g;
        if (lo03 != null) {
            str2 = lo03.f28737f;
        }
        sb5.append(Util.isNullOrNil(str2));
        Log.i("FinderActivityShareHandler", sb5.toString());
        return isNullOrNil;
    }

    @Override // sj1.a
    public void g() {
        z.d().a(5909, this);
    }

    @Override // sj1.a
    public void h() {
        z.d().p(5909, this);
    }

    @Override // sj1.a
    public void i() {
        String str;
        long j15;
        String str2;
        b3.a aVar = b3.f118772a;
        AppCompatActivity appCompatActivity = this.f301986d;
        m.e(appCompatActivity, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
        MMActivity mMActivity = (MMActivity) appCompatActivity;
        lo0 lo02 = this.f339221g;
        String str3 = null;
        if (lo02 != null) {
            str = lo02.f28737f;
        } else {
            str = null;
        }
        if (lo02 != null) {
            j15 = (long) lo02.f28739h;
        } else {
            j15 = 0;
        }
        if (lo02 != null) {
            str3 = lo02.f28740i;
        }
        if (str3 == null) {
            str2 = "";
        } else {
            str2 = str3;
        }
        aVar.C(mMActivity, str, 7, j15, str2, m(), null, 9, "", n());
    }

    @Override // sj1.a
    public void j() {
        String str;
        long j15;
        String str2;
        b3.a aVar = b3.f118772a;
        AppCompatActivity appCompatActivity = this.f301986d;
        m.e(appCompatActivity, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
        MMActivity mMActivity = (MMActivity) appCompatActivity;
        lo0 lo02 = this.f339221g;
        String str3 = null;
        if (lo02 != null) {
            str = lo02.f28737f;
        } else {
            str = null;
        }
        if (lo02 != null) {
            j15 = (long) lo02.f28739h;
        } else {
            j15 = 0;
        }
        if (lo02 != null) {
            str3 = lo02.f28740i;
        }
        if (str3 == null) {
            str2 = "";
        } else {
            str2 = str3;
        }
        aVar.E(mMActivity, str, 7, j15, str2, m(), null, 9, "", n());
    }

    @Override // sj1.a
    public boolean l() {
        qo0 qo02;
        lo0 lo02 = this.f339221g;
        boolean z15 = false;
        if (!(lo02 == null || (qo02 = lo02.f28753y) == null || qo02.f34448j)) {
            z15 = true;
        }
        return !z15;
    }

    public final String m() {
        qo0 qo02;
        int i15 = ((FinderActivityParticipateUIC) r.f342954a.c(this.f301986d).a(FinderActivityParticipateUIC.class)).f108844r;
        h4 h4Var = h4.f119006a;
        AppCompatActivity appCompatActivity = this.f301986d;
        lo0 lo02 = this.f339221g;
        if (lo02 != null) {
            qo02 = lo02.f28753y;
        } else {
            qo02 = null;
        }
        return h4Var.S(appCompatActivity, qo02, i15);
    }

    public final xi0 n() {
        long j15;
        String str;
        String str2;
        CharSequence charSequence;
        qo0 qo02;
        FinderContact finderContact;
        xi0 xi02 = new xi0();
        lo0 lo02 = this.f339221g;
        long j16 = 0;
        if (lo02 != null) {
            j15 = lo02.f28735d;
        } else {
            j15 = 0;
        }
        xi02.f42205d = d.p(j15);
        lo0 lo03 = this.f339221g;
        String str3 = "";
        if (lo03 == null || (str = lo03.f28737f) == null) {
            str = str3;
        }
        xi02.f42206e = str;
        if (lo03 == null || (finderContact = lo03.f28736e) == null || (str2 = finderContact.nickname) == null) {
            str2 = str3;
        }
        xi02.f42207f = str2;
        if (lo03 != null) {
            j16 = lo03.f28752x;
        }
        xi02.f42209h = j16;
        if (lo03 == null || (qo02 = lo03.f28753y) == null || (charSequence = qo02.f34450o) == null) {
            charSequence = MMApplicationContext.getContext().getText(R.string.cmu);
        }
        String str4 = (String) charSequence;
        if (str4 != null) {
            str3 = str4;
        }
        xi02.f42210i = str3;
        return xi02;
    }

    @Override // yf0.n
    public void onSceneEnd(int i15, int i16, String str, y yVar) {
        String str2;
        FinderContact finderContact;
        if ((yVar instanceof d4) && ((d4) yVar).f333655g == 1) {
            if (i15 == 0 && i16 == 0) {
                h<String, p.a> hVar = p.f228915h;
                h<String, p.a> hVar2 = p.f228915h;
                lo0 lo02 = this.f339221g;
                if (lo02 == null || (finderContact = lo02.f28736e) == null || (str2 = finderContact.username) == null) {
                    str2 = "";
                }
                hVar2.remove(str2);
                if (!this.f301986d.isFinishing()) {
                    this.f301986d.finish();
                }
            } else if (i16 == -4059) {
                FinderActivityParticipateUIC finderActivityParticipateUIC = (FinderActivityParticipateUIC) r.f342954a.c(this.f301986d).a(FinderActivityParticipateUIC.class);
                WeImageView weImageView = finderActivityParticipateUIC.f108838i;
                if (weImageView != null) {
                    weImageView.setVisibility(8);
                }
                TextView textView = finderActivityParticipateUIC.f108839j;
                if (textView != null) {
                    textView.setText(finderActivityParticipateUIC.q5());
                }
            }
        }
    }
}