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


package com.tencent.mm.ui.chatting;

import a74.l;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.os.Vibrator;
import android.telephony.TelephonyManager;
import android.view.MotionEvent;
import android.view.View;
import androidx.activity.ComponentActivity;
import bw3.hb3;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.tencent.mm.R;
import com.tencent.mm.autogen.events.RecordStateChangeEvent;
import com.tencent.mm.autogen.events.VoipEvent;
import com.tencent.mm.autogen.mmdata.rpt.ChatHbClickStruct;
import com.tencent.mm.component.api.jumper.UICustomParam;
import com.tencent.mm.modelcontrol.VideoTransPara;
import com.tencent.mm.plugin.mmsight.SightCaptureResult;
import com.tencent.mm.plugin.mmsight.SightParams;
import com.tencent.mm.plugin.mmsight.segment.FFmpegMetadataRetriever;
import com.tencent.mm.plugin.recordvideo.background.provider.WeSeeProvider;
import com.tencent.mm.plugin.recordvideo.jumper.RecordConfigProvider;
import com.tencent.mm.plugin.recordvideo.jumper.RecordMediaReportInfo;
import com.tencent.mm.plugin.recordvideo.jumper.VideoCaptureReportInfo;
import com.tencent.mm.plugin.recordvideo.plugin.parent.CameraKitPluginLayout;
import com.tencent.mm.plugin.report.service.q;
import com.tencent.mm.plugin.sns.ui.monitor.SnsMethodCalculate;
import com.tencent.mm.pluginsdk.ui.chat.AppPanel;
import com.tencent.mm.pluginsdk.ui.chat.ChatFooter;
import com.tencent.mm.pluginsdk.ui.chat.ChatFooter$$s1;
import com.tencent.mm.pluginsdk.ui.chat.u0;
import com.tencent.mm.pluginsdk.ui.tools.FileSelectorUI;
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.MMEntryLock;
import com.tencent.mm.sdk.platformtools.MTimerHandler;
import com.tencent.mm.sdk.platformtools.MultiProcessMMKV;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.storage.f4;
import com.tencent.mm.storage.g4;
import com.tencent.mm.storage.w1;
import com.tencent.mm.storage.z1;
import com.tencent.mm.ui.x;
import com.tencent.mm.vfs.u1;
import com.tencent.xweb.util.WXWebReporter;
import d60.z;
import gh.g;
import gy3.a;
import i14.y0;
import ie1.h;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import lh4.m;
import nf0.p3;
import org.json.JSONObject;
import ox.t;
import ox.v;
import sh0.i0;
import sh0.j0;
import sh0.l0;
import sv2.y;
import u14.h1;
import u14.w0;
import u14.z0;
import vh0.u;
import vh0.w;
import w00.f;
import w00.i;
import xw.d;
import y14.b;
import yf0.r;
import yz3.j;

public class r1 implements u0 {

    /* renamed from: v  reason: collision with root package name */
    public static boolean f180959v = true;

    /* renamed from: a  reason: collision with root package name */
    public ChatFooter f180960a;

    /* renamed from: b  reason: collision with root package name */
    public l<r> f180961b;

    /* renamed from: c  reason: collision with root package name */
    public String f180962c;

    /* renamed from: d  reason: collision with root package name */
    public z1 f180963d;

    /* renamed from: e  reason: collision with root package name */
    public String f180964e;

    /* renamed from: f  reason: collision with root package name */
    public l<Vibrator> f180965f;

    /* renamed from: g  reason: collision with root package name */
    public boolean f180966g;

    /* renamed from: h  reason: collision with root package name */
    public boolean f180967h;

    /* renamed from: i  reason: collision with root package name */
    public boolean f180968i;

    /* renamed from: j  reason: collision with root package name */
    public b f180969j;

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

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

    /* renamed from: m  reason: collision with root package name */
    public final r.a f180972m = new r1$$e(this);

    /* renamed from: n  reason: collision with root package name */
    public final r.b f180973n = new r1$$f(this);

    /* renamed from: o  reason: collision with root package name */
    public volatile boolean f180974o = false;

    /* renamed from: p  reason: collision with root package name */
    public volatile boolean f180975p = false;

    /* renamed from: q  reason: collision with root package name */
    public Object f180976q = new Object();

    /* renamed from: r  reason: collision with root package name */
    public final MTimerHandler f180977r = new MTimerHandler(new r1$$h(this), true);

    /* renamed from: s  reason: collision with root package name */
    public boolean f180978s = false;

    /* renamed from: t  reason: collision with root package name */
    public final MTimerHandler f180979t = new MTimerHandler(new r1$$i(this), true);

    /* renamed from: u  reason: collision with root package name */
    public AppPanel.h f180980u = new r1$$k(this);

    public r1(b bVar, ChatFooter chatFooter, String str) {
        this.f180969j = bVar;
        this.f180960a = chatFooter;
        this.f180962c = str;
        this.f180963d = p3.b().v().get(str);
        boolean Y5 = z1.Y5(this.f180969j.r());
        this.f180966g = Y5;
        this.f180967h = Y5;
        this.f180965f = new l<>(new r1$$a(this));
        this.f180961b = new l<>(new r1$$b(this));
        chatFooter.setAppPanelListener(this.f180980u);
        ((h) j.c(h.class)).Lk0(h.c.Ud, true);
        this.f180970k = (String) p3.b().u().e(2, null);
    }

    public static void H(int i15, int i16, String str) {
        ChatHbClickStruct chatHbClickStruct = new ChatHbClickStruct();
        chatHbClickStruct.f65873d = (long) i15;
        chatHbClickStruct.f65876g = System.currentTimeMillis();
        chatHbClickStruct.f65874e = chatHbClickStruct.b("SessionId", str, true);
        chatHbClickStruct.f65875f = (long) i16;
        chatHbClickStruct.n();
    }

    public static void b(r1 r1Var, String str) {
        r1Var.getClass();
        Intent intent = new Intent();
        int D1 = ((mp.b) j.c(mp.b.class)).D1(r1Var.o());
        intent.putExtra("key_way", 1);
        intent.putExtra("key_chatroom_num", D1);
        intent.putExtra("key_type", 1);
        intent.putExtra("key_from", 1);
        intent.putExtra("key_username", r1Var.o());
        intent.putExtra("key_session_id", str);
        intent.putExtra("pay_channel", 14);
        q.INSTANCE.g(25925, 2, 3, Float.valueOf(a.p(r1Var.f180969j.f())), 0, 0);
        sv3.b.j(r1Var.f180969j.f(), "luckymoney", ".ui.LuckyMoneyPrepareUI", intent, null);
    }

    /* JADX WARNING: Removed duplicated region for block: B:25:0x00bd A[SYNTHETIC, Splitter:B:25:0x00bd] */
    /* JADX WARNING: Removed duplicated region for block: B:30:0x00da  */
    /* JADX WARNING: Removed duplicated region for block: B:34:0x00f3  */
    /* JADX WARNING: Removed duplicated region for block: B:35:0x0108  */
    /* JADX WARNING: Removed duplicated region for block: B:38:0x011f A[ADDED_TO_REGION] */
    public static void c(r1 r1Var) {
        char c15;
        int i15;
        boolean z15;
        String str;
        String str2;
        String str3;
        boolean z16;
        String J;
        int i16;
        int i17;
        String str4;
        boolean z17;
        Exception e15;
        w1.a aVar = w1.a.f175237dm;
        boolean b15 = y.f308006a.b(r1Var.f180969j.f());
        String pi5 = ((h) j.c(h.class)).pi(h.c.Cv, "");
        String str5 = x.f188459a;
        String str6 = "weishi://webview?jump_url=https%3A%2F%2Fisee.weishi.qq.com%2F21red.html%3Fshowloading%3D0%26offlineMode%3D1%26u%3D1&navstyle=5&needlogin=1&_wv=4096&activity_id=WxRpAct2021&logsour=2230000003";
        String str7 = "https://isee.weishi.qq.com/ws/wact/app-download/index.html?chid=205000003&attach=cp_reserves3_2230000003";
        String str8 = "wcpay.weishi.redenvelop.countForH5";
        if (!Util.isNullOrNil(pi5)) {
            try {
                JSONObject jSONObject = new JSONObject(pi5);
                JSONObject jSONObject2 = jSONObject.getJSONObject("weishi_download");
                JSONObject jSONObject3 = jSONObject.getJSONObject("wx_weishi_download");
                str6 = jSONObject.getString("weishi_jump");
                str7 = jSONObject2.getString("url");
                z17 = jSONObject2.getBoolean(FirebaseAnalytics.a.SHARE);
                try {
                    str5 = jSONObject3.getString("url");
                    z16 = jSONObject3.getBoolean(FirebaseAnalytics.a.SHARE);
                    try {
                        i15 = jSONObject.getInt("wx_weishi_download_click_limit");
                    } catch (Exception e16) {
                        e15 = e16;
                        i15 = 3;
                        c15 = 0;
                        Log.e("MicroMsg.ChattingFooterEventImpl", "gotoWeishiHb Exception:%s", e15.getMessage());
                        str = str7;
                        z15 = z17;
                        str3 = str5;
                        str2 = str6;
                        Object[] objArr = new Object[2];
                        objArr[c15] = str2;
                        objArr[1] = str8;
                        Log.i("MicroMsg.ChattingFooterEventImpl", "get weishi hongbao config expt, weishiJump: %s, clickLimitKey: %s", objArr);
                        J = p3.b().u().J(aVar, "");
                        if (!Util.isNullOrNil(J)) {
                        }
                        i17 = i16;
                        Object[] objArr2 = new Object[1];
                        objArr2[i16] = Integer.valueOf(i17);
                        Log.i("MicroMsg.ChattingFooterEventImpl", "get enter count in storage: %s", objArr2);
                        H(6, i17, r1Var.f180971l);
                        if (b15) {
                        }
                        if (!b15) {
                        }
                        i14.j.A(r1Var.f180969j.f(), str4, "", r1Var.f180969j.f().getString(R.string.f367559x1), r1Var.f180969j.f().getString(R.string.f367394sg), new s1(r1Var, b15, str2, i17, str, z15), new t1(r1Var, b15, i17));
                        return;
                    }
                    try {
                        str8 = jSONObject.getString("limit_key");
                        str = str7;
                        c15 = 0;
                    } catch (Exception e17) {
                        e15 = e17;
                        c15 = 0;
                        Log.e("MicroMsg.ChattingFooterEventImpl", "gotoWeishiHb Exception:%s", e15.getMessage());
                        str = str7;
                        z15 = z17;
                        str3 = str5;
                        str2 = str6;
                        Object[] objArr3 = new Object[2];
                        objArr3[c15] = str2;
                        objArr3[1] = str8;
                        Log.i("MicroMsg.ChattingFooterEventImpl", "get weishi hongbao config expt, weishiJump: %s, clickLimitKey: %s", objArr3);
                        J = p3.b().u().J(aVar, "");
                        if (!Util.isNullOrNil(J)) {
                        }
                        Object[] objArr22 = new Object[1];
                        objArr22[i16] = Integer.valueOf(i17);
                        Log.i("MicroMsg.ChattingFooterEventImpl", "get enter count in storage: %s", objArr22);
                        H(6, i17, r1Var.f180971l);
                        if (b15) {
                        }
                        if (!b15) {
                        }
                        i14.j.A(r1Var.f180969j.f(), str4, "", r1Var.f180969j.f().getString(R.string.f367559x1), r1Var.f180969j.f().getString(R.string.f367394sg), new s1(r1Var, b15, str2, i17, str, z15), new t1(r1Var, b15, i17));
                        return;
                    }
                } catch (Exception e18) {
                    e15 = e18;
                    z16 = false;
                    i15 = 3;
                    c15 = 0;
                    Log.e("MicroMsg.ChattingFooterEventImpl", "gotoWeishiHb Exception:%s", e15.getMessage());
                    str = str7;
                    z15 = z17;
                    str3 = str5;
                    str2 = str6;
                    Object[] objArr32 = new Object[2];
                    objArr32[c15] = str2;
                    objArr32[1] = str8;
                    Log.i("MicroMsg.ChattingFooterEventImpl", "get weishi hongbao config expt, weishiJump: %s, clickLimitKey: %s", objArr32);
                    J = p3.b().u().J(aVar, "");
                    if (!Util.isNullOrNil(J)) {
                    }
                    Object[] objArr222 = new Object[1];
                    objArr222[i16] = Integer.valueOf(i17);
                    Log.i("MicroMsg.ChattingFooterEventImpl", "get enter count in storage: %s", objArr222);
                    H(6, i17, r1Var.f180971l);
                    if (b15) {
                    }
                    if (!b15) {
                    }
                    i14.j.A(r1Var.f180969j.f(), str4, "", r1Var.f180969j.f().getString(R.string.f367559x1), r1Var.f180969j.f().getString(R.string.f367394sg), new s1(r1Var, b15, str2, i17, str, z15), new t1(r1Var, b15, i17));
                    return;
                }
            } catch (Exception e19) {
                e15 = e19;
                z16 = false;
                z17 = false;
                i15 = 3;
                c15 = 0;
                Log.e("MicroMsg.ChattingFooterEventImpl", "gotoWeishiHb Exception:%s", e15.getMessage());
                str = str7;
                z15 = z17;
                str3 = str5;
                str2 = str6;
                Object[] objArr322 = new Object[2];
                objArr322[c15] = str2;
                objArr322[1] = str8;
                Log.i("MicroMsg.ChattingFooterEventImpl", "get weishi hongbao config expt, weishiJump: %s, clickLimitKey: %s", objArr322);
                J = p3.b().u().J(aVar, "");
                if (!Util.isNullOrNil(J)) {
                }
                i17 = i16;
                Object[] objArr2222 = new Object[1];
                objArr2222[i16] = Integer.valueOf(i17);
                Log.i("MicroMsg.ChattingFooterEventImpl", "get enter count in storage: %s", objArr2222);
                H(6, i17, r1Var.f180971l);
                if (b15) {
                }
                if (!b15) {
                }
                i14.j.A(r1Var.f180969j.f(), str4, "", r1Var.f180969j.f().getString(R.string.f367559x1), r1Var.f180969j.f().getString(R.string.f367394sg), new s1(r1Var, b15, str2, i17, str, z15), new t1(r1Var, b15, i17));
                return;
            }
            z15 = z17;
            str3 = str5;
            str2 = str6;
        } else {
            c15 = 0;
            str3 = str5;
            str2 = str6;
            str = str7;
            z16 = false;
            z15 = false;
            i15 = 3;
        }
        Object[] objArr3222 = new Object[2];
        objArr3222[c15] = str2;
        objArr3222[1] = str8;
        Log.i("MicroMsg.ChattingFooterEventImpl", "get weishi hongbao config expt, weishiJump: %s, clickLimitKey: %s", objArr3222);
        J = p3.b().u().J(aVar, "");
        if (!Util.isNullOrNil(J)) {
            try {
                i17 = new JSONObject(J).getInt(str8);
                i16 = 0;
            } catch (Exception e25) {
                i16 = 0;
                Log.e("MicroMsg.ChattingFooterEventImpl", "get max count store key for weishi url Exception:%s", e25.getMessage());
            }
        } else {
            i16 = 0;
            i17 = i16;
        }
        Object[] objArr22222 = new Object[1];
        objArr22222[i16] = Integer.valueOf(i17);
        Log.i("MicroMsg.ChattingFooterEventImpl", "get enter count in storage: %s", objArr22222);
        H(6, i17, r1Var.f180971l);
        if (b15) {
            H(10, i17, r1Var.f180971l);
            str4 = r1Var.f180969j.f().getString(R.string.f367478us);
        } else {
            H(7, i17, r1Var.f180971l);
            str4 = r1Var.f180969j.f().getString(R.string.f367476uq);
        }
        if (!b15 || i17 >= i15) {
            i14.j.A(r1Var.f180969j.f(), str4, "", r1Var.f180969j.f().getString(R.string.f367559x1), r1Var.f180969j.f().getString(R.string.f367394sg), new s1(r1Var, b15, str2, i17, str, z15), new t1(r1Var, b15, i17));
            return;
        }
        String str9 = str3 + "&sessionId=" + r1Var.f180971l;
        WeSeeProvider.f139904g.b(str2, System.currentTimeMillis());
        Intent intent = new Intent();
        if (!z16) {
            intent.putExtra("KRightBtn", true);
        }
        intent.putExtra("rawUrl", str9);
        sv3.b.j(r1Var.f180969j.f(), "webview", ".ui.tools.WebViewUI", intent, null);
        JSONObject jSONObject4 = new JSONObject();
        try {
            jSONObject4.put(str8, i17 + 1);
        } catch (Exception unused) {
            Log.e("MicroMsg.ChattingFooterEventImpl", "set max count json for weishi url store key error!");
        }
        p3.b().u().L(aVar, jSONObject4.toString());
    }

    public static void d(r1 r1Var) {
        r1Var.getClass();
        w1.a aVar = w1.a.f175356ic;
        Log.i("MicroMsg.ChattingFooterEventImpl", "do get config");
        String o15 = r1Var.o();
        int i15 = 0;
        if (((i) j.c(i.class)).zE0(r1Var.o())) {
            ((f) j.c(f.class)).SX(((Integer) z.s().i().f(aVar, 0)).intValue(), o15);
        } else if (((i) j.c(i.class)).ag()) {
            ((f) j.c(f.class)).Yv0(o15);
        } else {
            int intValue = ((Integer) z.s().i().f(aVar, 0)).intValue();
            if (z1.Y5(o15)) {
                q.INSTANCE.g(25925, 2, 3, Float.valueOf(a.p(r1Var.f180969j.f())), 0, 0);
            } else {
                q.INSTANCE.g(25925, 1, 1, Float.valueOf(a.p(r1Var.f180969j.f())), 0, 0);
                i15 = 25;
            }
            ((f) j.c(f.class)).sK(i15, intValue, o15);
        }
    }

    public static void e(r1 r1Var, String str) {
        r1Var.getClass();
        q qVar = q.INSTANCE;
        qVar.g(11701, 1, 0, 0, 1, 1);
        Intent intent = new Intent();
        intent.putExtra("key_way", 0);
        intent.putExtra("key_type", 0);
        intent.putExtra("key_from", 1);
        intent.putExtra("key_username", r1Var.o());
        intent.putExtra("key_session_id", str);
        intent.putExtra("pay_channel", 11);
        qVar.g(25925, 1, 1, Float.valueOf(a.p(r1Var.f180969j.f())), 0, 0);
        sv3.b.j(r1Var.f180969j.f(), "luckymoney", ".ui.LuckyMoneyPrepareUI", intent, null);
    }

    public static r1$$m n(JSONObject jSONObject, String str) {
        if (jSONObject == null || !jSONObject.has("wording")) {
            return null;
        }
        JSONObject optJSONObject = jSONObject.optJSONObject("wording");
        if (!optJSONObject.has(str)) {
            return null;
        }
        r1$$m r1__m = new r1$$m();
        JSONObject optJSONObject2 = optJSONObject.optJSONObject(str);
        r1__m.f181005a = optJSONObject2.optString(FFmpegMetadataRetriever.METADATA_KEY_TITLE);
        r1__m.f181006b = optJSONObject2.optString("desc");
        return r1__m;
    }

    public static r1$$m p(r1$$n r1__n) {
        if (r1__n == null) {
            return null;
        }
        String applicationLanguage = LocaleUtil.getApplicationLanguage();
        if ("zh_CN".equals(applicationLanguage)) {
            return r1__n.f181008b;
        }
        if ("zh_TW".equals(applicationLanguage)) {
            return r1__n.f181010d;
        }
        if ("zh_HK".equals(applicationLanguage)) {
            return r1__n.f181009c;
        }
        return r1__n.f181011e;
    }

    public static boolean r(String str) {
        Integer num;
        boolean z15;
        boolean z16;
        boolean z17;
        if (((i) j.c(i.class)).zE0(str)) {
            num = (Integer) p3.b().u().f(w1.a.f175420l1, 0);
        } else if (((i) j.c(i.class)).ag()) {
            num = (Integer) p3.b().u().f(w1.a.f175370j1, 0);
        } else {
            num = (Integer) p3.b().u().f(w1.a.f175267f1, 0);
        }
        Integer num2 = (Integer) p3.b().u().f(w1.a.f175293g1, 0);
        if (nf0.u0.m() == 0) {
            z15 = true;
        } else {
            z15 = false;
        }
        if (z15 || ((i) j.c(i.class)).ag()) {
            z16 = true;
        } else {
            z16 = false;
        }
        if (num.intValue() == 1 || num2.intValue() == 1) {
            z17 = true;
        } else {
            z17 = false;
        }
        if (!z17 || !z16) {
            return true;
        }
        return false;
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void A(View view) {
        this.f180969j.C(true, false, false);
        J();
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public boolean B() {
        synchronized (this.f180976q) {
            this.f180974o = true;
        }
        if (!this.f180975p) {
            Log.i("MicroMsg.ChattingFooterEventImpl", "jacks in voice rcd stop but not begin.");
            return false;
        }
        this.f180975p = false;
        this.f180969j.G(false);
        y();
        this.f180960a.C0(ChatFooter$$s1.Cancel);
        AutoPlay W = ((h1) this.f180969j.f342871c.a(h1.class)).W();
        if (W != null) {
            W.f178139f = false;
            W.l();
        }
        ((w0) this.f180969j.f342871c.a(w0.class)).h4(4);
        ((w0) this.f180969j.f342871c.a(w0.class)).q();
        s(1);
        ((h1) this.f180969j.f342871c.a(h1.class)).r5(this.f180969j.f342879k, false);
        return true;
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public boolean C() {
        synchronized (this.f180976q) {
            this.f180974o = true;
        }
        if (!this.f180975p) {
            Log.i("MicroMsg.ChattingFooterEventImpl", "ever never begin.");
            return false;
        }
        this.f180975p = false;
        this.f180969j.G(false);
        this.f180969j.f342879k.enableOptionMenu(true);
        this.f180969j.f342879k.enableBackMenu(true);
        if (this.f180961b.a() != null) {
            this.f180961b.get().e();
            this.f180977r.stopTimer();
            this.f180979t.stopTimer();
        }
        this.f180960a.C0(ChatFooter$$s1.StopRecord);
        AutoPlay W = ((h1) this.f180969j.f342871c.a(h1.class)).W();
        if (W != null) {
            W.f178139f = false;
            W.l();
        }
        ((w0) this.f180969j.f342871c.a(w0.class)).h4(4);
        ((w0) this.f180969j.f342871c.a(w0.class)).q();
        s(1);
        ((h1) this.f180969j.f342871c.a(h1.class)).r5(this.f180969j.f342879k, false);
        return true;
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public boolean D() {
        synchronized (this.f180976q) {
            this.f180974o = true;
        }
        if (!this.f180975p) {
            Log.i("MicroMsg.ChattingFooterEventImpl", "jacks in voice rcd stop but not begin.");
            return false;
        }
        this.f180975p = false;
        this.f180969j.G(false);
        if (!I()) {
            this.f180960a.I0();
            Log.i("MicroMsg.ChattingFooterEventImpl", "record stop on stop request setRcdTooShort");
        } else {
            this.f180960a.setExitType(0);
            ChatFooter chatFooter = this.f180960a;
            if (!chatFooter.U2) {
                if (1 == ((h) j.c(h.class)).Xj0(h.c.Ev, 1)) {
                    SharedPreferences sharedPreferences = MMApplicationContext.getContext().getSharedPreferences(ChatFooter.S4, 0);
                    if (sharedPreferences.getInt("trans2txt_edu_key", 0) == 0) {
                        sharedPreferences.edit().putInt("trans2txt_edu_key", 1).apply();
                        f4 f4Var = new f4();
                        String b15 = chatFooter.f172097c2.b();
                        f4Var.S2(nf0.f4.o(b15));
                        f4Var.i3(b15);
                        f4Var.R2(MMApplicationContext.getContext().getString(R.string.k8z));
                        f4Var.setType(10000);
                        f4Var.c(6);
                        f4Var.Z2(0);
                        ((g4) p3.b().z()).Am0(f4Var);
                    }
                }
            }
            this.f180960a.C0(ChatFooter$$s1.SendVoice);
            ((u14.i) this.f180969j.f342871c.a(u14.i.class)).K0();
            Log.i("MicroMsg.ChattingFooterEventImpl", "record stop on stop request resetRcdStatus");
        }
        AutoPlay W = ((h1) this.f180969j.f342871c.a(h1.class)).W();
        if (W != null) {
            W.f178139f = false;
            W.l();
        }
        ((w0) this.f180969j.f342871c.a(w0.class)).h4(4);
        ((w0) this.f180969j.f342871c.a(w0.class)).q();
        s(1);
        ((h1) this.f180969j.f342871c.a(h1.class)).r5(this.f180969j.f342879k, false);
        return true;
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void E(boolean z15) {
        if (z15) {
            ((w0) this.f180969j.f342871c.a(w0.class)).T();
        } else {
            ((w0) this.f180969j.f342871c.a(w0.class)).q();
        }
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void F() {
        this.f180969j.k().postDelayed(new r1$$j(this), 100);
        J();
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public boolean G(String str, int i15) {
        if (Util.isNullOrNil(str) || i15 <= 0 || vh0.z.o(str) == null) {
            return false;
        }
        vh0.z.w(str, i15, 0);
        u.XN0().e();
        return true;
    }

    /* JADX WARNING: Removed duplicated region for block: B:15:0x005e  */
    public final boolean I() {
        boolean z15;
        this.f180969j.f342879k.enableOptionMenu(true);
        this.f180969j.f342879k.enableBackMenu(true);
        if (this.f180961b.a() != null) {
            if (this.f180961b.get().h()) {
                if (this.f180963d.getUsername().equals("medianote") && (nf0.u0.p() & 16384) == 0) {
                    z15 = true;
                    boolean stop = this.f180961b.get().stop();
                    this.f180977r.stopTimer();
                    this.f180979t.stopTimer();
                    if (z15) {
                        f4 f4Var = new f4();
                        f4Var.i3("medianote");
                        f4Var.setType(34);
                        f4Var.Z2(1);
                        f4Var.Y2(this.f180964e);
                        f4Var.c(2);
                        f4Var.R2(w.c(nf0.u0.r(), (long) this.f180961b.get().g(), false));
                        f4Var.S2(nf0.f4.o("medianote"));
                        if (this.f180961b.get().getVoiceType() == 2) {
                            f4Var.y4("SOURCE_SILK_FILE");
                        }
                        long Am0 = ((g4) p3.b().z()).Am0(f4Var);
                        if (Am0 <= 0) {
                            Log.e("MicroMsg.ChattingFooterEventImpl", "insertLocalMsg fail");
                        } else {
                            Log.i("MicroMsg.ChattingFooterEventImpl", "insertLocalMsg success, msgId = " + Am0);
                        }
                    }
                    MMEntryLock.unlock("keep_app_silent");
                    return stop;
                }
            }
            z15 = false;
            boolean stop2 = this.f180961b.get().stop();
            this.f180977r.stopTimer();
            this.f180979t.stopTimer();
            if (z15) {
            }
            MMEntryLock.unlock("keep_app_silent");
            return stop2;
        }
        Log.i("MicroMsg.ChattingFooterEventImpl", "stopRecording recorder.get() == null");
        return false;
    }

    public final void J() {
        Log.getLogLevel();
        b bVar = this.f180969j;
        bVar.getClass();
        Log.i("MicroMsg.ChattingContext", "[smoothScrollBy] dis:%s duration:%s", 0, 0);
        ChattingUIFragment chattingUIFragment = (ChattingUIFragment) bVar.f342880l;
        chattingUIFragment.getClass();
        Log.i("MicroMsg.ChattingUIFragment", "[smoothScrollBy] dis:%d duration:%d", 0, 0);
        chattingUIFragment.f178326v.smoothScrollBy(0, 0);
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public long a() {
        if (this.f180961b.a() != null) {
            return this.f180961b.get().a();
        }
        return 0;
    }

    public void f() {
        BaseChattingUIFragment baseChattingUIFragment = this.f180969j.f342879k;
        String M = z80.b.M();
        if (!((zw.f) j.c(zw.f.class)).Nu0(baseChattingUIFragment, M, "microMsg." + System.currentTimeMillis() + ".jpg", 201)) {
            ak.a.makeText(this.f180969j.f(), this.f180969j.m().getString(R.string.igw), 1).show();
        }
    }

    public void g() {
        boolean z15;
        boolean M1 = ((d) j.c(d.class)).M1(this.f180969j.f(), "android.permission.CAMERA", 22, "", "");
        Log.i("MicroMsg.ChattingFooterEventImpl", "summerper checkPermission checkCamera[%b], stack[%s], activity[%s]", Boolean.valueOf(M1), Util.getStack(), this.f180969j.f());
        if (M1) {
            boolean M12 = ((d) j.c(d.class)).M1(this.f180969j.f(), "android.permission.RECORD_AUDIO", 22, "", "");
            Log.i("MicroMsg.ChattingFooterEventImpl", "summerper checkPermission checkmicrophone[%b], stack[%s], activity[%s]", Boolean.valueOf(M12), Util.getStack(), this.f180969j.f());
            if (M12) {
                Log.i("MicroMsg.ChattingFooterEventImpl", "onEnterMultiTalk");
                Intent intent = new Intent();
                if (((sd2.z) ph0.d.a()).g(o())) {
                    Log.i("MicroMsg.ChattingFooterEventImpl", "onEnterMultiTalk, but now is in share location!");
                    ak.a.makeText(MMApplicationContext.getContext(), (int) R.string.g16, 0).show();
                    return;
                }
                if (o() != null) {
                    List<String> vc02 = ((com.tencent.mm.plugin.multitalk.model.h) j.c(com.tencent.mm.plugin.multitalk.model.h.class)).vc0(o());
                    String str = (String) p3.b().u().e(2, null);
                    boolean e502 = ((com.tencent.mm.plugin.multitalk.model.h) j.c(com.tencent.mm.plugin.multitalk.model.h.class)).e50(o());
                    Iterator<String> it = vc02.iterator();
                    while (true) {
                        if (!it.hasNext()) {
                            z15 = false;
                            break;
                        }
                        String next = it.next();
                        if (str != null && str.equals(next)) {
                            z15 = true;
                            break;
                        }
                    }
                    if (vc02.size() < hk2.h.e() || z15) {
                        if (z15) {
                            if (((com.tencent.mm.plugin.multitalk.model.h) j.c(com.tencent.mm.plugin.multitalk.model.h.class)).Fq()) {
                                Log.i("MicroMsg.ChattingFooterEventImpl", "onEnterMultiTalk, but already in it!");
                                ak.a.makeText(MMApplicationContext.getContext(), MMApplicationContext.getContext().getString(R.string.h1r), 0).show();
                                return;
                            }
                            Log.i("MicroMsg.ChattingFooterEventImpl", "onEnterMultiTalk, already inlist, but in fact not multitalking now!");
                        }
                        if (((com.tencent.mm.plugin.multitalk.model.h) j.c(com.tencent.mm.plugin.multitalk.model.h.class)).JJ()) {
                            Log.i("MicroMsg.ChattingFooterEventImpl", "onEnterMultiTalk, but already in VoIP or multitalk!");
                            ak.a.makeText(MMApplicationContext.getContext(), MMApplicationContext.getContext().getString(R.string.h1r), 0).show();
                            return;
                        } else if (zk.a.e(this.f180969j.f())) {
                            Log.i("MicroMsg.ChattingFooterEventImpl", "onEnterMultiTalk, but already in appbrand voice!");
                            return;
                        } else if (zk.a.s(this.f180969j.f(), null) || zk.a.l(this.f180969j.f(), true) || zk.a.q(this.f180969j.f(), true)) {
                            return;
                        } else {
                            if (e502) {
                                Log.i("MicroMsg.ChattingFooterEventImpl", "onEnterMultiTalk, but this group already in multitalk, alter take in or not tips!");
                                i14.j.A(this.f180969j.f(), this.f180969j.m().getString(R.string.h38), "", this.f180969j.m().getString(R.string.h1_), this.f180969j.m().getString(R.string.h16), new r1$$c(this), null);
                                return;
                            }
                        }
                    } else {
                        Log.i("MicroMsg.ChattingFooterEventImpl", "onEnterMultiTalk, but > max 9 members!");
                        ak.a.makeText(MMApplicationContext.getContext(), MMApplicationContext.getContext().getString(R.string.h26, hk2.h.e() + ""), 0).show();
                        return;
                    }
                }
                intent.putExtra("chatroomName", o());
                intent.putExtra("key_need_gallery", true);
                intent.putExtra("titile", this.f180969j.m().getString(R.string.h2w));
                sv3.b.j(this.f180969j.f(), "multitalk", ".ui.MultiTalkSelectContactUI", intent, null);
                if (this.f180960a.o0()) {
                    this.f180960a.setBottomPanelVisibility(8);
                }
            }
        }
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public String getFileName() {
        if (this.f180961b.a() != null) {
            return this.f180961b.get().getFileName();
        }
        return "";
    }

    public void h() {
        boolean M1 = ((d) j.c(d.class)).M1(this.f180969j.f(), "android.permission.RECORD_AUDIO", 83, "", "");
        Log.i("MicroMsg.ChattingFooterEventImpl", "summerper checkPermission checkmicrophone[%b], stack[%s], activity[%s]", Boolean.valueOf(M1), Util.getStack(), this.f180969j.f());
        if (M1) {
            if (this.f180960a.o0()) {
                this.f180960a.setBottomPanelVisibility(8);
            }
            VoipEvent voipEvent = new VoipEvent();
            VoipEvent.a aVar = voipEvent.f65043d;
            aVar.f65046b = 5;
            aVar.f65049e = o();
            voipEvent.f65043d.f65048d = this.f180969j.f();
            voipEvent.f65043d.f65050f = 3;
            voipEvent.publish();
            q.INSTANCE.g(11033, 4, 2, 0);
        }
    }

    public void i() {
        boolean M1 = ((d) j.c(d.class)).M1(this.f180969j.f(), "android.permission.CAMERA", 21, "", "");
        Log.i("MicroMsg.ChattingFooterEventImpl", "summerper checkPermission checkCamera[%b], stack[%s], activity[%s]", Boolean.valueOf(M1), Util.getStack(), this.f180969j.f());
        if (M1) {
            boolean M12 = ((d) j.c(d.class)).M1(this.f180969j.f(), "android.permission.RECORD_AUDIO", 21, "", "");
            Log.i("MicroMsg.ChattingFooterEventImpl", "summerper checkPermission checkmicrophone[%b], stack[%s], activity[%s]", Boolean.valueOf(M12), Util.getStack(), this.f180969j.f());
            if (M12) {
                if (this.f180960a.o0()) {
                    this.f180960a.setBottomPanelVisibility(8);
                }
                VoipEvent voipEvent = new VoipEvent();
                VoipEvent.a aVar = voipEvent.f65043d;
                aVar.f65046b = 5;
                aVar.f65049e = o();
                voipEvent.f65043d.f65048d = this.f180969j.f();
                voipEvent.f65043d.f65050f = 2;
                voipEvent.publish();
            }
        }
    }

    public void j() {
        Intent intent = new Intent();
        intent.setClass(this.f180969j.f(), FileSelectorUI.class);
        intent.putExtra("TO_USER", this.f180962c);
        this.f180969j.R(intent, WXWebReporter.WXXWEB_IDKEY_X5_LOAD_URL_MAX_FAILED_TEST_SYS_SUC, new r1$$l(this));
    }

    public void k(int i15) {
        boolean z15;
        boolean z16;
        h.b bVar = h.b.f231610n1;
        a74.f fVar = a74.f.F1;
        boolean M1 = ((d) j.c(d.class)).M1(this.f180969j.f(), "android.permission.CAMERA", 18, "", "");
        Log.i("MicroMsg.ChattingFooterEventImpl", "summerper checkPermission checkCamera[%b], stack[%s], activity[%s]", Boolean.valueOf(M1), Util.getStack(), this.f180969j.f());
        if (M1) {
            q.INSTANCE.g(13822, 1, 1);
            VideoTransPara videoTransPara = new SightParams(1, i15).f132983f;
            RecordConfigProvider e15 = RecordConfigProvider.e(videoTransPara, videoTransPara.f78868h * 1000, 1);
            com.tencent.mm.plugin.sns.statistics.b bVar2 = com.tencent.mm.plugin.sns.statistics.b.f148544a;
            SnsMethodCalculate.markStartTimeMs("getC2CVideoCompositionSwitch", "com.tencent.mm.plugin.sns.statistics.EditorVideoCompositionConfig");
            a74.r rVar = a74.r.f1567a;
            int e16 = rVar.e(a74.f.f1529v1, 0);
            Log.i("MicroMsg.EditorVideoCompositionConfig", "C2CVideoCompositionSwitch repairConfig: " + e16);
            if (e16 == 0) {
                e15.a(2, "com.tencent.mm.plugin.vlog.ui.video.EditorVideoCompositionPluginLayout");
            } else if (e16 == 1) {
                e15.a(2, "com.tencent.mm.plugin.vlog.ui.video.EditorVideoCompositionPluginLayout");
            }
            Bundle bundle = new Bundle();
            bundle.putInt("KEY_TEC_REPORTRemuxHevcEncode_SCENE", 1);
            e15.M = bundle;
            SnsMethodCalculate.markEndTimeMs("getC2CVideoCompositionSwitch", "com.tencent.mm.plugin.sns.statistics.EditorVideoCompositionConfig");
            SnsMethodCalculate.markStartTimeMs("c2cUseCameraKitRecord", "com.tencent.mm.plugin.sns.statistics.EditorVideoCompositionConfig");
            Object a15 = rVar.a(a74.f.f1452b1, 0);
            boolean z17 = m.b(a15, 0) || !m.b(a15, 1);
            SnsMethodCalculate.markEndTimeMs("c2cUseCameraKitRecord", "com.tencent.mm.plugin.sns.statistics.EditorVideoCompositionConfig");
            if (z17) {
                Log.i("MicroMsg.ChattingFooterEventImpl", "useCameraKitRecord");
                int g15 = bVar2.g();
                Log.i("MicroMsg.ChattingFooterEventImpl", "useCameraKitImproveLayout >> %d", Integer.valueOf(g15));
                if (g15 > 0) {
                    if (g15 == 1) {
                        e15.a(0, "com.tencent.mm.plugin.recordvideo.plugin.parent.ImproveCameraKitPluginLayout");
                    } else if (g15 == 2) {
                        e15.a(0, "com.tencent.mm.plugin.recordvideo.plugin.parent.ImproveShieldCameraKitPluginLayout");
                    } else if (g15 == 3) {
                        e15.a(0, "com.tencent.mm.plugin.recordvideo.plugin.professional.ProfessionalCameraKitPluginLayout");
                    } else if (g15 == 4) {
                        e15.a(0, "com.tencent.mm.plugin.recordvideo.plugin.professional.ProfessionalCameraKitPluginLayout");
                        e15.M.putInt("key_camera_light_type", 1);
                    }
                    e15.M.putInt("key_camera_instance", bVar2.d());
                    e15.M.putBoolean("key_record_keep_ratio", true);
                    if (this.f180967h) {
                        e15.M.putInt("key_maas_template_scene", 8);
                    } else {
                        e15.M.putInt("key_maas_template_scene", 6);
                    }
                    e15.a(2, "com.tencent.mm.plugin.vlog.ui.video.improve.ImproveEditorVideoCompositionPluginLayout");
                    int e17 = a74.r.f1567a.e(fVar, 0);
                    if (e17 != 0) {
                        z16 = e17 == 1;
                    } else {
                        z16 = ((h) j.c(h.class)).Lk0(bVar, true);
                    }
                    if (z16) {
                        e15.a(1, "com.tencent.mm.plugin.recordvideo.plugin.improve_photo.ImproveRecordEditPhotoPluginLayout");
                    } else {
                        e15.a(1, "com.tencent.mm.plugin.recordvideo.plugin.parent.RecordEditPhotoPluginLayout");
                    }
                } else {
                    Log.i("MicroMsg.ChattingFooterEventImpl", "no useCameraKitImproveLayout");
                    e15.a(0, CameraKitPluginLayout.class.getName());
                    int e18 = a74.r.f1567a.e(fVar, 0);
                    if (e18 != 0) {
                        z15 = e18 == 1;
                    } else {
                        z15 = ((h) j.c(h.class)).Lk0(bVar, true);
                    }
                    if (z15) {
                        e15.a(1, "com.tencent.mm.plugin.recordvideo.plugin.improve_photo.ImproveBaseEditPhotoLayout");
                    }
                }
                int Xj0 = ((h) j.c(h.class)).Xj0(h.c.Zd, -1);
                int i16 = MultiProcessMMKV.getDefault().getInt("key_record_without_edit", 1);
                Log.i("MicroMsg.C2CRecordStrategy", "guessEditRecord time:" + i16 + " ratio:" + Xj0);
                if (Xj0 < 1) {
                    Xj0 = i16 < 1 ? 5 : 1;
                }
                e15.M.putInt("key_record_bitrate_ratio", Xj0);
                e15.M.putBoolean("key_edit_enable_emoji_search", true);
            }
            if (((h) j.c(h.class)).Lk0(h.c.Vd, false)) {
                e15.f139925d = 2;
            }
            VideoCaptureReportInfo videoCaptureReportInfo = new VideoCaptureReportInfo();
            videoCaptureReportInfo.f139946d = 3;
            if (this.f180967h) {
                videoCaptureReportInfo.f139946d = 4;
            }
            e15.I = videoCaptureReportInfo;
            UICustomParam uICustomParam = new UICustomParam();
            ((HashMap) uICustomParam.f74033h).put("plugin_filter", Boolean.TRUE);
            ((HashMap) uICustomParam.f74033h).put("plugin_poi", true);
            ((HashMap) uICustomParam.f74033h).put("plugin_tip", true);
            ((HashMap) uICustomParam.f74033h).put("plugin_menu", true);
            e15.f139933o = uICustomParam;
            ((ox.m) j.c(ox.m.class)).Lc0((ComponentActivity) this.f180969j.f(), e15, new r1$$d(this));
        }
    }

    public void l() {
        VoipEvent voipEvent = new VoipEvent();
        VoipEvent.a aVar = voipEvent.f65043d;
        aVar.f65046b = 5;
        aVar.f65049e = o();
        voipEvent.f65043d.f65048d = this.f180969j.f();
        voipEvent.f65043d.f65050f = 4;
        if (this.f180960a.o0()) {
            this.f180960a.setBottomPanelVisibility(8);
        }
        voipEvent.publish();
    }

    public void m() {
        VoipEvent voipEvent = new VoipEvent();
        VoipEvent.a aVar = voipEvent.f65043d;
        aVar.f65046b = 5;
        aVar.f65049e = o();
        voipEvent.f65043d.f65048d = this.f180969j.f();
        voipEvent.f65043d.f65050f = 2;
        if (this.f180960a.o0()) {
            this.f180960a.setBottomPanelVisibility(8);
        }
        voipEvent.publish();
    }

    public String o() {
        z1 z1Var = this.f180963d;
        if (z1Var != null && z1.V4(z1Var.getUsername())) {
            return this.f180962c;
        }
        z1 z1Var2 = this.f180963d;
        if (z1Var2 == null) {
            return null;
        }
        return z1Var2.getUsername();
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void onPause() {
        boolean z15;
        if (this.f180961b.a() != null) {
            String fileName = this.f180961b.get().getFileName();
            boolean z16 = true;
            if (!r04.a.f292655b || !m.b(r04.a.f292654a, fileName)) {
                z15 = false;
            } else {
                z15 = true;
            }
            if (!z15) {
                String fileName2 = this.f180961b.get().getFileName();
                if (!r04.a.f292657d || !m.b(r04.a.f292656c, fileName2)) {
                    z16 = false;
                }
                if (!z16) {
                    I();
                }
            }
        }
        this.f180977r.stopTimer();
        this.f180979t.stopTimer();
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void onResume() {
    }

    public void q(Object obj) {
        SightCaptureResult sightCaptureResult;
        if (obj instanceof ox.u) {
            ox.u uVar = (ox.u) obj;
            int i15 = uVar.f279229b;
            if (i15 == -1 && uVar.f279230c == 0) {
                hb3 hb32 = new hb3();
                hb32.f23570e = true;
                hb32.f23569d = false;
                t a15 = uVar.a();
                if (a15.f279224a == v.Photo) {
                    sightCaptureResult = new SightCaptureResult(true, a15.f279225b);
                } else {
                    String r15 = u1.r(a15.f279225b);
                    String str = a15.f279225b;
                    sightCaptureResult = new SightCaptureResult(true, str, a15.f279226c, r15, g.d(str), Math.round((((float) a15.f279227d) * 1.0f) / 1000.0f), hb32);
                }
                RecordMediaReportInfo recordMediaReportInfo = uVar.f279233f;
                if (recordMediaReportInfo != null) {
                    boolean z15 = ((Integer) recordMediaReportInfo.b("KEY_ADD_EMOJI_COUNT_INT", 0)).intValue() != 0;
                    boolean z16 = ((Integer) uVar.f279233f.b("KEY_ADD_TEXT_COUNT_INT", 0)).intValue() != 0;
                    boolean z17 = ((Integer) uVar.f279233f.b("KEY_SELECT_MUSIC_INT", 0)).intValue() != 0;
                    boolean z18 = z15 || z16;
                    Log.i("MicroMsg.C2CRecordStrategy", "updateCurrentRecord stickerEdit:" + z18 + " musicEdit:" + z17);
                    if (z18 || z17) {
                        MultiProcessMMKV.getDefault().putInt("key_record_without_edit", 0);
                    } else {
                        MultiProcessMMKV.getDefault().putInt("key_record_without_edit", MultiProcessMMKV.getDefault().getInt("key_record_without_edit", 1) + 1);
                    }
                }
                Intent intent = new Intent();
                String o15 = o();
                gh.h<String, ArrayList<i0>> hVar = j0.f301313c;
                sightCaptureResult.f132976i = l0.a(o15);
                intent.putExtra("key_req_result", sightCaptureResult);
                this.f180969j.f342879k.onActivityResult(226, uVar.f279229b, intent);
                return;
            }
            this.f180969j.f342879k.onActivityResult(226, i15, new Intent());
        }
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void release() {
    }

    public final void s(int i15) {
        RecordStateChangeEvent recordStateChangeEvent = new RecordStateChangeEvent();
        recordStateChangeEvent.f64171d.f64172a = i15;
        recordStateChangeEvent.publish();
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void t(String str) {
        ((z0) this.f180969j.f342871c.a(z0.class)).t(str);
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public boolean u(String str) {
        Log.getLogLevel();
        this.f180969j.C(true, false, false);
        J();
        return ((z0) this.f180969j.f342871c.a(z0.class)).s0(str);
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void v(View view, MotionEvent motionEvent) {
        if (motionEvent == null || motionEvent.getAction() == 1) {
            this.f180969j.C(true, false, false);
            J();
        }
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public boolean w(String str) {
        if (Util.isNullOrNil(str)) {
            return false;
        }
        vh0.z.s(str);
        u.XN0().e();
        return true;
    }

    /* JADX WARNING: Code restructure failed: missing block: B:42:0x00fa, code lost:
        if (r14.f180969j.f().isFinishing() == false) goto L_0x00fd;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:43:0x00fc, code lost:
        return false;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:45:0x0107, code lost:
        if (r14.f180969j.f().isDestroyed() == false) goto L_0x010a;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:46:0x0109, code lost:
        return false;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:47:0x010a, code lost:
        r14.f180975p = true;
        com.tencent.mm.plugin.transvoice.model.c.f158085v.f158086a = true;
        r14.f180977r.startTimer(100);
        r14.f180978s = false;
        r14.f180979t.startTimer(200);
        r14.f180960a.Q0(r14.f180969j.k().getHeight());
        r2 = ((u14.h1) r14.f180969j.f342871c.a(u14.h1.class)).W();
     */
    /* JADX WARNING: Code restructure failed: missing block: B:48:0x013d, code lost:
        if (r2 == null) goto L_0x0147;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:49:0x013f, code lost:
        r2.f178139f = true;
        r2.s(true);
        r2.h();
     */
    /* JADX WARNING: Code restructure failed: missing block: B:50:0x0147, code lost:
        r14.f180969j.f342879k.enableOptionMenu(false);
        r14.f180969j.f342879k.enableBackMenu(false);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:51:0x015b, code lost:
        if (r14.f180961b.get() == null) goto L_0x01b7;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:52:0x015d, code lost:
        com.tencent.mm.sdk.platformtools.MMEntryLock.lock("keep_app_silent");
        r14.f180960a.setVoiceReactArea(-1);
        r14.f180961b.get().f(o());
        r14.f180964e = r14.f180961b.get().getFileName();
        r14.f180961b.get().d(r14.f180973n);
        r14.f180965f.get().vibrate(50);
        r14.f180969j.A();
        r14.f180969j.C(true, false, false);
        r14.f180961b.get().c(r14.f180972m);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:53:0x01b7, code lost:
        com.tencent.mm.sdk.platformtools.Log.e("MicroMsg.ChattingFooterEventImpl", "startRecording recorder is null and stop recod");
     */
    /* JADX WARNING: Code restructure failed: missing block: B:54:0x01bf, code lost:
        r14.f180969j.G(true);
        ((u14.w0) r14.f180969j.f342871c.a(u14.w0.class)).h4(3);
        ((u14.w0) r14.f180969j.f342871c.a(u14.w0.class)).T();
        s(0);
        ((u14.h1) r14.f180969j.f342871c.a(u14.h1.class)).r5(r14.f180969j.f342879k, true);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:55:0x01f3, code lost:
        return true;
     */
    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public boolean x() {
        boolean z15;
        boolean z16;
        if (zk.a.z(this.f180969j.f()) || zk.a.u(this.f180969j.f()) || zk.a.e(this.f180969j.f())) {
            return false;
        }
        Activity f15 = this.f180969j.f();
        TelephonyManager telephonyManager = (TelephonyManager) f15.getSystemService("phone");
        if (2 == telephonyManager.getCallState() || 1 == telephonyManager.getCallState()) {
            ak.a.makeText(f15, f15.getString(R.string.aqe), 0).show();
            z15 = true;
        } else {
            z15 = false;
        }
        if (z15 || zk.a.s(this.f180969j.f(), null)) {
            return false;
        }
        if (!p3.b().I()) {
            y0.i(this.f180969j.f(), this.f180969j.f342879k.getContentView());
            Log.e("MicroMsg.ChattingFooterEventImpl", "onVoiceRcdStartRequest isSDCardAvailable() failed and return.");
            return false;
        }
        if (!Build.MANUFACTURER.equalsIgnoreCase("meizu")) {
            z16 = true;
        } else {
            z16 = xj.b.a(27);
        }
        if (!z16) {
            i14.j.E(this.f180969j.f(), this.f180969j.m().getString(R.string.f367618yo), this.f180969j.m().getString(R.string.f367548wq), this.f180969j.m().getString(R.string.f367550ws), true, new r1$$g(this));
        }
        synchronized (this.f180976q) {
            this.f180974o = false;
        }
        synchronized (this.f180976q) {
            if (this.f180974o) {
                Log.i("MicroMsg.ChattingFooterEventImpl", "jacks already stop before begin!!");
                return false;
            }
        }
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void y() {
        this.f180969j.f342879k.enableOptionMenu(true);
        this.f180969j.f342879k.enableBackMenu(true);
        if (this.f180961b.a() != null) {
            this.f180961b.get().cancel();
            this.f180977r.stopTimer();
            this.f180979t.stopTimer();
        }
        this.f180960a.C0(ChatFooter$$s1.Cancel);
    }

    @Override // com.tencent.mm.pluginsdk.ui.chat.u0
    public void z(View view) {
        this.f180969j.C(true, false, false);
        J();
    }
}