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


package pf3;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Looper;
import android.text.TextUtils;
import android.view.OrientationEventListener;
import b10.e0;
import b10.x;
import bw3.b43;
import bw3.d65;
import bw3.dc0;
import bw3.gk3;
import com.google.android.gms.common.Scopes;
import com.google.protobuf.l0;
import com.tencent.kinda.framework.widget.tools.ConstantsKinda;
import com.tencent.mars.cdn.CdnLogic;
import com.tencent.mm.R;
import com.tencent.mm.opensdk.constants.Build;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
import com.tencent.mm.opensdk.modelmsg.WXMusicVideoObject;
import com.tencent.mm.plugin.handoff.model.HandOff;
import com.tencent.mm.plugin.ting.TingFlutterActivity;
import com.tencent.mm.plugin.webview.ui.tools.widget.u;
import com.tencent.mm.pluginsdk.model.app.q1;
import com.tencent.mm.protocal.protobuf.FinderContact;
import com.tencent.mm.sdk.coroutines.LifecycleScope;
import com.tencent.mm.sdk.platformtools.BitmapUtil;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.sdk.platformtools.MMHandlerThread;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.sdk.storage.IAutoDBItem;
import com.tencent.mm.sdk.system.AndroidMediaUtil;
import com.tencent.mm.storage.z1;
import com.tencent.mm.vfs.u1;
import com.tencent.pigeon.Ting;
import com.tencent.wechat.aff.ting.TingClientProto;
import com.tencent.wechat.aff.ting.TingProto;
import com.tencent.xweb.updater.XWebUpdater;
import com.tencent.xweb.util.WXWebReporter;
import cu3.v;
import cu3.w;
import d60.z;
import dx.h;
import ed4.d;
import ek4.d0;
import ek4.y;
import gk4.n0;
import gk4.o0;
import ih.v1;
import ih.y1;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.embedding.engine.plugins.activity.ActivityAware;
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
import io.flutter.plugin.common.PluginRegistry;
import java.io.ByteArrayOutputStream;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import jh2.k0;
import kh4.p;
import kotlin.ResultKt;
import lh4.f0;
import lh4.o;
import mg0.b;
import nf0.u0;
import pf3.s0;
import rl2.g0;
import sk1.q;
import sq0.j0;
import t32.e2;
import t32.g2;
import t32.h6;
import wg4.b0;
import wg4.n;
import yf3.b;
import yf3.c;

public final class l implements Ting.TingNativeController, FlutterPlugin, ActivityAware, PluginRegistry.ActivityResultListener {

    /* renamed from: p  reason: collision with root package name */
    public static Ting.TingLaterListenChannel f282874p;

    /* renamed from: d  reason: collision with root package name */
    public Context f282875d;

    /* renamed from: e  reason: collision with root package name */
    public Activity f282876e;

    /* renamed from: f  reason: collision with root package name */
    public final wg4.g f282877f = wg4.h.a(k.f282907d);

    /* renamed from: g  reason: collision with root package name */
    public yf3.b f282878g;

    /* renamed from: h  reason: collision with root package name */
    public OrientationEventListener f282879h;

    /* renamed from: i  reason: collision with root package name */
    public int f282880i = 3004;

    /* renamed from: j  reason: collision with root package name */
    public Ting.Result<Ting.TingFinderContactInfo> f282881j;

    /* renamed from: n  reason: collision with root package name */
    public boolean f282882n;

    /* renamed from: o  reason: collision with root package name */
    public boolean f282883o;

    public static final class a implements b.a {
        @Override // mg0.b.a
        public boolean onGetLocation(boolean z15, float f15, float f16, int i15, double d15, double d16, double d17) {
            ((lt.c) yz3.j.c(lt.c.class)).Zv().d(this);
            return true;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.ting.FlutterTingInteractPlugin$goToProfile$1", f = "FlutterTingInteractPlugin.kt", l = {903}, m = "invokeSuspend")
    public static final class b extends dh4.j implements p<n0, bh4.d<? super b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public int f282884d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ String f282885e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ Context f282886f;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(String str, Context context, bh4.d<? super b> dVar) {
            super(2, dVar);
            this.f282885e = str;
            this.f282886f = context;
        }

        @Override // dh4.a
        public final bh4.d<b0> create(Object obj, bh4.d<?> dVar) {
            return new b(this.f282885e, this.f282886f, dVar);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(n0 n0Var, bh4.d<? super b0> dVar) {
            return ((b) create(n0Var, dVar)).invokeSuspend(b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
            int i15 = this.f282884d;
            if (i15 == 0) {
                ResultKt.throwOnFailure(obj);
                s0.c cVar = s0.f282972u;
                wf3.a aVar2 = s0.f282974w;
                if (aVar2 != null) {
                    this.f282884d = 1;
                    if (aVar2.P4(this) == aVar) {
                        return aVar;
                    }
                }
            } else if (i15 == 1) {
                ResultKt.throwOnFailure(obj);
            } else {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            Log.i("FlutterTingInteractPlugin", "goToProfile userName: " + this.f282885e);
            z1 z1Var = ((k0) z.q(k0.class)).Zx().get(this.f282885e);
            if (z1Var == null) {
                Log.i("FlutterTingInteractPlugin", "goToProfile contact is null");
                return b0.f332794a;
            } else if (!z1Var.z3()) {
                Log.i("FlutterTingInteractPlugin", "goToProfile user is not contact");
                return b0.f332794a;
            } else {
                Intent intent = new Intent();
                intent.putExtra("Contact_User", this.f282885e);
                sv3.b.j(this.f282886f, Scopes.PROFILE, ".ui.ContactInfoUI", intent, null);
                return b0.f332794a;
            }
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.ting.FlutterTingInteractPlugin$gotoBusinessAccountProfile$1", f = "FlutterTingInteractPlugin.kt", l = {244}, m = "invokeSuspend")
    public static final class c extends dh4.j implements p<n0, bh4.d<? super b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public int f282887d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ String f282888e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ Context f282889f;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(String str, Context context, bh4.d<? super c> dVar) {
            super(2, dVar);
            this.f282888e = str;
            this.f282889f = context;
        }

        @Override // dh4.a
        public final bh4.d<b0> create(Object obj, bh4.d<?> dVar) {
            return new c(this.f282888e, this.f282889f, dVar);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(n0 n0Var, bh4.d<? super b0> dVar) {
            return ((c) create(n0Var, dVar)).invokeSuspend(b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
            int i15 = this.f282887d;
            if (i15 == 0) {
                ResultKt.throwOnFailure(obj);
                s0.c cVar = s0.f282972u;
                wf3.a aVar2 = s0.f282974w;
                if (aVar2 != null) {
                    this.f282887d = 1;
                    if (aVar2.P4(this) == aVar) {
                        return aVar;
                    }
                }
            } else if (i15 == 1) {
                ResultKt.throwOnFailure(obj);
            } else {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            Intent intent = new Intent();
            intent.putExtra("Contact_User", this.f282888e);
            intent.putExtra("force_get_contact", true);
            intent.putExtra("key_use_new_contact_profile", true);
            sv3.b.j(this.f282889f, Scopes.PROFILE, ".ui.ContactInfoUI", intent, null);
            return b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.ting.FlutterTingInteractPlugin$gotoFinderDetailWithStartTime$1", f = "FlutterTingInteractPlugin.kt", l = {j0.CTRL_INDEX}, m = "invokeSuspend")
    public static final class d extends dh4.j implements p<n0, bh4.d<? super b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public int f282890d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ Context f282891e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ String f282892f;

        /* renamed from: g  reason: collision with root package name */
        public final /* synthetic */ String f282893g;

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ boolean f282894h;

        /* renamed from: i  reason: collision with root package name */
        public final /* synthetic */ String f282895i;

        /* renamed from: j  reason: collision with root package name */
        public final /* synthetic */ long f282896j;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(Context context, String str, String str2, boolean z15, String str3, long j15, bh4.d<? super d> dVar) {
            super(2, dVar);
            this.f282891e = context;
            this.f282892f = str;
            this.f282893g = str2;
            this.f282894h = z15;
            this.f282895i = str3;
            this.f282896j = j15;
        }

        @Override // dh4.a
        public final bh4.d<b0> create(Object obj, bh4.d<?> dVar) {
            return new d(this.f282891e, this.f282892f, this.f282893g, this.f282894h, this.f282895i, this.f282896j, dVar);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(n0 n0Var, bh4.d<? super b0> dVar) {
            return ((d) create(n0Var, dVar)).invokeSuspend(b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            boolean z15;
            ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
            int i15 = this.f282890d;
            if (i15 == 0) {
                ResultKt.throwOnFailure(obj);
                s0.c cVar = s0.f282972u;
                wf3.a aVar2 = s0.f282974w;
                if (aVar2 != null) {
                    this.f282890d = 1;
                    if (aVar2.P4(this) == aVar) {
                        return aVar;
                    }
                }
            } else if (i15 == 1) {
                ResultKt.throwOnFailure(obj);
            } else {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            e2 e2Var = (e2) yz3.j.c(e2.class);
            Context context = this.f282891e;
            Intent intent = new Intent();
            String str = this.f282892f;
            String str2 = this.f282893g;
            boolean z16 = this.f282894h;
            String str3 = this.f282895i;
            long j15 = this.f282896j;
            intent.putExtra("feed_object_id", m60.d.Q(str));
            intent.putExtra("feed_object_nonceId", m60.d.Q(str2));
            intent.putExtra("key_need_related_list", z16);
            if (z16) {
                intent.putExtra("key_reuqest_scene", 35);
            }
            intent.putExtra("key_session_id", str3);
            if (str3.length() > 0) {
                z15 = true;
            } else {
                z15 = false;
            }
            if (z15) {
                intent.putExtra("allow_pull_top", true);
            }
            e2Var.Vu(context, intent.putExtra("KEY_VIDEO_START_PLAY_TIME_MS", j15));
            return b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.ting.FlutterTingInteractPlugin$gotoFinderFeed$1", f = "FlutterTingInteractPlugin.kt", l = {TingProto.TingReportContext.ACTIONREQUESTID_FIELD_NUMBER}, m = "invokeSuspend")
    public static final class e extends dh4.j implements p<n0, bh4.d<? super b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public int f282897d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ String f282898e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ String f282899f;

        /* renamed from: g  reason: collision with root package name */
        public final /* synthetic */ Context f282900g;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public e(String str, String str2, Context context, bh4.d<? super e> dVar) {
            super(2, dVar);
            this.f282898e = str;
            this.f282899f = str2;
            this.f282900g = context;
        }

        @Override // dh4.a
        public final bh4.d<b0> create(Object obj, bh4.d<?> dVar) {
            return new e(this.f282898e, this.f282899f, this.f282900g, dVar);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(n0 n0Var, bh4.d<? super b0> dVar) {
            return ((e) create(n0Var, dVar)).invokeSuspend(b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
            int i15 = this.f282897d;
            if (i15 == 0) {
                ResultKt.throwOnFailure(obj);
                s0.c cVar = s0.f282972u;
                wf3.a aVar2 = s0.f282974w;
                if (aVar2 != null) {
                    this.f282897d = 1;
                    if (aVar2.P4(this) == aVar) {
                        return aVar;
                    }
                }
            } else if (i15 == 1) {
                ResultKt.throwOnFailure(obj);
            } else {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            Intent intent = new Intent();
            intent.putExtra("feed_object_id", m60.d.Q(this.f282898e));
            intent.putExtra("feed_object_nonceId", m60.d.Q(this.f282899f));
            intent.putExtra("key_reuqest_scene", 35);
            ((e2) yz3.j.c(e2.class)).J10(this.f282900g, intent, true);
            return b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.ting.FlutterTingInteractPlugin$gotoFinderMyProfileAudioTab$1", f = "FlutterTingInteractPlugin.kt", l = {WXWebReporter.WXXWEB_IDKEY_X5_LOAD_URL_MAX_FAILED_TEST_SYS_SUC}, m = "invokeSuspend")
    public static final class f extends dh4.j implements p<n0, bh4.d<? super b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public int f282901d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ Context f282902e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ Ting.TingFinderContactInfo f282903f;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public f(Context context, Ting.TingFinderContactInfo tingFinderContactInfo, bh4.d<? super f> dVar) {
            super(2, dVar);
            this.f282902e = context;
            this.f282903f = tingFinderContactInfo;
        }

        @Override // dh4.a
        public final bh4.d<b0> create(Object obj, bh4.d<?> dVar) {
            return new f(this.f282902e, this.f282903f, dVar);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(n0 n0Var, bh4.d<? super b0> dVar) {
            return ((f) create(n0Var, dVar)).invokeSuspend(b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
            int i15 = this.f282901d;
            if (i15 == 0) {
                ResultKt.throwOnFailure(obj);
                s0.c cVar = s0.f282972u;
                wf3.a aVar2 = s0.f282974w;
                if (aVar2 != null) {
                    this.f282901d = 1;
                    if (aVar2.P4(this) == aVar) {
                        return aVar;
                    }
                }
            } else if (i15 == 1) {
                ResultKt.throwOnFailure(obj);
            } else {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            Context context = this.f282902e;
            Intent intent = new Intent();
            Ting.TingFinderContactInfo tingFinderContactInfo = this.f282903f;
            intent.putExtra("key_enter_profile_tab", 8);
            intent.putExtra("finder_username", tingFinderContactInfo.getUsername());
            intent.putExtra("KEY_FINDER_SELF_FLAG", true);
            ((e2) yz3.j.c(e2.class)).i2(context, intent.putExtra("KEY_DO_NOT_CHECK_ENTER_BIZ_PROFILE", true));
            return b0.f332794a;
        }
    }

    public static final class g implements q1 {
        @Override // com.tencent.mm.pluginsdk.model.app.q1
        public void a(boolean z15, boolean z16) {
            Log.i("FlutterTingInteractPlugin", "launchApplication onLaunchApp launchSuccess: " + z15 + ", launchCancel: " + z16);
        }
    }

    public static final class h extends OrientationEventListener {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ l f282904a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public h(l lVar, Context context) {
            super(context, 3);
            this.f282904a = lVar;
        }

        public void onOrientationChanged(int i15) {
            boolean z15;
            if (i15 < 0 || i15 >= 31) {
                z15 = false;
            } else {
                z15 = true;
            }
            if (z15 || Math.abs(360 - i15) <= 30) {
                l lVar = this.f282904a;
                if (lVar.f282883o && !lVar.f282882n) {
                    lVar.f282883o = false;
                    lVar.a(true, false);
                }
            }
        }
    }

    public static final class i implements h.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ l f282905a;

        public i(l lVar) {
            this.f282905a = lVar;
        }

        @Override // dx.h.a
        public void a(String str, String str2) {
            lh4.m.g(str, "srcPath");
            lh4.m.g(str2, "destPath");
            ak.a.makeText(this.f282905a.b(), this.f282905a.b().getString(R.string.jzm, AndroidMediaUtil.getFriendlySdcardPath(str2)), 1).show();
        }

        @Override // dx.h.a
        public void b(String str, String str2) {
            lh4.m.g(str, "srcPath");
            lh4.m.g(str2, "destPath");
            ak.a.makeText(this.f282905a.b(), this.f282905a.b().getString(R.string.jzl), 1).show();
        }
    }

    public static final class j implements b.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ Ting.Result<Ting.SelectLocalPhotoResult> f282906a;

        public j(Ting.Result<Ting.SelectLocalPhotoResult> result) {
            this.f282906a = result;
        }

        @Override // yf3.b.a
        public void h(int i15, String str) {
            lh4.m.g(str, "msg");
            Ting.Result<Ting.SelectLocalPhotoResult> result = this.f282906a;
            if (result != null) {
                result.success(new Ting.SelectLocalPhotoResult.Builder().setRet(Long.valueOf((long) i15)).setMsg(str).build());
            }
        }

        @Override // yf3.b.a
        public void onSuccess(String str) {
            lh4.m.g(str, ConstantsKinda.INTENT_LITEAPP_PATH);
            Ting.Result<Ting.SelectLocalPhotoResult> result = this.f282906a;
            if (result != null) {
                result.success(new Ting.SelectLocalPhotoResult.Builder().setRet(0L).setPath(str).build());
            }
        }
    }

    public static final class k extends o implements kh4.a<xf3.k> {

        /* renamed from: d  reason: collision with root package name */
        public static final k f282907d = new k();

        public k() {
            super(0);
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // kh4.a
        public xf3.k invoke() {
            return new xf3.k();
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.ting.FlutterTingInteractPlugin$tingJumpRoute$1", f = "FlutterTingInteractPlugin.kt", l = {103}, m = "invokeSuspend")
    /* renamed from: pf3.l$l  reason: collision with other inner class name */
    public static final class C4550l extends dh4.j implements p<n0, bh4.d<? super b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public int f282908d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ Context f282909e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ String f282910f;

        /* renamed from: g  reason: collision with root package name */
        public final /* synthetic */ String f282911g;

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ Intent f282912h;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public C4550l(Context context, String str, String str2, Intent intent, bh4.d<? super C4550l> dVar) {
            super(2, dVar);
            this.f282909e = context;
            this.f282910f = str;
            this.f282911g = str2;
            this.f282912h = intent;
        }

        @Override // dh4.a
        public final bh4.d<b0> create(Object obj, bh4.d<?> dVar) {
            return new C4550l(this.f282909e, this.f282910f, this.f282911g, this.f282912h, dVar);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(n0 n0Var, bh4.d<? super b0> dVar) {
            return ((C4550l) create(n0Var, dVar)).invokeSuspend(b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
            int i15 = this.f282908d;
            if (i15 == 0) {
                ResultKt.throwOnFailure(obj);
                s0.c cVar = s0.f282972u;
                wf3.a aVar2 = s0.f282974w;
                if (aVar2 != null) {
                    this.f282908d = 1;
                    if (aVar2.P4(this) == aVar) {
                        return aVar;
                    }
                }
            } else if (i15 == 1) {
                ResultKt.throwOnFailure(obj);
            } else {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            sv3.b.j(this.f282909e, this.f282910f, this.f282911g, this.f282912h, null);
            return b0.f332794a;
        }
    }

    public static final class m implements c.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ Ting.Result<Ting.UploadLocalPhotoResult> f282913a;

        public m(Ting.Result<Ting.UploadLocalPhotoResult> result) {
            this.f282913a = result;
        }

        @Override // yf3.c.a
        public void h(int i15, String str) {
            lh4.m.g(str, "msg");
            Ting.Result<Ting.UploadLocalPhotoResult> result = this.f282913a;
            if (result != null) {
                result.success(new Ting.UploadLocalPhotoResult.Builder().setRet(Long.valueOf((long) i15)).setMsg(str).build());
            }
        }

        @Override // yf3.c.a
        public void onSuccess(String str) {
            lh4.m.g(str, "url");
            Ting.Result<Ting.UploadLocalPhotoResult> result = this.f282913a;
            if (result != null) {
                result.success(new Ting.UploadLocalPhotoResult.Builder().setRet(0L).setCdnUrl(str).build());
            }
        }
    }

    public void a(boolean z15, boolean z16) {
        TingFlutterActivity tingFlutterActivity = null;
        if (z15) {
            j0.e("allow rotate", "FlutterTingInteractPlugin");
            Activity activity = this.f282876e;
            if (activity instanceof TingFlutterActivity) {
                tingFlutterActivity = (TingFlutterActivity) activity;
            }
            if (tingFlutterActivity != null) {
                tingFlutterActivity.setRequestedOrientation(4);
            }
            int i15 = TingFlutterActivity.f157465u;
            TingFlutterActivity.f157465u = 4;
            this.f282882n = true;
            return;
        }
        j0.e("disallow rotate", "FlutterTingInteractPlugin");
        Activity activity2 = this.f282876e;
        if (activity2 instanceof TingFlutterActivity) {
            tingFlutterActivity = (TingFlutterActivity) activity2;
        }
        if (tingFlutterActivity != null) {
            tingFlutterActivity.setRequestedOrientation(1);
        }
        int i16 = TingFlutterActivity.f157465u;
        TingFlutterActivity.f157465u = 1;
        this.f282882n = false;
        this.f282883o = z16;
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public /* bridge */ /* synthetic */ void allowRotate(Boolean bool, Boolean bool2) {
        a(bool.booleanValue(), bool2.booleanValue());
    }

    public final Context b() {
        Activity activity = this.f282876e;
        if (activity != null) {
            return activity;
        }
        Context context = this.f282875d;
        if (context != null) {
            return context;
        }
        Context context2 = MMApplicationContext.getContext();
        lh4.m.f(context2, "getContext()");
        return context2;
    }

    public final xf3.k c() {
        return (xf3.k) ((n) this.f282877f).getValue();
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public Boolean canShowHandOffOpenCommandItem(byte[] bArr) {
        lh4.m.g(bArr, "tingItemData");
        TingProto.MMListenItem listenItem = TingClientProto.TingItem.parseFrom(bArr).getListenItem();
        boolean z15 = true;
        boolean z16 = false;
        if (!(listenItem != null && listenItem.getType() == 100)) {
            Log.e("FlutterTingInteractPlugin", "canShowHandOffOpenCommandItem not file type");
        } else {
            if (!((ya2.c) yz3.j.c(ya2.c.class)).AO() || ((ya2.c) yz3.j.c(ya2.c.class)).dW() == null) {
                z15 = false;
            }
            z16 = z15;
        }
        return Boolean.valueOf(z16);
    }

    public void d(String str, long j15) {
        lh4.m.g(str, "url");
        Intent intent = new Intent();
        intent.putExtra("rawUrl", str);
        intent.putExtra("convertActivityFromTranslucent", true);
        b0 b0Var = b0.f332794a;
        f("webview", ".ui.tools.WebViewUI", intent);
    }

    public void e(String str, String str2, boolean z15, String str3, long j15) {
        lh4.m.g(str, "tid");
        lh4.m.g(str2, "nonceId");
        lh4.m.g(str3, "sessionId");
        j0.c("gotoFinderDetail tid:" + str + ", nonceId:" + str2 + ", needGetRelatedList: " + z15 + ", sessionId: " + str3 + ", startTime:" + j15, "FlutterTingInteractPlugin");
        Context context = this.f282876e;
        if (context == null) {
            context = b();
        }
        gk4.h.d(o0.b(), null, null, new d(context, str, str2, z15, str3, j15, null), 3, null);
    }

    public final void f(String str, String str2, Intent intent) {
        Context context = this.f282876e;
        if (context == null) {
            context = b();
        }
        gk4.h.d(o0.b(), null, null, new C4550l(context, str, str2, intent, null), 3, null);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void followBrandAccount(String str, Boolean bool, Long l15, String str2, String str3, String str4, Ting.Result result) {
        boolean booleanValue = bool.booleanValue();
        lh4.m.g(str, "username");
        lh4.m.g(result, "tingResult");
        j0.e("followBrandAccount, username:" + str + ", scene:" + l15 + ", isCancel:" + booleanValue, "FlutterTingInteractPlugin");
        cu3.a aVar = new cu3.a();
        aVar.f193992a = str2;
        int i15 = 0;
        aVar.f193993b = l15 != null ? (int) l15.longValue() : 0;
        aVar.f193994c = str3;
        aVar.f193995d = str4;
        aVar.f193998g = false;
        v vVar = (v) yz3.j.c(v.class);
        Context b15 = b();
        if (l15 != null) {
            i15 = (int) l15.longValue();
        }
        MMHandlerThread.postToMainThread(new j(vVar.Hb(b15, str, i15, new k(result), aVar)));
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void followFinderAccount(String str, Boolean bool, Ting.Result result) {
        bool.booleanValue();
        lh4.m.g(str, "username");
        lh4.m.g(result, "result");
        try {
            ((g2) yz3.j.c(g2.class)).lo(str, 1, 0L, false, 1200001);
            result.success(Boolean.TRUE);
        } catch (Exception e15) {
            Log.e("FlutterTingInteractPlugin", "doFollowFinder exp=" + e15);
            result.success(Boolean.FALSE);
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public Ting.ThirdAppInfo get3rdAppInfo(String str) {
        boolean z15;
        com.tencent.mm.pluginsdk.model.app.j appInfo;
        lh4.m.g(str, "appId");
        if (str.length() == 0) {
            z15 = true;
        } else {
            z15 = false;
        }
        if (z15 || (appInfo = ((ln.l) yz3.j.c(ln.l.class)).getAppInfo(str)) == null) {
            return null;
        }
        Ting.ThirdAppInfo.Builder appId = new Ting.ThirdAppInfo.Builder().setAppId(str);
        String str2 = appInfo.field_appName;
        String str3 = "";
        if (str2 == null) {
            str2 = str3;
        }
        Ting.ThirdAppInfo.Builder name = appId.setName(str2);
        lh4.m.f(name, "Builder().setAppId(appId…Info.field_appName ?: \"\")");
        Bitmap Pc = ((ln.l) yz3.j.c(ln.l.class)).Pc(str, 1, gy3.a.g(b()));
        if (Pc != null) {
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
            Pc.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
            Log.i("FlutterTingInteractPlugin", "recycle bitmap:%s", Pc);
            Pc.recycle();
            byte[] byteArray = byteArrayOutputStream.toByteArray();
            lh4.m.f(byteArray, "output.toByteArray()");
            try {
                byteArrayOutputStream.close();
            } catch (Exception e15) {
                Log.printErrStackTrace("FlutterTingInteractPlugin", e15, str3, new Object[0]);
            }
            name.setIconData(byteArray).setGrayIconData(byteArray);
        } else {
            String str4 = appInfo.field_appIconUrl;
            if (str4 != null) {
                str3 = str4;
            }
            name.setIconUrl(str3);
        }
        return name.build();
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public Ting.TingBrandContactInfo getBrandContactInfo(String str) {
        lh4.m.g(str, "username");
        z1 z1Var = ((k0) z.q(k0.class)).Zx().get(str);
        Ting.TingBrandContactInfo tingBrandContactInfo = new Ting.TingBrandContactInfo();
        tingBrandContactInfo.setUsername(str);
        boolean z15 = true;
        if (z1Var == null || !z1Var.z3()) {
            z15 = false;
        }
        tingBrandContactInfo.setIsSubscribe(Boolean.valueOf(z15));
        return tingBrandContactInfo;
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public Ting.TingFinderContactInfo getFinderAccountInfo() {
        boolean z15;
        Ting.TingFinderContactInfo tingFinderContactInfo = new Ting.TingFinderContactInfo();
        tingFinderContactInfo.setUsername(((tr.b) yz3.j.c(tr.b.class)).C2(b()));
        h6 L = ((e2) yz3.j.c(e2.class)).S7().L(tingFinderContactInfo.getUsername());
        String nickname = L.getNickname();
        String str = "";
        if (nickname == null) {
            nickname = str;
        }
        tingFinderContactInfo.setNickname(nickname);
        String avatarUrl = L.getAvatarUrl();
        if (avatarUrl != null) {
            str = avatarUrl;
        }
        tingFinderContactInfo.setHeadImageUrl(str);
        String username = tingFinderContactInfo.getUsername();
        if (username == null || y.n(username)) {
            z15 = true;
        } else {
            z15 = false;
        }
        if (z15) {
            return null;
        }
        return tingFinderContactInfo;
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void getFinderContactInfo(String str, Ting.Result<Ting.TingFinderContactInfo> result) {
        String str2;
        String str3;
        lh4.m.g(str, "userName");
        Ting.TingFinderContactInfo tingFinderContactInfo = new Ting.TingFinderContactInfo();
        FinderContact w65 = ((e2) yz3.j.c(e2.class)).w6(str);
        tingFinderContactInfo.setUsername(str);
        boolean z15 = false;
        if (w65 != null) {
            int i15 = w65.followFlag;
            IAutoDBItem.MAutoDBInfo mAutoDBInfo = q.f302446h2;
            if (i15 == q.f302448j2) {
                z15 = true;
            }
        }
        tingFinderContactInfo.setIsFollow(Boolean.valueOf(z15));
        String str4 = "";
        if (w65 == null || (str2 = w65.nickname) == null) {
            str2 = str4;
        }
        tingFinderContactInfo.setNickname(str2);
        if (!(w65 == null || (str3 = w65.headUrl) == null)) {
            str4 = str3;
        }
        tingFinderContactInfo.setHeadImageUrl(str4);
        if (result != null) {
            result.success(tingFinderContactInfo);
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public Long getIdentityType() {
        long j15;
        if (((ur.o) yz3.j.c(ur.o.class)).t70() == 2) {
            j15 = 2;
        } else {
            j15 = 3;
        }
        return Long.valueOf(j15);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public Ting.TingPoiInfo getPoiInfo() {
        Ting.TingPoiInfo tingPoiInfo = new Ting.TingPoiInfo();
        String str = null;
        Object e15 = z.s().i().e(67591, null);
        if (e15 instanceof String) {
            str = (String) e15;
        }
        if (!Util.isNullOrNil(str)) {
            try {
                lh4.m.d(str);
                String[] strArr = (String[]) d0.X(str, new String[]{","}, false, 0, 6, null).toArray(new String[0]);
                Integer valueOf = Integer.valueOf(strArr[0]);
                tingPoiInfo.setLatitude(Double.valueOf((double) (((float) Integer.valueOf(strArr[2]).intValue()) / 1000000.0f)));
                tingPoiInfo.setLongitude(Double.valueOf((double) (((float) Integer.valueOf(strArr[3]).intValue()) / 1000000.0f)));
                tingPoiInfo.setPrecision(Double.valueOf((double) valueOf.intValue()));
            } catch (Exception e16) {
                Log.e("FlutterTingInteractPlugin", "getCurrentGPSData parse value error.", e16);
            }
        } else {
            Log.i("FlutterTingInteractPlugin", "lbs location is null, no cached data!");
        }
        ((lt.c) yz3.j.c(lt.c.class)).Zv().b(new a(), true);
        return tingPoiInfo;
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public String getWxUsername() {
        String r15 = u0.r();
        lh4.m.f(r15, "getUsernameFromUserInfo()");
        return r15;
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void goToCreateFinderAccount(String str, Ting.Result<Ting.TingFinderContactInfo> result) {
        this.f282881j = result;
        e2 e2Var = (e2) yz3.j.c(e2.class);
        Context b15 = b();
        if (str == null) {
            str = "";
        }
        e2Var.C6(b15, str, this.f282880i);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void goToLiteApp(String str, String str2, String str3) {
        lh4.m.g(str, "appId");
        lh4.m.g(str2, ConstantsKinda.INTENT_LITEAPP_PATH);
        lh4.m.g(str3, "query");
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void goToProfile(String str) {
        lh4.m.g(str, "userName");
        Context context = this.f282876e;
        if (context == null) {
            context = b();
        }
        gk4.h.d(o0.b(), null, null, new b(str, context, null), 3, null);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void goToQQMusicPayment(String str, String str2) {
        lh4.m.g(str, "appId");
        lh4.m.g(str2, "mid");
        Context b15 = b();
        bh0.n nVar = new bh0.n();
        nVar.f12717t = str;
        new rf3.a(str, str2).h().E(new p0(b15, nVar));
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public /* bridge */ /* synthetic */ void goToWebPage(String str, Long l15) {
        d(str, l15.longValue());
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void gotoAppInstallPage(String str) {
        String str2;
        lh4.m.g(str, "appId");
        if (lh4.m.b("wx5aa333606550dfd5", str)) {
            str2 = "https://y.qq.com/m/download/index.html?channelId=2005000732";
        } else if (lh4.m.b("wx8dd6ecd81906fd84", str)) {
            str2 = "https://a.app.qq.com/o/simple.jsp?pkgname=com.netease.cloudmusic";
        } else if (lh4.m.b("wx79f2c4418704b4f8", str)) {
            str2 = "https://a.app.qq.com/o/simple.jsp?pkgname=com.kugou.android";
        } else if (lh4.m.b("wxc305711a2a7ad71c", str)) {
            str2 = "https://a.app.qq.com/o/simple.jsp?pkgname=cn.kuwo.player";
        } else {
            str2 = "";
        }
        Log.i("FlutterTingInteractPlugin", "gotoAppInstallPage appId: " + str + ", url: %s", str2);
        d(str2, -1);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void gotoBusinessAccountProfile(String str) {
        lh4.m.g(str, "userName");
        if (!(str.length() == 0)) {
            j0.e("gotoBusinessAccountProfile, userName: " + str, "FlutterTingInteractPlugin");
            Context context = this.f282876e;
            if (context == null) {
                context = b();
            }
            gk4.h.d(o0.b(), null, null, new c(str, context, null), 3, null);
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void gotoBusinessArticle(String str) {
        lh4.m.g(str, "url");
        Intent intent = new Intent();
        intent.putExtra("rawUrl", str);
        intent.putExtra("forceHideShare", true);
        Intent putExtra = intent.putExtra("convertActivityFromTranslucent", true);
        lh4.m.f(putExtra, "putExtra(ConstantsUI.Web…ityFromTranslucent, true)");
        f("webview", ".ui.tools.WebViewUI", putExtra);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void gotoFinderAccountProfile(String str, Long l15) {
        long longValue = l15.longValue();
        lh4.m.g(str, "userName");
        j0.e("gotoFinderAccountProfile userName:" + str + " tabType=" + longValue, "FlutterTingInteractPlugin");
        Context context = this.f282876e;
        if (context == null) {
            context = b();
        }
        gk4.h.d(o0.b(), null, null, new m(context, longValue, str, null), 3, null);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void gotoFinderDetail(String str, String str2, Boolean bool, String str3) {
        boolean booleanValue = bool.booleanValue();
        lh4.m.g(str, "tid");
        lh4.m.g(str2, "nonceId");
        lh4.m.g(str3, "sessionId");
        e(str, str2, booleanValue, str3, 0);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public /* bridge */ /* synthetic */ void gotoFinderDetailWithStartTime(String str, String str2, Boolean bool, String str3, Long l15) {
        e(str, str2, bool.booleanValue(), str3, l15.longValue());
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void gotoFinderFeed(String str, String str2, String str3) {
        lh4.m.g(str, "tid");
        lh4.m.g(str2, "nonceId");
        lh4.m.g(str3, "sessionId");
        Log.i("FlutterTingInteractPlugin", "gotoFinderFeed tid: " + str + ", nonceId: " + str2 + ", sessionId: " + str3);
        Context context = this.f282876e;
        if (context == null) {
            context = b();
        }
        gk4.h.d(o0.b(), null, null, new e(str, str2, context, null), 3, null);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void gotoFinderLive(String str, String str2) {
        lh4.m.g(str, "tid");
        lh4.m.g(str2, "nonceId");
        Context context = this.f282876e;
        if (context == null) {
            context = b();
        }
        b43 b432 = new b43();
        b432.f16919d = Util.getUnsignedLong(str, 0);
        b432.f16921f = str2;
        b0 b0Var = b0.f332794a;
        dc0 dc02 = new dc0();
        dc02.f19159d = "";
        dc02.f19160e = "";
        dc02.f19162g = -1;
        dc02.f19163h = -1;
        ((jb4.g) yz3.j.c(jb4.g.class)).Bn(context, null, b432, true, dc02, null);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void gotoFinderMyProfileAudioTab(Ting.TingFinderContactInfo tingFinderContactInfo) {
        if (tingFinderContactInfo == null) {
            j0.e("gotoFinderMyProfileAudioTab contactInfo is null", "FlutterTingInteractPlugin");
            return;
        }
        j0.e("gotoFinderMyProfileAudioTab userName:" + tingFinderContactInfo.getUsername(), "FlutterTingInteractPlugin");
        Context context = this.f282876e;
        if (context == null) {
            context = b();
        }
        gk4.h.d(o0.b(), null, null, new f(context, tingFinderContactInfo, null), 3, null);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public /* bridge */ /* synthetic */ void inPlayer(Boolean bool) {
        bool.booleanValue();
    }

    /* JADX WARNING: Removed duplicated region for block: B:18:0x0077  */
    /* JADX WARNING: Removed duplicated region for block: B:19:0x0079  */
    @Override // com.tencent.pigeon.Ting.TingNativeController
    public Boolean isAppInstalled(String str, String str2) {
        boolean z15;
        boolean z16;
        boolean z17;
        boolean z18;
        lh4.m.g(str, "appId");
        lh4.m.g(str2, "scheme");
        Log.i("FlutterTingInteractPlugin", "isAppInstalled appId: " + str + ", scheme: " + str2);
        boolean z19 = true;
        if (str2.length() == 0) {
            z15 = true;
        } else {
            z15 = false;
        }
        if (!z15) {
            try {
                List<ResolveInfo> queryIntentActivities = Util.queryIntentActivities(b(), new Intent("android.intent.action.VIEW", Uri.parse(str2)));
                if (queryIntentActivities == null || queryIntentActivities.isEmpty()) {
                    z18 = true;
                } else {
                    z18 = false;
                }
                z16 = !z18;
            } catch (Throwable th5) {
                Log.printErrStackTrace("FlutterTingInteractPlugin", th5, "isAppInstalled exception", new Object[0]);
            }
            Log.i("FlutterTingInteractPlugin", "isAppInstalled ret: " + z16);
            if (!z16) {
                z19 = z16;
            } else {
                String str3 = ((ln.l) yz3.j.c(ln.l.class)).getAppInfo(str).field_packageName;
                if (str3 == null) {
                    str3 = "";
                }
                Log.i("FlutterTingInteractPlugin", "isAppInstalled packageName: " + str3);
                if (str3.length() > 0) {
                    z17 = true;
                } else {
                    z17 = false;
                }
                if (!z17 || !com.tencent.mm.pluginsdk.model.app.j0.f(b(), str3)) {
                    Log.w("FlutterTingInteractPlugin", "isAppInstalled not install, appId: " + str);
                    z19 = false;
                }
            }
            return Boolean.valueOf(z19);
        }
        z16 = false;
        Log.i("FlutterTingInteractPlugin", "isAppInstalled ret: " + z16);
        if (!z16) {
        }
        return Boolean.valueOf(z19);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void launchApplication(String str, String str2) {
        lh4.m.g(str, "appId");
        lh4.m.g(str2, "scheme");
        try {
            Log.i("FlutterTingInteractPlugin", "launchApplication appId: " + str + ", scheme: " + str2);
            ((ln.l) yz3.j.c(ln.l.class)).GO(b(), new Intent("android.intent.action.VIEW", Uri.parse(str2)), ((ln.l) yz3.j.c(ln.l.class)).M5(b(), str), 2, new g(), null);
        } catch (Throwable th5) {
            Log.printErrStackTrace("FlutterTingInteractPlugin", th5, "launchApplication exception", new Object[0]);
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void launchApplicationWithUrl(String str, String str2, String str3, Boolean bool) {
        boolean booleanValue = bool.booleanValue();
        lh4.m.g(str, "appId");
        lh4.m.g(str2, "scheme");
        lh4.m.g(str3, "url");
        Log.i("FlutterTingInteractPlugin", "launchApplicationWithUrl appId: " + str + ", scheme: " + str2);
        ((ln.l) yz3.j.c(ln.l.class)).GO(b(), new Intent("android.intent.action.VIEW", Uri.parse(str2)), ((ln.l) yz3.j.c(ln.l.class)).M5(b(), str), 2, new n(booleanValue, this, str, str3), null);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void markPlayTaskInFullScreenPlayerMode() {
        ((y1) yz3.j.c(y1.class)).JC().l();
    }

    /* JADX WARNING: Removed duplicated region for block: B:101:0x0260  */
    /* JADX WARNING: Removed duplicated region for block: B:104:0x0266 A[RETURN] */
    /* JADX WARNING: Removed duplicated region for block: B:105:0x0267 A[RETURN] */
    /* JADX WARNING: Removed duplicated region for block: B:84:0x01ee  */
    /* JADX WARNING: Removed duplicated region for block: B:86:0x01f3  */
    @Override // io.flutter.plugin.common.PluginRegistry.ActivityResultListener
    public boolean onActivityResult(int i15, int i16, Intent intent) {
        boolean z15;
        boolean z16;
        boolean z17;
        Bitmap bitmap;
        Throwable th5;
        String str;
        String str2;
        Bitmap bitmap2 = null;
        ArrayList<String> arrayList = null;
        if (i15 == this.f282880i) {
            j0.e("onActivityResult createFinderRequestCode req is " + this.f282880i + " result is " + i16, "FlutterTingInteractPlugin onActivityResult");
            if (i16 == 1) {
                StringBuilder sb5 = new StringBuilder();
                sb5.append("onActivityResult createFinderRequestCode ");
                if (intent != null) {
                    str = intent.getStringExtra("KEY_FINDER_USERNAME_SELF");
                } else {
                    str = null;
                }
                sb5.append(str);
                j0.e(sb5.toString(), "FlutterTingInteractPlugin onActivityResult");
                if (intent != null) {
                    str2 = intent.getStringExtra("KEY_FINDER_USERNAME_SELF");
                } else {
                    str2 = null;
                }
                Ting.Result<Ting.TingFinderContactInfo> result = this.f282881j;
                if (result != null) {
                    Ting.TingFinderContactInfo build = new Ting.TingFinderContactInfo.Builder().build();
                    build.setUsername(str2);
                    result.success(build);
                }
            } else {
                Ting.Result<Ting.TingFinderContactInfo> result2 = this.f282881j;
                if (result2 != null) {
                    result2.error(new Exception("createOver"));
                }
            }
        }
        boolean z18 = false;
        if (i15 == 1001) {
            if (i16 == -1) {
                if (intent != null) {
                    arrayList = intent.getStringArrayListExtra("SendMsgUsernames");
                }
                if (arrayList == null || arrayList.isEmpty()) {
                    z18 = true;
                }
                if (!z18) {
                    Util.listToString(arrayList, ";");
                }
            }
            return true;
        } else if (i15 == 1004) {
            return true;
        } else {
            if (i15 == 1002) {
                if (i16 == -1) {
                    ak.a.makeText(b(), b().getResources().getString(R.string.j3v), 0).show();
                }
                return true;
            } else if (i15 == 1005) {
                if (i16 == -1) {
                    ak.a.makeText(b(), b().getResources().getString(R.string.j3v), 0).show();
                }
                return true;
            } else if (i15 == 1003) {
                return true;
            } else {
                if (i15 == 2) {
                    z15 = false;
                    ((jn.c) yz3.j.c(jn.c.class)).Me(this.f282876e, i15, i16, intent, true, R.string.brq, R.string.brr, 15);
                } else {
                    z15 = false;
                }
                yf3.b bVar = this.f282878g;
                if (bVar != null) {
                    if (i15 != 10) {
                        if (i15 != 11) {
                            z17 = z15;
                            if (z17) {
                                z16 = true;
                                if (!z16) {
                                    return true;
                                }
                                return z15;
                            }
                        } else if (i16 != -1 || intent == null) {
                            b.a aVar = bVar.f345740a;
                            if (aVar != null) {
                                aVar.h(i16, "crop photo fail; resultCode:" + i16);
                            }
                        } else {
                            String stringExtra = intent.getStringExtra("CropImage_OutputPath");
                            j0.e("cropped imagePath:" + stringExtra, bVar.f345742c);
                            if (stringExtra == null) {
                                b.a aVar2 = bVar.f345740a;
                                if (aVar2 != null) {
                                    aVar2.h(-1, "cropped imagePath is null");
                                }
                            } else {
                                try {
                                    bitmap = BitmapUtil.getBitmapNative(stringExtra);
                                    try {
                                        int width = bitmap.getWidth();
                                        j0.e("cropped bitmap width:" + width + ", height:" + bitmap.getHeight(), bVar.f345742c);
                                        if (width > 1080) {
                                            float f15 = 1080.0f / ((float) width);
                                            bitmap2 = BitmapUtil.scaleBitmap(bitmap, f15, f15);
                                            j0.e("scaled bitmap width:" + bitmap2.getWidth() + ", height:" + bitmap2.getHeight(), bVar.f345742c);
                                            stringExtra = com.tencent.mm.ui.tools.o.c(bc2.a.a(), bitmap2);
                                            StringBuilder sb6 = new StringBuilder();
                                            sb6.append("scaled bitmap path:");
                                            sb6.append(stringExtra);
                                            j0.e(sb6.toString(), bVar.f345742c);
                                            if (stringExtra == null) {
                                                b.a aVar3 = bVar.f345740a;
                                                if (aVar3 != null) {
                                                    aVar3.h(-1, "save scaled bitmap error");
                                                }
                                                bitmap2.recycle();
                                                bitmap.recycle();
                                            }
                                        }
                                        if (bitmap2 != null) {
                                            bitmap2.recycle();
                                        }
                                        bitmap.recycle();
                                        b.a aVar4 = bVar.f345740a;
                                        if (aVar4 != null) {
                                            aVar4.onSuccess(stringExtra);
                                        }
                                    } catch (Throwable th6) {
                                        th5 = th6;
                                        if (0 != 0) {
                                            bitmap2.recycle();
                                        }
                                        if (bitmap != null) {
                                            bitmap.recycle();
                                        }
                                        throw th5;
                                    }
                                } catch (Throwable th7) {
                                    th5 = th7;
                                    bitmap = null;
                                    if (0 != 0) {
                                    }
                                    if (bitmap != null) {
                                    }
                                    throw th5;
                                }
                            }
                        }
                    } else if (i16 != -1 || intent == null) {
                        b.a aVar5 = bVar.f345740a;
                        if (aVar5 != null) {
                            aVar5.h(i16, "select photo fail; resultCode:" + i16);
                        }
                    } else {
                        Activity activity = bVar.f345741b.get();
                        if (activity != null) {
                            Intent intent2 = new Intent();
                            intent2.putExtra("CropImage_aspect_ratio", 1.0f);
                            intent2.putExtra("CropImageMode", 1);
                            intent2.setClassName(activity, "com.tencent.mm.plugin.gallery.picker.view.ImageCropUI");
                            com.tencent.mm.ui.tools.o.a(activity, intent, intent2, bc2.a.a(), 11, null);
                        }
                    }
                    z17 = true;
                    if (z17) {
                    }
                }
                z16 = z15;
                if (!z16) {
                }
            }
        }
    }

    @Override // io.flutter.embedding.engine.plugins.activity.ActivityAware
    public void onAttachedToActivity(ActivityPluginBinding activityPluginBinding) {
        lh4.m.g(activityPluginBinding, "binding");
        Log.i("FlutterTingInteractPlugin", "onAttachedToActivity");
        this.f282876e = activityPluginBinding.getActivity();
        activityPluginBinding.addActivityResultListener(this);
        if (this.f282876e instanceof TingFlutterActivity) {
            a(this.f282882n, false);
        }
        h hVar = new h(this, b());
        this.f282879h = hVar;
        hVar.enable();
    }

    @Override // io.flutter.embedding.engine.plugins.FlutterPlugin
    public void onAttachedToEngine(FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
        lh4.m.g(flutterPluginBinding, "p0");
        this.f282875d = flutterPluginBinding.getApplicationContext();
        Ting.TingNativeController.CC.b0(flutterPluginBinding.getBinaryMessenger(), this);
        new Ting.TingMusicBottomSheetUtils(flutterPluginBinding.getBinaryMessenger());
        f282874p = new Ting.TingLaterListenChannel(flutterPluginBinding.getBinaryMessenger());
    }

    @Override // io.flutter.embedding.engine.plugins.activity.ActivityAware
    public void onDetachedFromActivity() {
        Log.i("FlutterTingInteractPlugin", "onDetachedFromActivity");
        this.f282876e = null;
        OrientationEventListener orientationEventListener = this.f282879h;
        if (orientationEventListener != null) {
            orientationEventListener.disable();
        }
        this.f282879h = null;
        e0 e0Var = (e0) yz3.j.c(e0.class);
        if (e0Var != null) {
            e0Var.clear();
        }
    }

    @Override // io.flutter.embedding.engine.plugins.activity.ActivityAware
    public void onDetachedFromActivityForConfigChanges() {
        this.f282876e = null;
    }

    @Override // io.flutter.embedding.engine.plugins.FlutterPlugin
    public void onDetachedFromEngine(FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
        lh4.m.g(flutterPluginBinding, "p0");
        Ting.TingNativeController.CC.b0(flutterPluginBinding.getBinaryMessenger(), null);
        f282874p = null;
    }

    @Override // io.flutter.embedding.engine.plugins.activity.ActivityAware
    public void onReattachedToActivityForConfigChanges(ActivityPluginBinding activityPluginBinding) {
        lh4.m.g(activityPluginBinding, "binding");
        this.f282876e = activityPluginBinding.getActivity();
        activityPluginBinding.addActivityResultListener(this);
    }

    /* JADX WARNING: Removed duplicated region for block: B:49:0x0107  */
    /* JADX WARNING: Removed duplicated region for block: B:50:0x0113  */
    /* JADX WARNING: Removed duplicated region for block: B:68:0x01b6  */
    /* JADX WARNING: Removed duplicated region for block: B:69:0x01be  */
    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void open3rdAppWithTingItem(String str, byte[] bArr, Long l15) {
        TingClientProto.TingItem tingItem;
        String str2;
        String str3;
        Uri parse;
        String str4;
        long longValue = l15.longValue();
        lh4.m.g(str, "appId");
        lh4.m.g(bArr, "itemData");
        try {
            tingItem = TingClientProto.TingItem.parseFrom(bArr);
            lh4.m.f(tingItem, "parseFrom(pb)");
        } catch (Exception e15) {
            Log.w("MicroMsg.Ting", "parse ex " + e15.getMessage());
            l0 build = TingClientProto.TingItem.newBuilder().build();
            lh4.m.f(build, "newBuilder().build()");
            tingItem = (TingClientProto.TingItem) build;
        }
        Activity activity = this.f282876e;
        if (activity != null) {
            xf3.e eVar = xf3.e.f338546a;
            int i15 = (int) longValue;
            boolean z15 = true;
            if (str.length() == 0) {
                Log.e("MicroMsg.Ting3rdJumperHelper", "appId is empty");
                return;
            }
            com.tencent.mm.pluginsdk.model.app.j appInfo = ((ln.l) yz3.j.c(ln.l.class)).getAppInfo(str);
            String str5 = appInfo != null ? appInfo.field_packageName : null;
            String str6 = "";
            if ((str5 == null || str5.length() == 0) || !((ln.l) yz3.j.c(ln.l.class)).so0(activity, str)) {
                if (!TextUtils.isEmpty(str)) {
                    if (lh4.m.b("wx5aa333606550dfd5", str)) {
                        str2 = "https://y.qq.com/m/download/index.html?channelId=2005000732";
                    } else if (lh4.m.b("wx8dd6ecd81906fd84", str)) {
                        str2 = "https://a.app.qq.com/o/simple.jsp?pkgname=com.netease.cloudmusic";
                    } else if (lh4.m.b("wx79f2c4418704b4f8", str)) {
                        str2 = "https://a.app.qq.com/o/simple.jsp?pkgname=com.kugou.android";
                    } else if (lh4.m.b("wxc305711a2a7ad71c", str)) {
                        str2 = "https://a.app.qq.com/o/simple.jsp?pkgname=cn.kuwo.player";
                    }
                    str6 = str2;
                }
                if (!Util.isNullOrNil(str6)) {
                    eVar.b(activity, str, str6);
                } else {
                    eVar.b(activity, str, eVar.a(tingItem));
                }
            } else {
                xf3.a aVar = new xf3.a(null, i15, tingItem, str);
                int i16 = g0.f295202a;
                if (lh4.m.b("wx5aa333606550dfd5", str)) {
                    String a15 = eVar.a(tingItem);
                    com.tencent.mm.plugin.report.service.q.INSTANCE.kvStat(10910, XWebUpdater.XWEB_UPDATER_START_CHECK_TYPE_EMBEDINSTALL);
                    String f15 = em2.e.f(a15);
                    if (f15 == null) {
                        f15 = str6;
                    }
                    String g15 = em2.e.g(a15);
                    if (g15 == null) {
                        g15 = str6;
                    }
                    if (!(f15.length() > 0)) {
                        if (!(g15.length() > 0)) {
                            str3 = "qqmusic://qq.com/ui/jumpTab?p=%7B%22page%22%3A%221%22%7D&source=https%3a%2f%2fi.y.qq.com%2fv8%2fplaysong.html%3fADTAG%3dhz_weixin";
                            Log.i("MicroMsg.Ting3rdJumperHelper", "launchQQMusic qqMusicActionUrl: %s", str3);
                            parse = Uri.parse(str3);
                            if (parse != null) {
                                Log.w("MicroMsg.Ting3rdJumperHelper", "launchQQMusic parse qq music action url fail, url %s", str3);
                            } else {
                                Intent intent = new Intent("android.intent.action.VIEW", parse);
                                intent.addFlags(268435456);
                                if (Util.isIntentAvailable(activity, intent, false)) {
                                    String JN0 = ((ln.l) yz3.j.c(ln.l.class)).JN0(activity, ((ln.l) yz3.j.c(ln.l.class)).getAppInfo(str));
                                    if (JN0 != null) {
                                        str6 = JN0;
                                    }
                                    if (str6.length() > 0) {
                                        str4 = activity.getString(R.string.g_7, str6);
                                    } else {
                                        str4 = activity.getString(R.string.g_6);
                                    }
                                    lh4.m.f(str4, "if (appName.isNotEmpty()…d_app_tips)\n            }");
                                    p64.q qVar = new p64.q(activity);
                                    qVar.g(str4);
                                    qVar.n(activity.getString(R.string.g_4));
                                    qVar.j(activity.getString(R.string.f367394sg));
                                    qVar.l(new xf3.b(activity, intent, aVar));
                                    qVar.i(new xf3.c(aVar));
                                    if (lh4.m.b(Looper.myLooper(), Looper.getMainLooper())) {
                                        qVar.o();
                                    } else {
                                        ed4.d<d.b> b15 = ed4.d.b();
                                        b15.f206967b = ed4.d.f206964j;
                                        b15.f(new xf3.d(qVar)).g();
                                    }
                                    if (z15) {
                                        Log.i("MicroMsg.Ting3rdJumperHelper", "jump QQMusic success");
                                        return;
                                    }
                                    Log.e("MicroMsg.Ting3rdJumperHelper", "jumpToApp launch QQMusic failed");
                                    eVar.b(activity, str, eVar.a(tingItem));
                                    return;
                                }
                            }
                            z15 = false;
                            if (z15) {
                            }
                        }
                    }
                    str3 = "qqmusic://qq.com/media/playSonglist?p=%7b%22song%22%3a%5b%7b%22type%22%3a%220%22%2c%22songid%22%3a%22" + f15 + "%22%2c%22songmid%22%3a%22" + g15 + "%22%7d%5d%2c%22action%22%3a%22play%22%7d&source=https%3a%2f%2fi.y.qq.com%2fv8%2fplaysong.html%3fADTAG%3dhz_weixin";
                    Log.i("MicroMsg.Ting3rdJumperHelper", "launchQQMusic qqMusicActionUrl: %s", str3);
                    parse = Uri.parse(str3);
                    if (parse != null) {
                    }
                    z15 = false;
                    if (z15) {
                    }
                } else {
                    Log.i("MicroMsg.Ting3rdJumperHelper", "launch third party app, package name:%s, identification: %s, extraInfo: %s", appInfo.field_packageName, tingItem.getListenItem().getMusicInfo().getIdentification(), tingItem.getListenItem().getMusicInfo().getExtraInfo());
                    WXMusicVideoObject wXMusicVideoObject = new WXMusicVideoObject();
                    wXMusicVideoObject.musicUrl = eVar.a(tingItem);
                    String musicDataUrl = tingItem.getListenItem().getMusicInfo().getMusicDataUrl();
                    lh4.m.f(musicDataUrl, "tingItem.listenItem.musicInfo.musicDataUrl");
                    wXMusicVideoObject.musicDataUrl = musicDataUrl;
                    String identification = tingItem.getListenItem().getMusicInfo().getIdentification();
                    if (identification == null) {
                        identification = str6;
                    }
                    wXMusicVideoObject.identification = identification;
                    WXMediaMessage wXMediaMessage = new WXMediaMessage(wXMusicVideoObject);
                    wXMediaMessage.sdkVer = Build.SDK_INT;
                    String extraInfo = tingItem.getListenItem().getMusicInfo().getExtraInfo();
                    if (extraInfo != null) {
                        str6 = extraInfo;
                    }
                    wXMediaMessage.messageExt = str6;
                    f0 f0Var = new f0();
                    gk3 gk32 = (gk3) ((ky.b) yz3.j.c(ky.b.class)).Vw0(activity, 7, gk3.class);
                    if (gk32 != null) {
                        T t15 = (T) new Bundle();
                        t15.putString("current_page_biz_info", gk32.f22772e);
                        t15.putString("current_page_source_info", "music_operation_webview");
                        f0Var.f253292d = t15;
                    }
                    ((ln.l) yz3.j.c(ln.l.class)).ny(activity, str, wXMediaMessage, 0, aVar, f0Var.f253292d);
                }
            }
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void openByOtherApp(byte[] bArr) {
        String str;
        lh4.m.g(bArr, "tingItemData");
        TingClientProto.TingItem parseFrom = TingClientProto.TingItem.parseFrom(bArr);
        TingProto.MMListenItem listenItem = parseFrom.getListenItem();
        boolean z15 = false;
        if (listenItem != null && listenItem.getType() == 100) {
            z15 = true;
        }
        if (!z15) {
            Log.e("FlutterTingInteractPlugin", "openByOtherApp not file type and ignore");
            return;
        }
        String filePath = parseFrom.getListenItem().getLocalFileInfo().getFilePath();
        String str2 = filePath == null ? "" : filePath;
        String fileExt = parseFrom.getListenItem().getLocalFileInfo().getFileExt();
        if (fileExt == null) {
            str = "";
        } else {
            str = fileExt;
        }
        Log.i("FlutterTingInteractPlugin", "openByOtherApp filePath: " + str2 + ", fileExt: " + str + ", title: " + i0.g(parseFrom));
        ((jn.c) yz3.j.c(jn.c.class)).Jk0(this.f282876e, str2, str, 8, 2);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void openLiteApp(Long l15, String str, String str2, String str3, String str4, Boolean bool) {
        long longValue = l15.longValue();
        boolean booleanValue = bool.booleanValue();
        lh4.m.g(str, "appId");
        lh4.m.g(str2, ConstantsKinda.INTENT_LITEAPP_PATH);
        lh4.m.g(str3, "query");
        Bundle bundle = new Bundle();
        bundle.putString("appId", str);
        bundle.putString(ConstantsKinda.INTENT_LITEAPP_PATH, str2);
        bundle.putString("query", str3);
        bundle.putBoolean("isHalfScreen", longValue == 2);
        bundle.putString("minVersion", str4);
        if (booleanValue) {
            bundle.putBoolean(ConstantsKinda.INTENT_LITEAPP_TRANSPARENT, booleanValue);
            bundle.putBoolean("forbidRightGesture", true);
            bundle.putInt("nextAnimIn", R.anim.f357366e3);
            bundle.putInt("currentAnimOut", R.anim.f357364e1);
        }
        Log.i("FlutterTingInteractPlugin", "gotoLiteApp appId: " + str + ", liteAppType:" + longValue + ", path: " + str2 + " query: " + str3);
        ((ku.f) yz3.j.c(ku.f.class)).V40(b(), bundle, true, false, new o(this));
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void openWebPage(String str, Ting.OpenWebPageInfo openWebPageInfo) {
        lh4.m.g(str, "url");
        lh4.m.g(openWebPageInfo, "openInfo");
        Intent intent = new Intent();
        intent.putExtra("rawUrl", str);
        intent.putExtra("convertActivityFromTranslucent", true);
        intent.putExtra("hide_option_menu", openWebPageInfo.getHideOptionMenu());
        b0 b0Var = b0.f332794a;
        f("webview", ".ui.tools.WebViewUI", intent);
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void quickShareCategoryItem(byte[] bArr, String str) {
        lh4.m.g(bArr, "itemData");
        lh4.m.g(str, "userName");
        if (this.f282876e != null) {
            TingProto.MMListenCategoryItem parseFrom = TingProto.MMListenCategoryItem.parseFrom(bArr);
            xf3.k c15 = c();
            lh4.m.f(parseFrom, "categoryItem");
            Activity activity = this.f282876e;
            lh4.m.d(activity);
            c15.getClass();
            String e15 = c15.e(parseFrom);
            if (e15 != null) {
                ((w) yz3.j.c(w.class)).eM0(activity, str, e15, c15.b(parseFrom), new xf3.j(str, parseFrom, e15, c15, activity)).show();
            }
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void quickShareTingItem(byte[] bArr, String str) {
        lh4.m.g(bArr, "tingItemData");
        lh4.m.g(str, "userName");
        if (this.f282876e != null) {
            TingClientProto.TingItem parseFrom = TingClientProto.TingItem.parseFrom(bArr);
            xf3.k c15 = c();
            lh4.m.f(parseFrom, "tingItem");
            Activity activity = this.f282876e;
            lh4.m.d(activity);
            c15.getClass();
            String g15 = c15.g(parseFrom);
            if (g15 != null) {
                ((w) yz3.j.c(w.class)).Hr0(activity, str, g15, c15.a(parseFrom), new xf3.p(str, parseFrom, g15, activity)).show();
            }
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void saveLocalFile(byte[] bArr) {
        lh4.m.g(bArr, "tingItemData");
        TingClientProto.TingItem parseFrom = TingClientProto.TingItem.parseFrom(bArr);
        TingProto.MMListenItem listenItem = parseFrom.getListenItem();
        boolean z15 = false;
        if (listenItem != null && listenItem.getType() == 100) {
            z15 = true;
        }
        if (!z15) {
            Log.e("FlutterTingInteractPlugin", "saveLocalFile not file type and ignore");
            return;
        }
        String filePath = parseFrom.getListenItem().getLocalFileInfo().getFilePath();
        if (filePath == null) {
            filePath = "";
        }
        Log.i("FlutterTingInteractPlugin", "saveLocalFile filePath: " + filePath + ", title: " + i0.g(parseFrom));
        ((dx.h) yz3.j.c(dx.h.class)).lC0(b(), filePath, new i(this));
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void scan(Ting.Result<Ting.AsyncResult> result) {
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void selectLocalImage(Ting.Result<byte[]> result) {
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void selectLocalPhoto(Ting.Result<Ting.SelectLocalPhotoResult> result) {
        yf3.b bVar = new yf3.b(new j(result), new WeakReference(this.f282876e));
        Activity activity = bVar.f345741b.get();
        if (activity != null) {
            ((zw.f) yz3.j.c(zw.f.class)).S20(activity, 10, new Intent());
        }
        this.f282878g = bVar;
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void sendHandOffOpenCommand(byte[] bArr) {
        lh4.m.g(bArr, "tingItemData");
        TingProto.MMListenItem listenItem = TingClientProto.TingItem.parseFrom(bArr).getListenItem();
        boolean z15 = false;
        if (listenItem != null && listenItem.getType() == 100) {
            z15 = true;
        }
        if (!z15) {
            Log.e("FlutterTingInteractPlugin", "sendHandOffOpenCommand not file type");
            return;
        }
        HandOff dW = ((ya2.c) yz3.j.c(ya2.c.class)).dW();
        Log.i("FlutterTingInteractPlugin", "sendHandOffOpenCommand handOffFile: " + dW);
        if (dW != null) {
            ((ya2.c) yz3.j.c(ya2.c.class)).Da0(dW);
        } else {
            Log.e("FlutterTingInteractPlugin", "sendHandOffOpenCommand handOffFile null");
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void setShowAudioRedDot(Boolean bool) {
        ((v1) yz3.j.c(v1.class)).aT(bool.booleanValue());
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void shareCategoryItem(byte[] bArr, Long l15) {
        String str;
        long longValue = l15.longValue();
        lh4.m.g(bArr, "itemData");
        Log.i("FlutterTingInteractPlugin", "shareCategoryItem shareScene: " + longValue);
        Activity activity = this.f282876e;
        if (activity != null) {
            TingProto.MMListenCategoryItem parseFrom = TingProto.MMListenCategoryItem.parseFrom(bArr);
            boolean z15 = false;
            String str2 = "";
            if (longValue == 1) {
                xf3.k c15 = c();
                lh4.m.f(parseFrom, "categoryItem");
                c15.getClass();
                String h15 = dg3.b.h(parseFrom);
                Log.i("MicroMsg.TingShareHelper", "shareAlbumToChat categoryId: " + parseFrom.getCategoryId() + ", categoryType: " + parseFrom.getType() + ", coverUrl: %s", h15);
                String e15 = c15.e(parseFrom);
                if (e15 != null) {
                    zz.g gVar = (zz.g) yz3.j.c(zz.g.class);
                    if (h15 != null) {
                        str2 = h15;
                    }
                    String Ke = gVar.Ke(str2);
                    Intent intent = new Intent();
                    intent.putExtra("Retr_Msg_Type", 2);
                    intent.putExtra("Retr_Msg_content", e15);
                    intent.putExtra("Multi_Retr", true);
                    intent.putExtra("Retr_go_to_chattingUI", false);
                    intent.putExtra("Retr_show_success_tips", true);
                    intent.putExtra("Retr_Msg_thumb_path", Ke);
                    intent.putExtra("Retr_Msg_thumb_url", h15);
                    sv3.b.u(activity, ".ui.transmit.MsgRetransmitUI", intent, 1004);
                }
            } else if (longValue == 2) {
                xf3.k c16 = c();
                lh4.m.f(parseFrom, "categoryItem");
                c16.getClass();
                Intent intent2 = new Intent();
                d65 d65 = new d65();
                d65.f19028d = parseFrom.getType();
                d65.f19029e = dg3.b.c(parseFrom);
                String categoryId = parseFrom.getCategoryId();
                if (categoryId != null) {
                    str2 = categoryId;
                }
                d65.f19030f = str2;
                String url = parseFrom.getUrl();
                if (url == null || url.length() == 0) {
                    z15 = true;
                }
                if (!z15) {
                    str = parseFrom.getUrl();
                } else {
                    str = b.f282814b;
                }
                c16.b(parseFrom);
                intent2.putExtra("Ksnsupload_ting_album_share_object_xml", xf3.f.a(d65));
                intent2.putExtra("Ksnsupload_link", str);
                intent2.putExtra("Ksnsupload_title", parseFrom.getName());
                intent2.putExtra("Ksnsupload_type", 35);
                intent2.putExtra("need_result", true);
                intent2.putExtra("Ksnsupload_source", 1);
                sv3.b.u(activity, ".plugin.sns.ui.SnsUploadUI", intent2, 1005);
            } else if (longValue == 3) {
                xf3.k c17 = c();
                lh4.m.f(parseFrom, "categoryItem");
                c17.d(activity, parseFrom, 3);
            }
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void shareLyric(byte[] bArr, List list, Double d15, Double d16, Long l15) {
        d15.doubleValue();
        d16.doubleValue();
        l15.longValue();
        lh4.m.g(bArr, "tingItemData");
        lh4.m.g(list, "lyricItems");
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void shareTingItem(byte[] bArr, byte[] bArr2, byte[] bArr3, Long l15) {
        long longValue = l15.longValue();
        lh4.m.g(bArr, "tingItemData");
        Log.i("FlutterTingInteractPlugin", "shareTingItem shareScene: " + longValue);
        TingClientProto.TingItem parseFrom = TingClientProto.TingItem.parseFrom(bArr);
        Activity activity = this.f282876e;
        if (activity != null) {
            ((xc4.j) xc4.j.f338034d).i(new p(longValue, this, activity, parseFrom, bArr2), 200);
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public Boolean showAudioRedDot() {
        return Boolean.valueOf(((v1) yz3.j.c(v1.class)).iC0());
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void showHalfScreenWebView(String str) {
        lh4.m.g(str, "url");
        Activity activity = this.f282876e;
        if (activity != null) {
            yz3.d c15 = yz3.j.c(x.class);
            lh4.m.f(c15, "getService(IHalfScreenService::class.java)");
            x.a.a((x) c15, activity, str, null, new u(0.6f, null, false, false, 0, false, 0, false, false, 0, false, false, false, null, false, 0, false, 0, 262134, null), 4, null).show();
        }
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void startRecognizeSong(Ting.Result<Ting.AsyncResult> result) {
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void startVoiceInput(Ting.Result<Ting.AsyncResult> result) {
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void stopRecognizeSong() {
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void stopVoiceInput() {
    }

    @Override // com.tencent.pigeon.Ting.TingNativeController
    public void uploadLocalPhoto(Ting.SelectLocalPhotoResult selectLocalPhotoResult, Ting.Result<Ting.UploadLocalPhotoResult> result) {
        lh4.m.g(selectLocalPhotoResult, "localPhotoResult");
        String path = selectLocalPhotoResult.getPath();
        if (path != null) {
            yf3.c cVar = new yf3.c(new m(result));
            j0.e("uploadImage path:" + path, cVar.f345748b);
            vi.i iVar = new vi.i();
            iVar.field_fileType = 20303;
            iVar.field_appType = CdnLogic.kAppTypeTingImage;
            iVar.f326327h = 3;
            iVar.field_mediaId = path;
            iVar.field_fullpath = u1.i(path, false);
            gk4.h.d(new LifecycleScope("ImageUploadTask", null, 0, 6, null), null, null, new yf3.d(((gp.i) yz3.j.c(gp.i.class)).l40(iVar), cVar, null), 3, null);
        } else if (result != null) {
            result.success(new Ting.UploadLocalPhotoResult.Builder().setRet(-1L).setMsg("empty image path").build());
        }
    }
}