package com.tencent.mm.plugin.webview.ui.tools.jsapi; import android.app.Activity; import android.app.ProgressDialog; import android.app.Service; import android.bluetooth.BluetoothAdapter; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.Signature; import android.database.Cursor; import android.graphics.Color; import android.graphics.Point; import android.net.Uri; import android.nfc.NfcAdapter; import android.os.Build; import android.os.Bundle; import android.os.Looper; import android.os.Parcelable; import android.os.RemoteException; import android.text.TextUtils; import android.util.Base64; import androidx.activity.ComponentActivity; import b10.h0; import b10.o0; import bg0.p0; import bh0.d; import bh0.e; import bh0.f; import bh0.n; import bw3.as3; import bw3.at5; import bw3.ck3; import bw3.db3; import bw3.dg0; import bw3.e00; import bw3.e03; import bw3.gk3; import bw3.gm4; import bw3.gt5; import bw3.hm4; import bw3.ht5; import bw3.ix; import bw3.jx; import bw3.kx2; import bw3.lk; import bw3.lx2; import bw3.m20; import bw3.mc3; import bw3.pp5; import bw3.px5; import bw3.qp5; import bw3.qs5; import bw3.rp5; import bw3.sp5; import bw3.st1; import bw3.t13; import bw3.v95; import bw3.w65; import bw3.w95; import bw3.yl4; import bz.c0; import com.eclipsesource.mmv8.Platform; import com.google.android.gms.common.Scopes; import com.google.android.gms.common.internal.Constants; import com.google.android.gms.measurement.AppMeasurement; import com.google.android.gms.wearable.WearableStatusCodes; import com.google.firebase.analytics.FirebaseAnalytics; import com.tencent.kinda.framework.widget.tools.ConstantsKinda; import com.tencent.kinda.gen.ITransmitKvData; import com.tencent.liteav.TXLiteAVCode; import com.tencent.live2.jsplugin.V2TXJSAdapterConstants; import com.tencent.luggage.sdk.launching.ActivityStarterIpcDelegate; import com.tencent.map.geolocation.sapp.TencentLocation; import com.tencent.mars.cdn.CdnLogic; import com.tencent.mars.smc.IDKey; import com.tencent.mm.R; import com.tencent.mm.api.IEmojiInfo; import com.tencent.mm.app.h; import com.tencent.mm.app.w1; import com.tencent.mm.autogen.events.AddDownloadTaskEvent; import com.tencent.mm.autogen.events.ChangePayActivityViewEvent; import com.tencent.mm.autogen.events.DoFavoriteEvent; import com.tencent.mm.autogen.events.ECardJsApiCheckEvent; import com.tencent.mm.autogen.events.ExDeviceConnectDeviceEvent; import com.tencent.mm.autogen.events.ExDeviceConnectLanDeviceEvent; import com.tencent.mm.autogen.events.ExDeviceGetCurrentSSIDEvent; import com.tencent.mm.autogen.events.ExDeviceGetDeviceInfosEvent; import com.tencent.mm.autogen.events.ExDeviceGetLanDeviceInfosEvent; import com.tencent.mm.autogen.events.ExDeviceGetTicketEvent; import com.tencent.mm.autogen.events.ExDeviceScanDeviceEvent; import com.tencent.mm.autogen.events.ExDeviceSendDataToDeviceEvent; import com.tencent.mm.autogen.events.ExDeviceSendDataToLanDeviceEvent; import com.tencent.mm.autogen.events.ExDeviceSetSendDataDirectionEvent; import com.tencent.mm.autogen.events.ExDeviceStartScanLanDeviceEvent; import com.tencent.mm.autogen.events.FTSEmojiDownloadedEvent; import com.tencent.mm.autogen.events.FavoriteOperationEvent; import com.tencent.mm.autogen.events.GameCenterOperationEvent; import com.tencent.mm.autogen.events.GameCommOperationEvent; import com.tencent.mm.autogen.events.GameDebugSettingEvent; import com.tencent.mm.autogen.events.GameDownloadReport4WebViewEvent; import com.tencent.mm.autogen.events.GameJsApiCommandEvent; import com.tencent.mm.autogen.events.GameWatchReportEvent; import com.tencent.mm.autogen.events.GetIsSupportFaceEvent; import com.tencent.mm.autogen.events.GetIsSupportSoterEvent; import com.tencent.mm.autogen.events.HKCashierJSApiPayResultEvent; import com.tencent.mm.autogen.events.HaoKanActionEvent; import com.tencent.mm.autogen.events.Launch3RdAppEvent; import com.tencent.mm.autogen.events.MusicPlayerEvent; import com.tencent.mm.autogen.events.NavigateBackH5Event; import com.tencent.mm.autogen.events.OnPrivacyPolicyAgreedEvent; import com.tencent.mm.autogen.events.OpenCanvasEvent; import com.tencent.mm.autogen.events.PayUProceedPayEvent; import com.tencent.mm.autogen.events.PreEmotionSearchEvent; import com.tencent.mm.autogen.events.RcptRecentAddrEvent; import com.tencent.mm.autogen.events.ReportAdClickEvent; import com.tencent.mm.autogen.events.RequestEnterWalletEvent; import com.tencent.mm.autogen.events.RequestFaceVerifyForPayEvent; import com.tencent.mm.autogen.events.RequestInternalFaceVerifyEvent; import com.tencent.mm.autogen.events.RequestStartFaceDetectEvent; import com.tencent.mm.autogen.events.SendMsgEvent; import com.tencent.mm.autogen.events.SetLocalQQMobileEvent; import com.tencent.mm.autogen.events.SnsForwardFeedToSnsForDataReportEvent; import com.tencent.mm.autogen.events.SnsImageDownloadedEvent; import com.tencent.mm.autogen.events.StartAppBrandUIFromOuterEvent; import com.tencent.mm.autogen.events.StartVoipCSResultEvent; import com.tencent.mm.autogen.events.WCPayWalletBufferEvent; import com.tencent.mm.autogen.events.WalletGetPaidOrderDetailEvent; import com.tencent.mm.autogen.events.WalletRealNameResultNotifyMoreEvent; import com.tencent.mm.autogen.events.WebViewCloseWindowEvent; import com.tencent.mm.autogen.events.WebViewExWindowCloseEvent; import com.tencent.mm.autogen.events.WebViewWillCloseWindowEvent; import com.tencent.mm.autogen.events.WepkgNotifyEvent; import com.tencent.mm.autogen.events.WxPayGdprResultEvent; import com.tencent.mm.autogen.mmdata.rpt.WCTopicSearchContentActionStruct; import com.tencent.mm.feature.emoji.api.e1; import com.tencent.mm.feature.emoji.api.q0; import com.tencent.mm.feature.emoji.api.t0; import com.tencent.mm.game.report.g; import com.tencent.mm.message.l; import com.tencent.mm.modelavatar.AvatarStorage; import com.tencent.mm.modelcontrol.VideoTransPara; import com.tencent.mm.modelsns.SnsAdClick; import com.tencent.mm.opensdk.constants.Build; import com.tencent.mm.opensdk.modelmsg.WXAppExtendObject; import com.tencent.mm.opensdk.modelmsg.WXMediaMessage; import com.tencent.mm.opensdk.modelmsg.WXTextObject; import com.tencent.mm.opensdk.modelmsg.WXWebpageObject; import com.tencent.mm.plugin.appbrand.config.AppBrandLaunchReferrer; import com.tencent.mm.plugin.appbrand.config.HalfScreenConfig; import com.tencent.mm.plugin.appbrand.jsapi.a5; import com.tencent.mm.plugin.appbrand.jsapi.appdownload.JsApiAddDownloadTask; import com.tencent.mm.plugin.appbrand.jsapi.media.JsApiChooseImage; import com.tencent.mm.plugin.appbrand.service.c1; import com.tencent.mm.plugin.appbrand.service.d1; import com.tencent.mm.plugin.appbrand.service.f1; import com.tencent.mm.plugin.appbrand.service.i1; import com.tencent.mm.plugin.appbrand.service.m1; import com.tencent.mm.plugin.downloader.model.FileDownloadTaskInfo; import com.tencent.mm.plugin.downloader_app.api.DownloadWidgetTaskInfo; import com.tencent.mm.plugin.game.commlib.util.f; import com.tencent.mm.plugin.lite.LiteAppCenter; 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.jumper.RecordConfigProvider; import com.tencent.mm.plugin.report.service.q; import com.tencent.mm.plugin.websearch.FTSWebViewImageLogic; import com.tencent.mm.plugin.websearch.FTSWebViewLogic; import com.tencent.mm.plugin.websearch.f; import com.tencent.mm.plugin.websearch.p; import com.tencent.mm.plugin.webview.core.f0; import com.tencent.mm.plugin.webview.core.v; import com.tencent.mm.plugin.webview.emojistore.EmojiStoreWebViewLogic; import com.tencent.mm.plugin.webview.jsapi.exdevice.WebViewExDeviceMgr; import com.tencent.mm.plugin.webview.model.WebViewEventReporter; import com.tencent.mm.plugin.webview.model.WebViewJSSDKFileItem; import com.tencent.mm.plugin.webview.model.WebViewJSSDKVideoItem; import com.tencent.mm.plugin.webview.model.WebViewJSSDKVoiceItem; import com.tencent.mm.plugin.webview.model.f2; import com.tencent.mm.plugin.webview.model.g; import com.tencent.mm.plugin.webview.model.j1; import com.tencent.mm.plugin.webview.model.j2; import com.tencent.mm.plugin.webview.model.k1; import com.tencent.mm.plugin.webview.model.k2; import com.tencent.mm.plugin.webview.model.m0; import com.tencent.mm.plugin.webview.model.m2; import com.tencent.mm.plugin.webview.model.r; import com.tencent.mm.plugin.webview.model.s1; import com.tencent.mm.plugin.webview.model.t1; import com.tencent.mm.plugin.webview.modeltools.LicenceScanner; import com.tencent.mm.plugin.webview.modeltools.a0; import com.tencent.mm.plugin.webview.stub.WebViewStubTempUI; import com.tencent.mm.plugin.webview.stub.m; import com.tencent.mm.plugin.webview.ui.tools.WebViewDownloadUI; import com.tencent.mm.plugin.webview.ui.tools.exdevice.WebViewExDeviceLanMgr; import com.tencent.mm.plugin.webview.ui.tools.jsapi.c; import com.tencent.mm.plugin.webview.ui.tools.media.x; import com.tencent.mm.plugin.webview.ui.tools.media.z; import com.tencent.mm.plugin.webview.ui.tools.v; import com.tencent.mm.pluginsdk.model.app.j0; import com.tencent.mm.pluginsdk.ui.tools.b2; import com.tencent.mm.pluginsdk.ui.tools.c2; import com.tencent.mm.pluginsdk.ui.tools.h2; import com.tencent.mm.pluginsdk.wallet.WalletJsapiData; import com.tencent.mm.pointers.PByteArray; import com.tencent.mm.pointers.PInt; import com.tencent.mm.pointers.PString; import com.tencent.mm.protocal.GeneralControlWrapper; import com.tencent.mm.protocal.JsapiPermissionWrapper; import com.tencent.mm.protocal.MMProtocalJni; import com.tencent.mm.protocal.protobuf.TimeLineObject; import com.tencent.mm.sdk.coroutines.LifecycleScope; import com.tencent.mm.sdk.event.IListener; import com.tencent.mm.sdk.event.MvvmEventCenter; import com.tencent.mm.sdk.http.HttpWrapperBase; import com.tencent.mm.sdk.platformtools.ChannelUtil; import com.tencent.mm.sdk.platformtools.ConvertUtils; import com.tencent.mm.sdk.platformtools.ImgUtil; import com.tencent.mm.sdk.platformtools.LocaleUtil; import com.tencent.mm.sdk.platformtools.LocationUtil; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MD5Util; import com.tencent.mm.sdk.platformtools.MMApplicationContext; import com.tencent.mm.sdk.platformtools.MMHandler; import com.tencent.mm.sdk.platformtools.MMHandlerThread; import com.tencent.mm.sdk.platformtools.MMKVSlotManager; import com.tencent.mm.sdk.platformtools.NetStatusUtil; import com.tencent.mm.sdk.platformtools.QueueWorkerThread; import com.tencent.mm.sdk.platformtools.TinkerStatusReport; import com.tencent.mm.sdk.platformtools.Util; import com.tencent.mm.sdk.platformtools.WeChatHosts; import com.tencent.mm.sdk.platformtools.WebViewUtilities; import com.tencent.mm.sdk.platformtools.XmlParser; import com.tencent.mm.sdk.statecenter.ServiceStateCenter; import com.tencent.mm.sdk.thread.ThreadPool; import com.tencent.mm.storage.f4; import com.tencent.mm.storage.g4; import com.tencent.mm.storage.r4; import com.tencent.mm.storage.s4; import com.tencent.mm.storage.w1; import com.tencent.mm.storage.z1; import com.tencent.mm.ui.MMActivity; import com.tencent.mm.ui.MMFragmentActivity; import com.tencent.mm.ui.l5; import com.tencent.mm.ui.tools.y0; import com.tencent.mm.ui.w; import com.tencent.mm.vfs.h0; import com.tencent.mm.vfs.n2; import com.tencent.mm.vfs.o2; import com.tencent.mm.vfs.q1; import com.tencent.mm.vfs.u1; import com.tencent.tav.core.AssetExtension; import com.tencent.thumbplayer.api.TPOptionalID; import com.tencent.thumbplayer.core.downloadproxy.api.TPDownloadProxyEnum; import com.tencent.thumbplayer.tmediacodec.codec.CodecError; import com.tencent.thumbplayer.tmediacodec.util.MimeTypes; import com.tencent.thumbplayer.tplayer.plugins.report.TPReportKeys; import com.tencent.thumbplayer.tplayer.plugins.report.TPReportParams; import com.tencent.tinker.loader.shareutil.ShareConstants; import com.tencent.tmassistantsdk.openSDK.QQDownloader.AssistantStore; import com.tencent.wechat.aff.ting.TingClientProto; import com.tencent.wechat.aff.ting.TingProto; import com.tencent.xweb.FileReaderHelper; import com.tencent.xweb.ProxyConfig; import com.tencent.xweb.XWebFeature; import com.tencent.xweb.internal.ConstValue; import com.tencent.xweb.updater.IXWebBroadcastListener; import com.tencent.xweb.xwalk.plugin.XWalkPlugin; import com.tencent.xweb.xwalk.plugin.XWalkReaderBasePlugin; import cu3.f0; import d60.z; import dv3.g1; import ek4.y; import ie1.h; import ih.c; import ih.l1; import ih.l2; import ih.s0; import ih.x1; import ih.y1; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.lang.ref.WeakReference; import java.net.URI; import java.net.URLDecoder; import java.net.URLEncoder; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.TreeMap; import java.util.UUID; import jh2.k0; import jo3.a1; import jo3.d0; import jo3.e0; import jo3.i0; import jo3.r0; import jo3.u; import jo3.x0; import jo3.z0; import kd3.i; import kp3.c; import kp3.h1; import kp3.k; import kp3.o1; import kq.t; import kq.w; import lm.b; import lt.c; import mg0.b; import mi.c3; import mi.l3; import n72.o; import n72.s; import nf0.b3; import nf0.e6; import nf0.o3; import nf0.p4; import nf0.s3; import nf0.u0; import nf0.w0; import nf0.z0; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONTokener; import rg0.c; import t32.e2; import t32.f5; import ub0.l; import vj.r; import w20.a; import wg4.b0; import wq3.o; import yf0.c; import yf0.l0; import yf0.l0$$e; import yk0.b; import yv3.c; import yz3.j; public class MsgHandler implements MMActivity.d { public static final char[] V0 = {'<', '>', '\"', '\'', '&', ' ', '\''}; public static final String[] W0 = {"<", ">", """, "'", "&", " ", "'"}; public static final HashSet<String> X0; public static final String Y0 = (HttpWrapperBase.PROTOCAL_HTTPS + WeChatHosts.domainString(R.string.fyn) + "/security/"); public static final String Z0 = (HttpWrapperBase.PROTOCAL_HTTPS + WeChatHosts.domainString(R.string.fym) + "/security/"); /* renamed from: a1 reason: collision with root package name */ public static final String f167346a1 = (HttpWrapperBase.PROTOCAL_HTTPS + WeChatHosts.domainString(R.string.fys) + "/security/"); /* renamed from: b1 reason: collision with root package name */ public static final String f167347b1 = (HttpWrapperBase.PROTOCAL_HTTPS + WeChatHosts.domainString(R.string.fyo) + "/security/"); /* renamed from: c1 reason: collision with root package name */ public static final String f167348c1 = (HttpWrapperBase.PROTOCAL_HTTPS + WeChatHosts.domainString(R.string.f368684fy0) + "/security/"); /* renamed from: d1 reason: collision with root package name */ public static final String f167349d1 = (HttpWrapperBase.PROTOCAL_HTTPS + WeChatHosts.domainString(R.string.fy8) + "/security/"); /* renamed from: e1 reason: collision with root package name */ public static int f167350e1 = 1; /* renamed from: f1 reason: collision with root package name */ public static int f167351f1 = 2; /* renamed from: g1 reason: collision with root package name */ public static int f167352g1 = 3; /* renamed from: h1 reason: collision with root package name */ public static int f167353h1 = 1; /* renamed from: i1 reason: collision with root package name */ public static int f167354i1 = 2; /* renamed from: j1 reason: collision with root package name */ public static int f167355j1 = 3; /* renamed from: k1 reason: collision with root package name */ public static int f167356k1 = 4; /* renamed from: l1 reason: collision with root package name */ public static final LinkedList<Runnable> f167357l1 = new LinkedList<>(); /* renamed from: m1 reason: collision with root package name */ public static boolean f167358m1 = false; /* renamed from: n1 reason: collision with root package name */ public static MsgHandler$$o0 f167359n1 = new MsgHandler$$h(); public final int A; public boolean B = false; public final z3 C; public final LicenceScanner D; public final a0 E; public o F; public k G = new k(); public Object H; public long I = 0; public int J; public int K = -1; public IListener L; public b M = null; public b.AbstractC3987b N = null; public MMHandler P; public boolean Q; public boolean R; public Map<String, Object> S = null; public long T = 0; public boolean T0; public h1 U; public boolean U0; public IListener V; public final Map<String, MsgHandler$$p0> W; public String X; public IListener Y; public final Map<Integer, MsgHandler$$q0> Z; /* renamed from: d reason: collision with root package name */ public Context f167360d; /* renamed from: e reason: collision with root package name */ public h1 f167361e; /* renamed from: f reason: collision with root package name */ public WXMediaMessage f167362f; /* renamed from: g reason: collision with root package name */ public ProgressDialog f167363g = null; /* renamed from: h reason: collision with root package name */ public boolean f167364h = true; /* renamed from: i reason: collision with root package name */ public HashSet<String> f167365i; /* renamed from: j reason: collision with root package name */ public HashSet<String> f167366j; /* renamed from: n reason: collision with root package name */ public Bundle f167367n; /* renamed from: o reason: collision with root package name */ public String f167368o = null; /* renamed from: p reason: collision with root package name */ public String f167369p = null; /* renamed from: p0 reason: collision with root package name */ public int f167370p0; /* renamed from: q reason: collision with root package name */ public HashMap<String, String> f167371q = null; /* renamed from: r reason: collision with root package name */ public HashMap<String, String> f167372r = null; /* renamed from: s reason: collision with root package name */ public String f167373s = null; /* renamed from: t reason: collision with root package name */ public boolean f167374t = false; /* renamed from: u reason: collision with root package name */ public boolean f167375u = false; /* renamed from: v reason: collision with root package name */ public String f167376v = null; /* renamed from: w reason: collision with root package name */ public boolean f167377w = false; /* renamed from: x reason: collision with root package name */ public m f167378x; /* renamed from: x0 reason: collision with root package name */ public IListener f167379x0; /* renamed from: y reason: collision with root package name */ public m f167380y; /* renamed from: y0 reason: collision with root package name */ public final IListener f167381y0; /* renamed from: z reason: collision with root package name */ public c f167382z = null; static { HashSet<String> hashSet = new HashSet<>(); X0 = hashSet; hashSet.add("gcj02"); hashSet.add("wgs84"); } public MsgHandler(int i15) { h hVar = h.f61283d; this.V = new IListener<StartVoipCSResultEvent>(hVar) { /* class com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler.AnonymousClass61 */ { this.__eventId = -689945029; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.tencent.mm.sdk.event.IEvent] */ @Override // com.tencent.mm.sdk.event.IListener public boolean callback(StartVoipCSResultEvent startVoipCSResultEvent) { StartVoipCSResultEvent startVoipCSResultEvent2 = startVoipCSResultEvent; if (startVoipCSResultEvent2 == null) { return false; } int i15 = startVoipCSResultEvent2.f64776d.f64777a; MsgHandler msgHandler = MsgHandler.this; if (i15 == 1) { msgHandler.q5(msgHandler.U, "startVoipCall:cancel", null); return false; } else if (i15 == 2) { msgHandler.q5(msgHandler.U, "startVoipCall:hangup", null); return false; } else if (i15 == 3) { msgHandler.q5(msgHandler.U, "startVoipCall:network error", null); return false; } else if (i15 == 4) { msgHandler.q5(msgHandler.U, "startVoipCall:param not match", null); return false; } else { msgHandler.q5(msgHandler.U, "startVoipCall:unknow", null); return false; } } }; this.W = new HashMap(); this.Y = new IListener<WebViewWillCloseWindowEvent>(hVar) { /* class com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler.AnonymousClass88 */ { this.__eventId = -410575635; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.tencent.mm.sdk.event.IEvent] */ @Override // com.tencent.mm.sdk.event.IListener public boolean callback(WebViewWillCloseWindowEvent webViewWillCloseWindowEvent) { WebViewWillCloseWindowEvent webViewWillCloseWindowEvent2 = webViewWillCloseWindowEvent; if (MsgHandler.this.f167378x == null) { return false; } try { Bundle bundle = new Bundle(); bundle.putInt("closeWindow. result: %d", webViewWillCloseWindowEvent2.f65245d.f65246a); MsgHandler.this.f167378x.Va0(); MsgHandler.this.f167378x.d(bundle); int i15 = webViewWillCloseWindowEvent2.f65245d.f65246a; } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } if (webViewWillCloseWindowEvent2.f65245d.f65246a == -1) { MsgHandler msgHandler = MsgHandler.this; msgHandler.q5(msgHandler.f167361e, "get_h5_transaction_request:ok", null); } else { MsgHandler msgHandler2 = MsgHandler.this; msgHandler2.q5(msgHandler2.f167361e, "get_h5_transaction_request:cancel", null); } dead(); return true; } }; this.Z = new HashMap(); this.f167370p0 = 1000; this.f167381y0 = new IListener<MusicPlayerEvent>(hVar) { /* class com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler.AnonymousClass151 */ { this.__eventId = -1155728636; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.tencent.mm.sdk.event.IEvent] */ @Override // com.tencent.mm.sdk.event.IListener public boolean callback(MusicPlayerEvent musicPlayerEvent) { boolean z15; String str; MusicPlayerEvent musicPlayerEvent2 = musicPlayerEvent; MusicPlayerEvent.a aVar = musicPlayerEvent2.f63542d; String str2 = aVar.f63547e; Log.i("MicroMsg.MsgHandler", "backgroundAudioListener callback in, state:%s, action: %s", str2, Integer.valueOf(aVar.f63543a)); MusicPlayerEvent.a aVar2 = musicPlayerEvent2.f63542d; boolean z16 = aVar2.f63548f; n nVar = aVar2.f63544b; if (nVar == null || !nVar.U) { z15 = false; } else { z15 = true; } if (z16 || z15) { try { Bundle bundle = new Bundle(); bundle.putString("background_audio_state_player_state", str2); float f15 = (((float) musicPlayerEvent2.f63542d.f63546d) * 1.0f) / 1000.0f; bundle.putFloat("background_audio_state_player_duration", f15); bundle.putFloat("background_audio_state_current_time", (((float) ((y1) j.c(y1.class)).getPlayPosition()) * 1.0f) / 1000.0f); n nVar2 = musicPlayerEvent2.f63542d.f63544b; if (nVar2 != null) { bundle.putString("background_audio_state_player_src", nVar2.f12711n); bundle.putString("background_audio_state_player_src_id", musicPlayerEvent2.f63542d.f63544b.E); } bundle.putInt("background_audio_state_player_err_code", musicPlayerEvent2.f63542d.f63551i); String str3 = ""; if (!TextUtils.isEmpty(musicPlayerEvent2.f63542d.f63552j)) { str3 = musicPlayerEvent2.f63542d.f63552j; } bundle.putString("background_audio_state_player_err_msg", str3); n b15 = d.b(); if (b15 == null) { b15 = musicPlayerEvent2.f63542d.f63544b; } String str4 = null; if (b15 != null) { str = b15.f12705e; } else { str = null; } if (!Util.isNullOrNil(str)) { if (MsgHandler.this.T0) { y1 y1Var = (y1) j.c(y1.class); TingClientProto.TingItem playingItem = y1Var.playingItem(); if (playingItem == null && y1Var.wU().c() != null) { Log.w("MicroMsg.MsgHandler", "backgroundAudioListener callback playingItem and get by activePlayer"); playingItem = y1Var.wU().c().playingItem(); } if (playingItem != null) { bundle.putString("background_audio_state_player_state", pf3.b.f282813a.a(y1Var.getPlayerState())); bundle.putString("background_audio_state_listen_item", y1Var.ep(playingItem, f15).toString()); bundle.putString("background_audio_state_category_id", Util.nullAsNil(playingItem.getListenItem().getCategoryId())); bundle.putFloat("background_audio_state_buffered", ((((float) y1Var.Z4()) * f15) * 1.0f) / 100.0f); } else { Log.e("MicroMsg.MsgHandler", "backgroundAudioListener callback playingItem is null"); } } else { if (x.f168144l == null) { synchronized (x.class) { if (x.f168144l == null) { Context context = MMApplicationContext.getContext(); lh4.m.f(context, "getContext()"); x xVar = new x(context, null); x.f168144l = xVar; IListener<MusicPlayerEvent> iListener = xVar.f168150f; if (iListener != null) { iListener.alive(); } } b0 b0Var = b0.f332794a; } } ht5 e15 = x.f168144l.e(str); if (e15 != null) { str4 = e15.f24152f; } if (!Util.isNullOrNil(str4)) { bundle.putString("background_audio_state_player_audio_id", str4); } } } bundle.putBoolean("background_audio_state_is_ting", MsgHandler.this.T0); MsgHandler msgHandler = MsgHandler.this; if (msgHandler.f167378x != null) { Log.i("MicroMsg.MsgHandler", "onBackgroundAudioStateChange musicId=%s, isTing=%b", str, Boolean.valueOf(msgHandler.T0)); MsgHandler.this.f167378x.callback(TingProto.TingScene.TingScene_MusicMembershipPage_VALUE, bundle); } else { Log.e("MicroMsg.MsgHandler", "backgroundAudioListener callbacker is null"); } return true; } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "" + e16.getMessage()); return false; } } else { Log.e("MicroMsg.MsgHandler", "is not from QQMusicPlayer or TingMusicPlayer, don't callback!"); return false; } } }; this.T0 = false; this.U0 = false; Log.i("MicroMsg.MsgHandler", "MsgHandler init: %d", Integer.valueOf(i15)); this.A = i15; this.f167375u = false; this.f167365i = new HashSet<>(); this.f167366j = new HashSet<>(); this.f167382z = new c(i15); this.C = new z3(); this.D = new LicenceScanner(); this.E = new a0(); this.F = new o(); } public static boolean A(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "gotoEmoticonPad"); msgHandler.f167375u = false; Bundle bundle = new Bundle(); try { bundle.putString("requestId", h1Var.f247819a.get("requestId").toString()); m mVar = msgHandler.f167378x; if (mVar != null) { mVar.callback(151, bundle); } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "gotoEmoticonPad exception" + e15.getMessage()); } return false; } public static boolean A0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { Map<String, Object> map; String str; String str2; String str3; Integer num = 0; msgHandler.f167375u = false; Log.i("MicroMsg.MsgHandler", "doGetFinderLivePreviewUrl"); if (h1Var == null || (map = h1Var.f247819a) == null) { HashMap hashMap = new HashMap(); hashMap.put("ret", -2); hashMap.put("url", ""); hashMap.put("requestId", ""); msgHandler.q5(h1Var, "onGetFinderLivePreviewUrl:ok", hashMap); } else { if (map.get("encryptedId") == null || !(map.get("encryptedId") instanceof String)) { str = ""; } else { str = (String) map.get("encryptedId"); } if (map.get("nonceId") == null || !(map.get("nonceId") instanceof String)) { str2 = ""; } else { str2 = (String) map.get("nonceId"); } if (map.get("requestId") == null || !(map.get("requestId") instanceof String)) { str3 = ""; } else { str3 = (String) map.get("requestId"); } try { if (map.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE) != null && (map.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE) instanceof String)) { num = Integer.valueOf(Integer.parseInt((String) map.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE))); } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "GetFinderLivePreviewUrl parseParams exception:" + e15.getMessage()); } Log.i("MicroMsg.MsgHandler", "doGetFinderLivePreviewUrl encryptedId:%s, nonceId:%s, requestId:%s", str, str2, str3); try { ((zr.n) j.c(zr.n.class)).bD0(str, str2, num.intValue(), new p0(msgHandler, str3, h1Var)); } catch (Exception e16) { Log.w("MicroMsg.MsgHandler", "GetFinderLivePreviewUrl exception:" + e16.getMessage()); HashMap hashMap2 = new HashMap(); hashMap2.put("ret", -1); hashMap2.put("url", ""); hashMap2.put("requestId", str3); msgHandler.q5(h1Var, "onGetFinderLivePreviewUrl:ok", hashMap2); } } return false; } public static boolean A1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); try { String obj = h1Var.f247819a.get("type").toString(); if (Util.isNullOrNil(obj)) { msgHandler.q5(h1Var, "openLuckyMoneyHistory:fail", null); } else if (obj.equals("send")) { Intent intent = new Intent(); intent.putExtra("key_type", 1); sv3.b.j(msgHandler.f167360d, "luckymoney", ".ui.LuckyMoneyMyRecordUI", intent, null); msgHandler.q5(h1Var, "openLuckyMoneyHistory:ok", null); } else if (obj.equals("receive")) { Intent intent2 = new Intent(); intent2.putExtra("key_type", 2); sv3.b.j(msgHandler.f167360d, "luckymoney", ".ui.LuckyMoneyMyRecordUI", intent2, null); msgHandler.q5(h1Var, "openLuckyMoneyHistory:ok", null); } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doOpenLuckyMoneyHistory error %s", e15); msgHandler.q5(h1Var, "openLuckyMoneyHistory:fail", null); } return true; } public static boolean A2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String optString = h1Var.f247858d.optString("name"); Object opt = h1Var.f247858d.opt("arg"); try { JSONObject jSONObject = new JSONObject(); jSONObject.put("name", optString); jSONObject.put("arg", opt); Bundle bundle = new Bundle(); bundle.putString("info", jSONObject.toString()); msgHandler.f167378x.v6(139, bundle); msgHandler.q5(h1Var, "invokeMiniProgramAPI:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doInvokeMiniProgramApi: %s", e15); msgHandler.q5(h1Var, "invokeMiniProgramAPI:fail", null); } return true; } public static boolean A3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); int i15 = Util.getInt((String) h1Var.f247819a.get("mediaType"), 3); String str = (String) h1Var.f247819a.get("mediaTag"); int i16 = Util.getInt((String) h1Var.f247819a.get("limitCount"), 9); int i17 = Util.getInt((String) h1Var.f247819a.get("galleryType"), 0); String str2 = (String) h1Var.f247819a.get("albumInfos"); boolean z15 = !"false".equals((String) h1Var.f247819a.get("ignoreVideoPreview")); int i18 = Util.getInt((String) h1Var.f247819a.get("sourceSceneId"), 0); Intent intent = new Intent(); intent.putExtra("key_can_select_video_and_pic", true); intent.putExtra("key_send_raw_image", false); intent.putExtra("max_select_count", i16); intent.putExtra("query_source_type", 15); intent.putExtra("query_media_type", i15); intent.putExtra("show_header_view", false); intent.addFlags(67108864); if (str2 != null) { intent.putExtra("game_haowan_local_albums_info", str2); } intent.putExtra("game_haowan_ignore_video_preview", z15); intent.putExtra("game_haowan_source_scene_id", i18); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); if (i17 == 2) { sv3.b.n(msgHandler.f167360d, "game", ".media.GameTabGalleryUI", intent, 66); } else if (i17 == 1) { sv3.b.n(msgHandler.f167360d, "game", ".media.GamePublishGalleryUI", intent, 66); } else { msgHandler.q5(h1Var, h1Var.f247863i + "fail_galleryType is invalid", null); return true; } g.c(msgHandler.f167360d, 87, 8761, 0, 1, i18, a.a(4, null)); return true; } public static boolean B(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "querySimilarEmotion"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); String f15 = p.f(map, "md5"); int e15 = p.e(map, "offset", 0); String f16 = p.f(map, "searchId"); String f17 = p.f(map, "sessionId"); int e16 = p.e(map, "tab", 0); String f18 = p.f(map, "requestId"); int e17 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); int e18 = p.e(map, "webview_instance_id", -1); String f19 = p.f(map, "emojiUrl"); String f25 = p.f(map, "aesKey"); if (fTSWebViewLogic.f164244t != null) { z.d().d(fTSWebViewLogic.f164244t); z.d().p(2999, fTSWebViewLogic); } z.d().a(2999, fTSWebViewLogic); d0 d0Var = new d0(f15, e15, f16, f17, e16, f18, e17, f19, f25); fTSWebViewLogic.f164244t = d0Var; d0Var.f242309n = e18; z.d().f(fTSWebViewLogic.f164244t); return false; } public static boolean B0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; String str2; String str3; msgHandler.f167375u = false; HashMap hashMap = new HashMap(); try { Map<String, Object> map = h1Var.f247819a; if (map.get("encryptedId") == null || !(map.get("encryptedId") instanceof String)) { str = ""; } else { str = (String) map.get("encryptedId"); } if (map.get("nonceId") == null || !(map.get("nonceId") instanceof String)) { str2 = ""; } else { str2 = (String) map.get("nonceId"); } if (map.get("requestId") == null || !(map.get("requestId") instanceof String)) { str3 = ""; } else { str3 = (String) map.get("requestId"); } if (map.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE) != null && (map.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE) instanceof Integer)) { Integer num = (Integer) map.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE); } ((zr.n) j.c(zr.n.class)).bj(str, str2, msgHandler.f167360d, new r0(msgHandler, hashMap, str3, h1Var)); } catch (Exception unused) { Log.e("MicroMsg.MsgHandler", "getFinderLivePreviewMicCover ex:${ex.message}"); hashMap.put("ret", -1); hashMap.put("err_msg", "Invalid input parameters:${ex.message}"); hashMap.put("requestId", ""); msgHandler.q5(h1Var, "onGetFinderLivePreviewMicCover:ok", hashMap); } return false; } public static boolean B1(MsgHandler msgHandler, h1 h1Var, boolean z15) { String str; ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); int i15 = z15 ? 49 : 48; Bundle bundle = new Bundle(); bundle.putBoolean("k_need_signature", true); bundle.putString("k_user_name", u0.b()); bundle.putInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 2); bundle.putBoolean("needVideo", z15); bundle.putBoolean("is_check_dyncfg", false); bundle.putString("key_function_name", h1Var.f247863i); bundle.putInt("key_business_type", 1); String o65 = msgHandler.o6(msgHandler.s6()); if (o65 == null) { o65 = (String) h1Var.f247819a.get("appId"); } bundle.putString("appId", o65); bundle.putString("request_verify_pre_info", (String) h1Var.f247819a.get("request_verify_pre_info")); bundle.putInt("check_alive_type", h1Var.f247819a.containsKey("check_alive_type") ? Util.getInt(h1Var.f247819a.get("check_alive_type").toString(), 0) : 0); RequestStartFaceDetectEvent requestStartFaceDetectEvent = new RequestStartFaceDetectEvent(); RequestStartFaceDetectEvent.a aVar = requestStartFaceDetectEvent.f64286d; aVar.f64288a = msgHandler.f167360d; aVar.f64290c = i15; aVar.f64289b = bundle; requestStartFaceDetectEvent.publish(); Log.i("MicroMsg.MsgHandler", "start face detect event result: %b", Boolean.valueOf(requestStartFaceDetectEvent.f64287e.f64291a)); if (!requestStartFaceDetectEvent.f64287e.f64291a) { ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(null); if (z15) { str = "requestWxFacePictureVerifyUnionVideo:fail"; } else { str = "requestWxFacePictureVerify:fail"; } msgHandler.q5(h1Var, str, kp3.a.a(requestStartFaceDetectEvent.f64287e.f64292b)); } return true; } public static boolean B2(MsgHandler msgHandler, h1 h1Var) { String o65 = msgHandler.o6(msgHandler.s6()); if (Util.isNullOrNil(o65)) { Uri parse = Uri.parse(Util.nullAsNil(msgHandler.s6())); if (parse.getHost() == null || !parse.getHost().equals(WeChatHosts.domainString(R.string.fxy))) { Log.i("MicroMsg.MsgHandler", "appId is null"); msgHandler.q5(h1Var, "setGameData:fail_appid_null", null); return true; } o65 = "wx62d9035fd4fd2059"; } String str = (String) ((HashMap) h1Var.f247819a).get("key"); String str2 = (String) ((HashMap) h1Var.f247819a).get("value"); String str3 = (String) ((HashMap) h1Var.f247819a).get("weight"); String str4 = (String) ((HashMap) h1Var.f247819a).get("expireTime"); boolean z15 = Util.getBoolean((String) ((HashMap) h1Var.f247819a).get("autoClean"), true); if (Util.getBoolean((String) ((HashMap) h1Var.f247819a).get("pageCache"), false)) { Log.i("MicroMsg.MsgHandler", "common webview, not support pagecache"); msgHandler.q5(h1Var, "setGameData:fail_not_support", null); } else if (Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.i("MicroMsg.MsgHandler", "key or value is null"); msgHandler.q5(h1Var, "setGameData:fail_null_key", null); } else { bp3.b c15 = bp3.b.c(); c15.getClass(); if (c15.e(o65, str, str2, str3, str4, z15, (long) (str.getBytes().length + str2.getBytes().length), "")) { msgHandler.q5(h1Var, "setGameData:ok", null); } else { msgHandler.q5(h1Var, "setGameData:fail_exceed_size", null); } } return true; } public static boolean B3(MsgHandler msgHandler, h1 h1Var) { JSONArray jSONArray; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("postIdList"); if (Util.isNullOrNil(str)) { jSONArray = ((n72.o) j.c(n72.o.class)).o50(null, true); } else { try { jSONArray = ((n72.o) j.c(n72.o.class)).o50(new JSONArray(str), false); } catch (JSONException unused) { msgHandler.q5(h1Var, "queryHaowanPublish:fail", null); } } if (jSONArray == null || jSONArray.length() <= 0) { msgHandler.q5(h1Var, "queryHaowanPublish:ok", null); } else { HashMap hashMap = new HashMap(); hashMap.put("data", jSONArray); msgHandler.q5(h1Var, "queryHaowanPublish:ok", hashMap); } return true; } public static boolean B4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get(l3.COL_LOCALID); Object obj = h1Var.f247819a.get("isShowProgressTips"); if (obj != null) { try { z15 = Util.getInt(obj.toString(), 0) == 1; } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "Exception has occured : %s", e15.getMessage()); } o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "upload local image, appid = %s, localid = %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "appId or localid is null or nil."); msgHandler.q5(h1Var, "uploadImage:fail_missing arguments", null); } else { msgHandler.g7(h1Var, str, str2, 5, 0, 0, "uploadImage", z15); } return true; } z15 = true; o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "upload local image, appid = %s, localid = %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str)) { } Log.e("MicroMsg.MsgHandler", "appId or localid is null or nil."); msgHandler.q5(h1Var, "uploadImage:fail_missing arguments", null); return true; } public static boolean C(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "openFinderFeed"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "openFinderFeed %s", map); try { JSONObject jSONObject = new JSONObject(); jSONObject.put("feedId", p.f(map, "feedId")); jSONObject.put("extInfo", new JSONObject(p.f(map, "extInfo"))); jSONObject.put(TPReportKeys.LiveExKeys.LIVE_EX_EXTRA_INFO, p.f(map, TPReportKeys.LiveExKeys.LIVE_EX_EXTRA_INFO)); Intent intent = new Intent(); intent.putExtra("tab_type", 8); ((e2) j.c(e2.class)).I7(6, 2, 25, intent); ((e2) j.c(e2.class)).J80(MMApplicationContext.getContext(), jSONObject.toString(), intent); } catch (Exception unused) { } return false; } public static boolean C0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!h1Var.f247819a.containsKey("enable")) { msgHandler.q5(h1Var, "enableFullScreen:fail_invalid_arguments", null); } else { try { boolean parseBoolean = Boolean.parseBoolean((String) h1Var.f247819a.get("enable")); Bundle bundle = new Bundle(1); bundle.putBoolean("enable_fullscreen_params_enable", parseBoolean); msgHandler.f167378x.v6(45, bundle); msgHandler.q5(h1Var, "enableFullScreen:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doEnableFullScreen, exception = %s", e15); msgHandler.q5(h1Var, "enableFullScreen:fail", null); } } return true; } public static boolean C1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); try { m mVar = msgHandler.f167378x; if (mVar == null) { return true; } Bundle v65 = mVar.v6(87, null); if (v65 == null) { Log.e("MicroMsg.MsgHandler", "getWePkgAuthResult get NULL bundle return fail"); msgHandler.q5(h1Var, "getWePkgAuthResult:fail", null); return true; } else if (Util.nullAsNil(v65.getString("result")).equals("not_return")) { msgHandler.q5(h1Var, "getWePkgAuthResult:fail_auth_result_not_return", null); return true; } else { String string = v65.getString("full_url"); int i15 = v65.getInt("set_cookie"); if (Util.isNullOrNil(string)) { msgHandler.q5(h1Var, "getWePkgAuthResult:fail_full_url_empty", null); return true; } HashMap hashMap = new HashMap(); hashMap.put("full_url", string); hashMap.put("set_cookie", Integer.valueOf(i15)); msgHandler.q5(h1Var, "getWePkgAuthResult:ok", hashMap); return true; } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doGetWePkgAuthResult exception, " + e15.getMessage()); msgHandler.q5(h1Var, "getWePkgAuthResult:fail", null); return true; } } public static boolean C2(MsgHandler msgHandler, h1 h1Var) { String o65 = msgHandler.o6(msgHandler.s6()); if (Util.isNullOrNil(o65)) { Uri parse = Uri.parse(Util.nullAsNil(msgHandler.s6())); if (parse.getHost() == null || !parse.getHost().equals(WeChatHosts.domainString(R.string.fxy))) { Log.i("MicroMsg.MsgHandler", "appId is null"); msgHandler.q5(h1Var, "getGameData:fail_appid_null", null); return true; } o65 = "wx62d9035fd4fd2059"; } String str = (String) h1Var.f247819a.get("key"); if (Util.isNullOrNil(str)) { Log.i("MicroMsg.MsgHandler", "key is null"); msgHandler.q5(h1Var, "getGameData:fail", null); return true; } bp3.a a15 = bp3.b.c().a(o65, str); if (!Util.isNullOrNil(a15.field_value)) { HashMap hashMap = new HashMap(); hashMap.put("value", a15.field_value); hashMap.put("weight", a15.field_weight); hashMap.put("expireTime", Long.valueOf(a15.field_expireTime - (System.currentTimeMillis() / 1000))); msgHandler.q5(h1Var, "getGameData:ok", hashMap); return true; } msgHandler.q5(h1Var, "getGameData:ok", null); return true; } /* JADX WARNING: Removed duplicated region for block: B:12:0x0091 */ /* JADX WARNING: Removed duplicated region for block: B:13:0x0093 */ /* JADX WARNING: Removed duplicated region for block: B:16:0x00a6 */ public static boolean C3(MsgHandler msgHandler, h1 h1Var) { String str; JSONArray jSONArray; msgHandler.getClass(); String str2 = (String) h1Var.f247819a.get("postId"); boolean z15 = Util.getBoolean((String) h1Var.f247819a.get("compressImg"), true); if (!Util.isNullOrNil(str2)) { str = ((n72.o) j.c(n72.o.class)).NV(str2); } else { String str3 = (String) h1Var.f247819a.get("localIds"); if (str3 != null) { try { jSONArray = new JSONArray(str3); } catch (JSONException unused) { } boolean z16 = false; int i15 = Util.getInt((String) h1Var.f247819a.get("from"), 0); int i16 = Util.getInt((String) h1Var.f247819a.get("postType"), 0); String str4 = (String) h1Var.f247819a.get("extra"); int i17 = Util.getInt((String) h1Var.f247819a.get("sceneId"), 0); int i18 = Util.getInt((String) h1Var.f247819a.get("MiniGamePublish"), 0); o.a aVar = new o.a(); aVar.f269501a = i18 != 1; if (Util.getInt((String) h1Var.f247819a.get("needDelAfterPost"), 0) == 1) { z16 = true; } aVar.f269503c = z16; aVar.f269502b = (String) h1Var.f247819a.get("videoId"); str = ((n72.o) j.c(n72.o.class)).Kj0(i15, i16, jSONArray, str4, z15, i17, aVar); } jSONArray = null; boolean z162 = false; int i152 = Util.getInt((String) h1Var.f247819a.get("from"), 0); int i162 = Util.getInt((String) h1Var.f247819a.get("postType"), 0); String str42 = (String) h1Var.f247819a.get("extra"); int i172 = Util.getInt((String) h1Var.f247819a.get("sceneId"), 0); int i182 = Util.getInt((String) h1Var.f247819a.get("MiniGamePublish"), 0); o.a aVar2 = new o.a(); aVar2.f269501a = i182 != 1; if (Util.getInt((String) h1Var.f247819a.get("needDelAfterPost"), 0) == 1) { } aVar2.f269503c = z162; aVar2.f269502b = (String) h1Var.f247819a.get("videoId"); str = ((n72.o) j.c(n72.o.class)).Kj0(i152, i162, jSONArray, str42, z15, i172, aVar2); } HashMap hashMap = new HashMap(); hashMap.put("postId", str); msgHandler.q5(h1Var, "publishHaowanEdition:ok", hashMap); return true; } public static boolean C4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get("serverId"); Object obj = h1Var.f247819a.get("isShowProgressTips"); if (obj != null) { try { if (Util.getInt(obj.toString(), 0) != 1) { z15 = false; o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "doDownLoadImage, appid is : %s, media id is : %s", str, str2); if (!Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { msgHandler.q5(h1Var, "downloadImage:fail_missing arguments", null); } else { r2 r2Var = new r2(msgHandler, str2, h1Var); com.tencent.mm.plugin.webview.modeltools.m.cO0().a(str, str2, r2Var); Log.i("MicroMsg.MsgHandler", "doDownLoadImage, add cdn download task result : %b", Boolean.TRUE); if (z15) { Context context = msgHandler.f167360d; msgHandler.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(msgHandler.f167360d).getString(R.string.laq), true, true, new t2(msgHandler, r2Var, str2, h1Var)); } } return true; } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "Exception has occured : %s", e15.getMessage()); } } z15 = true; o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "doDownLoadImage, appid is : %s, media id is : %s", str, str2); if (!Util.isNullOrNil(str)) { } msgHandler.q5(h1Var, "downloadImage:fail_missing arguments", null); return true; } /* JADX WARNING: Removed duplicated region for block: B:18:0x0073 A[Catch:{ Exception -> 0x00a9 }] */ /* JADX WARNING: Removed duplicated region for block: B:19:0x0088 A[Catch:{ Exception -> 0x00a9 }] */ public static boolean D(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "getCurrentLocation"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "getCurrentLocation %s", map); try { Object obj = map.get("needUpdate"); if (obj != null) { if (obj instanceof String) { z15 = ((String) obj).equals("1"); } else if (obj instanceof Integer) { z15 = ((Integer) obj).equals(1); } else { Log.e("MicroMsg.WebSearch.FTSWebViewLogic", "wrong param: " + obj); } int e15 = p.e(map, "webview_instance_id", -1); if (!z15) { ((c) j.c(c.class)).Zv().b(new com.tencent.mm.plugin.websearch.j(fTSWebViewLogic, e15), false); } else { t13 h15 = z0.h(); if (h15 != null) { ((o0) j.c(o0.class)).Fh(e15, fTSWebViewLogic.g(h15).toString()); } else { ((o0) j.c(o0.class)).Fh(e15, ""); } } return false; } } catch (Exception e16) { Log.printErrStackTrace("MicroMsg.WebSearch.FTSWebViewLogic", e16, "", new Object[0]); } z15 = false; try { int e152 = p.e(map, "webview_instance_id", -1); if (!z15) { } } catch (Exception unused) { } return false; } public static boolean D0(MsgHandler msgHandler, h1 h1Var) { int i15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("color"); if (Util.isNullOrNil(str)) { Log.i("MicroMsg.MsgHandler", "doSetStatusBarStyle, color is null or nill"); msgHandler.q5(h1Var, "setStatusBarStyle:fail", null); } else { if (str.equalsIgnoreCase("black")) { i15 = 48; } else { i15 = str.equalsIgnoreCase("white") ? 49 : -1; } if (-1 != i15) { try { msgHandler.f167378x.v6(i15, Bundle.EMPTY); msgHandler.q5(h1Var, "setStatusBarStyle:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doSetStatusBarStyle, exception = %s", e15); msgHandler.q5(h1Var, "setStatusBarStyle:fail", null); } } else { Log.i("MicroMsg.MsgHandler", "doSetStatusBarStyle, color is neither black or white"); msgHandler.q5(h1Var, "setStatusBarStyle:fail", null); } } return true; } public static boolean D1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); if (h1Var == null || h1Var.f247819a == null) { Log.i("MicroMsg.MsgHandler", "wcpaySecurityCrosscutBack fail"); msgHandler.q5(h1Var, "wcpay_security_crosscut_back:fail", null); } ((qv3.c) j.c(qv3.c.class)).startJSApiWCPaySecurityCrosscut(h1Var.f247819a); try { Bundle bundle = new Bundle(); msgHandler.f167378x.Va0(); msgHandler.f167378x.d(bundle); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } msgHandler.q5(h1Var, "wcpay_security_crosscut_back:ok", null); msgHandler.f167375u = false; return false; } public static boolean D2(MsgHandler msgHandler, h1 h1Var) { String o65 = msgHandler.o6(msgHandler.s6()); if (Util.isNullOrNil(o65)) { Uri parse = Uri.parse(Util.nullAsNil(msgHandler.s6())); if (parse.getHost() == null || !parse.getHost().equals(WeChatHosts.domainString(R.string.fxy))) { Log.i("MicroMsg.MsgHandler", "appId is null"); msgHandler.q5(h1Var, "clearData:fail", null); return true; } o65 = "wx62d9035fd4fd2059"; } String str = (String) ((HashMap) h1Var.f247819a).get("keys"); boolean z15 = Util.getBoolean((String) ((HashMap) h1Var.f247819a).get("clearAllData"), false); if (!Util.isNullOrNil(str)) { try { bp3.b.c().d().Sa(o65, new JSONArray(str)); msgHandler.q5(h1Var, "clearGameData:ok", null); return true; } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doClearData: " + e15.getMessage()); msgHandler.q5(h1Var, "clearGameData:fail", null); return true; } } else if (z15) { bp3.b.c().d().Ga(o65); msgHandler.q5(h1Var, "clearGameData:ok", null); return true; } else { Log.i("MicroMsg.MsgHandler", "key is null"); msgHandler.q5(h1Var, "clearGameData:fail", null); return true; } } public static boolean D3(MsgHandler msgHandler, h1 h1Var) { JSONArray jSONArray; msgHandler.getClass(); if (Util.getBoolean((String) h1Var.f247819a.get("cancelAll"), false)) { ((n72.o) j.c(n72.o.class)).Ym0(null, true); } else { String str = (String) h1Var.f247819a.get("postIdList"); if (str != null) { try { jSONArray = new JSONArray(str); } catch (JSONException unused) { } if (jSONArray != null || jSONArray.length() == 0) { msgHandler.q5(h1Var, "cancelHaowanPublish:fail_empty_postId", null); return true; } ((n72.o) j.c(n72.o.class)).Ym0(jSONArray, false); } jSONArray = null; if (jSONArray != null) { } msgHandler.q5(h1Var, "cancelHaowanPublish:fail_empty_postId", null); return true; } msgHandler.q5(h1Var, "cancelHaowanPublish:ok", null); return true; } public static boolean D4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("menuList"); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "hideMenuItems:param is empty", null); } else { try { JSONArray jSONArray = new JSONArray(str); ArrayList<String> arrayList = new ArrayList<>(); for (int i15 = 0; i15 < jSONArray.length(); i15++) { String string = jSONArray.getString(i15); arrayList.add(string); Log.i("MicroMsg.MsgHandler", "doHideMenuItems:" + string); } Bundle bundle = new Bundle(); bundle.putStringArrayList("menu_item_list", arrayList); msgHandler.f167378x.xH(3001, bundle); msgHandler.q5(h1Var, "hideMenuItems:ok", null); } catch (JSONException e15) { Log.w("MicroMsg.MsgHandler", "JSONException : %s", e15.getMessage()); msgHandler.q5(h1Var, "hideMenuItems:param is empty", null); } catch (RemoteException unused) { msgHandler.q5(h1Var, "hideMenuItems:param is empty", null); } } return true; } public static boolean E(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "navControl"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "navControl %s", map); try { ((o0) j.c(o0.class)).tO(p.e(map, "webview_instance_id", -1), map); } catch (Exception unused) { } return false; } public static boolean E0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("username"); if (!Util.isNullOrNil(str)) { ((c1) j.c(c1.class)).CA(str, null); } msgHandler.q5(h1Var, "forceUpdateWxaAttr:ok", null); return true; } public static boolean E1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "getLocalWePkgInfo call"); MMHandlerThread.postToMainThread(new f1(msgHandler, h1Var)); return true; } public static boolean E2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "do handle wcpay buffer"); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); WCPayWalletBufferEvent wCPayWalletBufferEvent = new WCPayWalletBufferEvent(); wCPayWalletBufferEvent.f65064d.f65073h = (String) h1Var.f247819a.get("action"); wCPayWalletBufferEvent.f65064d.f65075j = (String) h1Var.f247819a.get("buffer"); wCPayWalletBufferEvent.f65064d.f65074i = Util.getInt((String) h1Var.f247819a.get("walletRegion"), 0); WCPayWalletBufferEvent.a aVar = wCPayWalletBufferEvent.f65064d; aVar.f65066a = walletJsapiData.f173486d; aVar.f65067b = walletJsapiData.f173490h; aVar.f65071f = walletJsapiData.f173489g; aVar.f65069d = walletJsapiData.f173495p; aVar.f65070e = walletJsapiData.f173488f; aVar.f65068c = walletJsapiData.f173491i; aVar.f65072g = walletJsapiData.f173497r; wCPayWalletBufferEvent.f65065e.f65078c = new s1(msgHandler, wCPayWalletBufferEvent, h1Var); wCPayWalletBufferEvent.publish(); return true; } public static boolean E3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("videoUrl"); String str2 = (String) h1Var.f247819a.get("thumbUrl"); String str3 = (String) h1Var.f247819a.get("appId"); int i15 = Util.getInt((String) h1Var.f247819a.get("sourceSceneId"), 0); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "launchGameVideoEditor:fail_invalid_videoUrl", null); return true; } ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); ((s) j.c(s.class)).XP(msgHandler.f167360d, str, str2, str3, 67, i15); return true; } public static boolean E4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("menuList"); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "showMenuItems:param is empty", null); } else { try { JSONArray jSONArray = new JSONArray(str); ArrayList<String> arrayList = new ArrayList<>(); for (int i15 = 0; i15 < jSONArray.length(); i15++) { arrayList.add(jSONArray.getString(i15)); } Bundle bundle = new Bundle(); bundle.putStringArrayList("menu_item_list", arrayList); msgHandler.f167378x.xH(3002, bundle); } catch (JSONException e15) { Log.w("MicroMsg.MsgHandler", "JSONException : %s", e15.getMessage()); msgHandler.q5(h1Var, "showMenuItems:param is empty", null); } catch (RemoteException e16) { Log.w("MicroMsg.MsgHandler", "RemoteException : %s", e16.getMessage()); msgHandler.q5(h1Var, "showMenuItems:param is empty", null); } msgHandler.q5(h1Var, "showMenuItems:ok", null); } return true; } public static boolean F(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "gestrueOnPressBackControl"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "gestrueOnPressBackControl %s", map); try { ((o0) j.c(o0.class)).Xt(p.e(map, "webview_instance_id", -1), p.d(map, "enabled", true)); } catch (Exception unused) { } return false; } public static boolean F0(MsgHandler msgHandler, h1 h1Var) { int i15; int i16; msgHandler.getClass(); String f15 = p.f(h1Var.f247819a, "targetAppId"); String s65 = msgHandler.s6(); String o65 = msgHandler.o6(s65); if (Util.isNullOrNil(o65)) { o65 = p.f(h1Var.f247819a, "referrerAppId"); } if (Util.isNullOrNil(f15)) { msgHandler.q5(h1Var, "launchMiniProgram:fail_invalid_targetAppId", null); } else if (Util.isNullOrNil(o65)) { msgHandler.q5(h1Var, "launchMiniProgram:fail_invalid_referrerAppId", null); } else { String nullAsNil = Util.nullAsNil(p.f(h1Var.f247819a, "envVersion")); nullAsNil.getClass(); if (nullAsNil.equals("trial")) { i16 = 2; } else if (!nullAsNil.equals("develop")) { i16 = 0; } else { i15 = 1; ((d1) j.c(d1.class)).dN0(msgHandler.f167360d, s65, o65, f15, i15, p.f(h1Var.f247819a, ConstantsKinda.INTENT_LITEAPP_PATH), msgHandler.l6()); msgHandler.q5(h1Var, "launchMiniProgram:ok", null); } i15 = i16; ((d1) j.c(d1.class)).dN0(msgHandler.f167360d, s65, o65, f15, i15, p.f(h1Var.f247819a, ConstantsKinda.INTENT_LITEAPP_PATH), msgHandler.l6()); msgHandler.q5(h1Var, "launchMiniProgram:ok", null); } return true; } public static boolean F1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("url"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "url is null or nil"); msgHandler.q5(h1Var, "openGameWebView:fail_invalid_url", null); } else { String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("orientation")); int i15 = -1; if (!Util.isNullOrNil(nullAsNil)) { if (nullAsNil.equals("horizontal")) { i15 = 0; } else if (nullAsNil.equals("vertical")) { i15 = 1; } else if (nullAsNil.equals("sensor")) { i15 = 4; } } boolean equals = Util.nullAsNil((String) h1Var.f247819a.get("fullscreen")).equals("true"); boolean equals2 = Util.nullAsNil((String) h1Var.f247819a.get("disable_swipe_back")).equals("1"); String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get("gameAppid")); Intent intent = new Intent(); intent.putExtra("rawUrl", str); intent.putExtra("geta8key_scene", 32); intent.putExtra("KPublisherId", "game_webview"); intent.putExtra("screen_orientation", i15); intent.putExtra("show_full_screen", equals); intent.putExtra("disable_swipe_back", equals2); intent.putExtra("game_hv_menu_appid", nullAsNil2); v.e(intent.getExtras(), "webview", ".ui.tools.WebViewUI", msgHandler.f167378x, new g1(msgHandler, intent)); GameCommOperationEvent gameCommOperationEvent = new GameCommOperationEvent(); GameCommOperationEvent.a aVar = gameCommOperationEvent.f63042d; aVar.f63044a = 2; aVar.f63045b = nullAsNil2; gameCommOperationEvent.publish(); msgHandler.q5(h1Var, "openGameWebView:ok", null); } return true; } public static boolean F2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("reportId"); boolean equals = Util.nullAsNil((String) h1Var.f247819a.get("reportInstantly")).equals("1"); boolean equals2 = Util.nullAsNil((String) h1Var.f247819a.get("reportTimeBegin")).equals("1"); String str2 = (String) h1Var.f247819a.get("reportFormatData"); String str3 = (String) h1Var.f247819a.get("reportTabsFormatData"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "reportId is null or nil"); msgHandler.q5(h1Var, "reportGamePageTime:fail_invalid_reportId", null); } else if (!Util.isNullOrNil(str2) || !Util.isNullOrNil(str3)) { Log.i("MicroMsg.MsgHandler", "reportGamePageTime, reportId:%s, reportInstantly:%b, reportTimeBegin:%b, reportFormatData:(%s), reportTabsFormatData(%s)", str, Boolean.valueOf(equals), Boolean.valueOf(equals2), str2, str3); Bundle bundle = new Bundle(); bundle.putString("game_page_report_id", str); bundle.putBoolean("game_page_report_instantly", equals); bundle.putBoolean("game_page_report_time_begin", equals2); bundle.putString("game_page_report_format_data", str2); bundle.putString("game_page_report_tabs_format_data", str3); try { msgHandler.f167378x.v6(95, bundle); msgHandler.q5(h1Var, "reportGamePageTime:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "reportGamePageTime, exception = %s", e15); msgHandler.q5(h1Var, "reportGamePageTime:fail", null); } } else { Log.e("MicroMsg.MsgHandler", "reportFormatData && reportTabsFormatData is null or nil"); msgHandler.q5(h1Var, "reportGamePageTime:fail_invalid_reportFormatData_reportTabsFormatData", null); } return true; } public static boolean F3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String l15 = r.l(); Log.i("MicroMsg.MsgHandler", "MsgHandler, getOAID, oaid=" + l15); q.INSTANCE.t(1896, 23); if (Util.isNullOrNil(l15)) { msgHandler.q5(h1Var, "getOAID:fail", null); return true; } HashMap hashMap = new HashMap(); hashMap.put("result", l15); msgHandler.q5(h1Var, "getOAID:ok", hashMap); return true; } public static boolean F4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); try { msgHandler.f167378x.xH(3003, null); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "RemoteException : %s", e15.getMessage()); msgHandler.q5(h1Var, "hideAllNonBaseMenuItem:param is empty", null); } msgHandler.q5(h1Var, "hideAllNonBaseMenuItem:ok", null); return true; } public static boolean G(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "showNavBarShadow"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "showNavBarShadow %s", map); try { int e15 = p.e(map, "webview_instance_id", -1); String f15 = p.f(map, "color"); double doubleValue = Double.valueOf(map.get("alpha").toString()).doubleValue(); int parseInt = Integer.parseInt(f15.substring(1, f15.length()), 16); ((o0) j.c(o0.class)).tr0(e15, parseInt, (int) (doubleValue * 255.0d)); } catch (Throwable unused) { } return false; } /* JADX WARNING: Removed duplicated region for block: B:10:0x014e A[Catch:{ Exception -> 0x021a }] */ /* JADX WARNING: Removed duplicated region for block: B:11:0x0151 A[Catch:{ Exception -> 0x021a }] */ /* JADX WARNING: Removed duplicated region for block: B:16:0x017b A[Catch:{ Exception -> 0x021a }] */ /* JADX WARNING: Removed duplicated region for block: B:21:0x01af A[Catch:{ Exception -> 0x0218 }] */ /* JADX WARNING: Removed duplicated region for block: B:22:0x01b1 A[Catch:{ Exception -> 0x0218 }] */ /* JADX WARNING: Removed duplicated region for block: B:25:0x0204 A[Catch:{ Exception -> 0x0218 }] */ public static boolean G0(MsgHandler msgHandler, h1 h1Var) { String str; Exception e15; HalfScreenConfig.ShareActionConfig shareActionConfig; Bundle v65; msgHandler.getClass(); String f15 = p.f(h1Var.f247819a, "targetAppId"); String f16 = p.f(h1Var.f247819a, ConstantsKinda.INTENT_LITEAPP_PATH); String f17 = p.f(h1Var.f247819a, "productPathCookies"); String f18 = p.f(h1Var.f247819a, "extraData"); int e16 = p.e(h1Var.f247819a, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 1055); String f19 = p.f(h1Var.f247819a, "sceneNote"); om0.o oVar = new om0.o(); oVar.f277592b = f15; oVar.f277596f = f16; oVar.f277601k = e16; oVar.f277602l = f19; Log.i("MicroMsg.MsgHandler", "openFinderProduct appId = " + f15 + " path = " + f16 + " pathCookie = " + f17); try { JSONObject jSONObject = new JSONObject((String) ((HashMap) h1Var.f247819a).get("uiParam")); Log.i("MicroMsg.MsgHandler", "openFinderProduct uiParam = " + jSONObject.toString()); boolean optBoolean = jSONObject.optBoolean("enableFullScreenGesture"); boolean optBoolean2 = jSONObject.optBoolean("needShowTemplateNav"); boolean optBoolean3 = jSONObject.optBoolean("hideCapsuleMenu"); String optString = jSONObject.optString("capsuleMenuType"); boolean optBoolean4 = jSONObject.optBoolean("showShareButton"); HalfScreenConfig.BackgroundShapeConfig backgroundShapeConfig = new HalfScreenConfig.BackgroundShapeConfig(MMApplicationContext.getContext().getResources().getDimension(R.dimen.f359061c9), true, true, false, false); HalfScreenConfig.ShareActionConfig shareActionConfig2 = HalfScreenConfig.ShareActionConfig.f85566f; String str2 = (String) ((HashMap) h1Var.f247819a).get("shareProductItem"); if (str2 != null) { Log.i("MicroMsg.MsgHandler", "openFinderProduct shareItemStr = " + str2); JSONObject jSONObject2 = new JSONObject(str2); st1 st12 = new st1(); st12.f36811i = jSONObject2.optString("appId"); st12.f36813n = jSONObject2.optString("productId"); st12.f36807e = jSONObject2.optString("finderUsername"); st12.f36823x = jSONObject2.optString("ecSource"); String dh02 = ((zr.r) j.c(zr.r.class)).dh0(st12); ((zr.r) j.c(zr.r.class)).Vp(st12.f36807e, dh02, oVar); if (optBoolean4) { shareActionConfig = new HalfScreenConfig.ShareActionConfig(true, dh02); HalfScreenConfig.c cVar = HalfScreenConfig.c.NORMAL; if (!optBoolean3) { cVar = HalfScreenConfig.c.HIDE; } else if ("singleClose".equals(optString)) { cVar = HalfScreenConfig.c.SINGLE_CLOSE; } HalfScreenConfig.b bVar = new HalfScreenConfig.b(); bVar.f85572a = true; int i15 = l5.b(MMApplicationContext.getContext()).y; if (MMApplicationContext.getResources().getConfiguration().orientation == 2) { i15 = l5.b(MMApplicationContext.getContext()).x; } str = "MicroMsg.MsgHandler"; bVar.f85573b = (int) ((((double) i15) * 0.75d) + ((double) MMApplicationContext.getContext().getResources().getDimension(R.dimen.f359089d1))); bVar.f85582k = cVar; bVar.f85578g = true; bVar.f85580i = backgroundShapeConfig; bVar.f85590s = true; bVar.f85583l = optBoolean; bVar.f85585n = optBoolean2; bVar.f85588q = optBoolean2; bVar.G = true; bVar.D = optBoolean; lh4.m.g(shareActionConfig, "shareActionConfig"); bVar.f85592u = shareActionConfig; oVar.A = bVar.a(); AppBrandLaunchReferrer appBrandLaunchReferrer = new AppBrandLaunchReferrer(); JSONObject jSONObject3 = new JSONObject(); jSONObject3.put("cookies", f17); appBrandLaunchReferrer.f85504d = 1; appBrandLaunchReferrer.f85507g = jSONObject3.toString(); appBrandLaunchReferrer.f85506f = f18; oVar.f277609s = appBrandLaunchReferrer; ((zr.q) j.c(zr.q.class)).p8(oVar, optBoolean2); ((zr.q) j.c(zr.q.class)).Hv(msgHandler.f167360d, oVar); v65 = msgHandler.f167378x.v6(7001, Bundle.EMPTY); if (v65 != null) { ((zr.n) j.c(zr.n.class)).XL0(v65.getString("KShareTraceLastGMsgId", ""), oVar); } ((zr.q) j.c(zr.q.class)).OA0(oVar); ((d1) j.c(d1.class)).r80(msgHandler.f167360d, oVar); msgHandler.q5(h1Var, "openFinderProduct:ok", null); return true; } } shareActionConfig = shareActionConfig2; HalfScreenConfig.c cVar2 = HalfScreenConfig.c.NORMAL; if (!optBoolean3) { } HalfScreenConfig.b bVar2 = new HalfScreenConfig.b(); bVar2.f85572a = true; int i152 = l5.b(MMApplicationContext.getContext()).y; if (MMApplicationContext.getResources().getConfiguration().orientation == 2) { } str = "MicroMsg.MsgHandler"; try { bVar2.f85573b = (int) ((((double) i152) * 0.75d) + ((double) MMApplicationContext.getContext().getResources().getDimension(R.dimen.f359089d1))); bVar2.f85582k = cVar2; bVar2.f85578g = true; bVar2.f85580i = backgroundShapeConfig; bVar2.f85590s = true; bVar2.f85583l = optBoolean; bVar2.f85585n = optBoolean2; bVar2.f85588q = optBoolean2; bVar2.G = true; bVar2.D = optBoolean; lh4.m.g(shareActionConfig, "shareActionConfig"); bVar2.f85592u = shareActionConfig; oVar.A = bVar2.a(); AppBrandLaunchReferrer appBrandLaunchReferrer2 = new AppBrandLaunchReferrer(); JSONObject jSONObject32 = new JSONObject(); jSONObject32.put("cookies", f17); appBrandLaunchReferrer2.f85504d = 1; appBrandLaunchReferrer2.f85507g = jSONObject32.toString(); appBrandLaunchReferrer2.f85506f = f18; oVar.f277609s = appBrandLaunchReferrer2; ((zr.q) j.c(zr.q.class)).p8(oVar, optBoolean2); ((zr.q) j.c(zr.q.class)).Hv(msgHandler.f167360d, oVar); v65 = msgHandler.f167378x.v6(7001, Bundle.EMPTY); if (v65 != null) { } } catch (Exception e17) { e15 = e17; Log.printErrStackTrace(str, e15, "open finder product parse params failed", new Object[0]); ((zr.q) j.c(zr.q.class)).OA0(oVar); ((d1) j.c(d1.class)).r80(msgHandler.f167360d, oVar); msgHandler.q5(h1Var, "openFinderProduct:ok", null); return true; } } catch (Exception e18) { e15 = e18; str = "MicroMsg.MsgHandler"; Log.printErrStackTrace(str, e15, "open finder product parse params failed", new Object[0]); ((zr.q) j.c(zr.q.class)).OA0(oVar); ((d1) j.c(d1.class)).r80(msgHandler.f167360d, oVar); msgHandler.q5(h1Var, "openFinderProduct:ok", null); return true; } ((zr.q) j.c(zr.q.class)).OA0(oVar); ((d1) j.c(d1.class)).r80(msgHandler.f167360d, oVar); msgHandler.q5(h1Var, "openFinderProduct:ok", null); return true; } /* JADX WARNING: Removed duplicated region for block: B:58:0x01e0 */ /* JADX WARNING: Removed duplicated region for block: B:59:0x026e */ /* JADX WARNING: Removed duplicated region for block: B:62:0x0293 */ /* JADX WARNING: Removed duplicated region for block: B:65:0x029c */ /* JADX WARNING: Removed duplicated region for block: B:68:0x031d */ /* JADX WARNING: Removed duplicated region for block: B:69:0x031f */ /* JADX WARNING: Removed duplicated region for block: B:72:0x0324 */ /* JADX WARNING: Removed duplicated region for block: B:79:0x0348 */ /* JADX WARNING: Removed duplicated region for block: B:82:0x035a */ public static boolean G1(MsgHandler msgHandler, h1 h1Var) { String str; Bundle bundle; long j15; String str2; String str3; boolean z15; String str4; int i15; String str5; Point point; String str6; String str7; int i16; String str8; int i17; int i18; int i19; String str9; String str10; int i25; String str11; String str12; String str13; String str14; Point point2; String b15; RemoteException e15; Bundle bundle2; Bundle bundle3 = msgHandler.f167367n; if (bundle3 != null) { int i26 = bundle3.getInt("key_download_restrict", 0); String string = msgHandler.f167367n.getString("key_function_id", ""); if (!Util.isNullOrNil(string)) { q.INSTANCE.g(14596, string, Integer.valueOf(i26), 1); } if (i26 == 1) { Log.e("MicroMsg.MsgHandler", "not allow to launch application"); msgHandler.q5(h1Var, "launchApplication:fail", null); return true; } } Bundle bundle4 = msgHandler.f167367n; boolean z16 = bundle4 != null ? bundle4.getBoolean("k_is_secret_msg", false) : false; long nowSecond = Util.nowSecond() - msgHandler.I; Log.i("MicroMsg.MsgHandler", "launchTimeInterval = %d", Long.valueOf(nowSecond)); if (nowSecond < 2 && msgHandler.I > 0) { try { q.INSTANCE.g(13983, 5, URLEncoder.encode(msgHandler.f167378x.getCurrentUrl(), "UTF-8"), ""); } catch (Exception unused) { Log.e("MicroMsg.MsgHandler", "report launchApplication failed"); } } String str15 = (String) h1Var.f247819a.get("appID"); String str16 = (String) h1Var.f247819a.get("schemeUrl"); String str17 = (String) h1Var.f247819a.get("parameter"); String str18 = (String) h1Var.f247819a.get("packageName"); String str19 = (String) h1Var.f247819a.get("sourceInfo"); String str20 = (String) h1Var.f247819a.get("bizInfo"); Bundle bundle5 = h1Var.f247859e; String string2 = bundle5 != null ? bundle5.getString("name") : null; int i27 = Util.getInt((String) h1Var.f247819a.get("alertType"), 0); String str21 = (String) h1Var.f247819a.get("signature"); o1.a(h1Var.f247862h, false, null, str15); String str22 = (String) h1Var.f247819a.get("extInfo"); Log.i("MicroMsg.MsgHandler", "doLaunchApplication, appid : %s, scheme : %s, extinfo:[%s], parameter : %s, pkg:%s, signature:%s", str15, str16, str22, str17, str18, str21); if (!Util.isNullOrNil(str15) || !Util.isNullOrNil(str16) || !Util.isNullOrNil(str18)) { Object obj = h1Var.f247819a.get("__jsapi_fw_ext_info"); String string3 = obj instanceof Bundle ? ((Bundle) obj).getString("__jsapi_fw_ext_info_key_current_url") : null; String c15 = msgHandler.f167382z.c(string3); if (Util.isNullOrNil(c15) && (bundle2 = h1Var.f247859e) != null) { c15 = bundle2.getString("appId"); } Bundle bundle6 = new Bundle(); if (!Util.isNullOrNil(string3)) { try { bundle6.putString("current_page_url", URLEncoder.encode(string3, "UTF-8")); } catch (UnsupportedEncodingException unused2) { } } bundle6.putString("current_page_appid", c15); bundle6.putString("current_page_biz_info", str20); bundle6.putString("current_page_source_info", str19); try { m mVar = msgHandler.f167378x; if (mVar != null) { str = str17; try { bundle = mVar.v6(1020, null); } catch (RemoteException e16) { e15 = e16; } } else { str = str17; bundle = null; } } catch (RemoteException e17) { e15 = e17; str = str17; Log.e("MicroMsg.MsgHandler", "invokeAsResult error.%s", e15); bundle = null; if (bundle == null) { } if (!Util.isNullOrNil(str12)) { } if (!Util.isNullOrNil(str11)) { } bundle6.putInt("current_page_secCtrlMode", i17); bundle6.putString("current_page_fromUsername", str9); bundle6.putString("current_page_msgUsername", str8); bundle6.putInt("current_page_requestId", i18); bundle6.putInt("current_page_msgType", i19); bundle6.putInt("current_page_appMsgType", i16); bundle6.putInt("current_page_a8keyScene", i25); bundle6.putString("current_page_msgId", str10); bundle6.putBoolean("current_page_ad_onlineReport", true); c.b bVar = new c.b(); bVar.f345559a = new kx2(); bVar.f345560b = new lx2(); bVar.f345561c = "/cgi-bin/mmbiz-bin/checklaunchapp"; bVar.f345562d = TingProto.TingReportAction.TingReportAction_ControlAreaAudioIconClickToSquare_VALUE; yf0.c a15 = bVar.a(); kx2 kx22 = (kx2) a15.f345548a.f345573a; kx22.f27888d = c15; kx22.f27889e = str15; kx22.f27890f = i25; kx22.f27891g = string3; kx22.f27892h = str4; kx22.f27893i = i15; kx22.f27894j = 0; kx22.f27897p = str5; kx22.f27898q = string2; kx22.f27899r = i18; kx22.f27900s = str9; kx22.f27901t = str8; kx22.f27902u = str10; kx22.f27903v = i19; kx22.f27904w = i16; kx22.f27905x = i17; kx22.f27906y = !z15 ? 1 : 2; if (!z15) { } b15 = j1.f165615a.b(str3, str6); if (b15 != null) { } Log.i(str2, "run cgi to check(appId : %s, toAppId : %s, scene : %s, url : %s, schemeUrl : %s, alertType : %s, msgType: %d, appMsgType: %d, ctrlMode:%d, hasTouched: %s, touchTime: %s, touchPosition: %s)", c15, str15, Integer.valueOf(kx22.f27890f), kx22.f27891g, kx22.f27892h, Integer.valueOf(kx22.f27893i), Integer.valueOf(kx22.f27903v), Integer.valueOf(kx22.f27904w), Integer.valueOf(kx22.f27905x), Integer.valueOf(kx22.f27906y), Long.valueOf(kx22.f27907z), point2); Log.i(str2, "CheckLaunchAppWithA8keyParams:request_id:%s, user_name:%s, msg_username:%s, msg_id:%s", Integer.valueOf(i18), str9, str8, str10); l0.e(a15, new e0(msgHandler, z16, h1Var, str15, str13, str4, bundle6, str14, str7, str, str22), false); return true; } if (bundle == null) { int i28 = bundle.getInt("key_get_a8key_req_params_req_id"); String string4 = bundle.getString("key_get_a8key_req_params_username"); String string5 = bundle.getString("key_get_a8key_req_params_msg_username"); String string6 = bundle.getString("key_get_a8key_req_params_msg_id"); String string7 = bundle.getString("key_get_a8key_req_params_biz_info"); String string8 = bundle.getString("key_get_a8key_req_params_source_info"); int i29 = bundle.getInt("key_get_a8key_req_params_msg_type"); int i35 = bundle.getInt("key_get_a8key_req_params_app_msg_type"); int i36 = bundle.getInt("key_get_a8key_req_params_ctrl_mode"); int i37 = bundle.getInt("key_get_a8key_req_params_scene"); boolean z17 = bundle.getBoolean("key_get_a8key_req_params_has_touched", false); str2 = "MicroMsg.MsgHandler"; str3 = str20; j15 = bundle.getLong("key_get_a8key_req_params_touch_timestamp", 0); str8 = string5; str10 = string6; str9 = string4; point = (Point) bundle.getParcelable("key_get_a8key_req_params_touch_position"); str6 = str19; str12 = string7; i19 = i29; str4 = str16; str5 = str18; i18 = i28; i17 = i36; str7 = str21; i16 = i35; z15 = z17; str11 = string8; i15 = i27; i25 = i37; } else { str2 = "MicroMsg.MsgHandler"; str3 = str20; i15 = i27; str6 = str19; str4 = str16; str5 = str18; str12 = ""; str11 = str12; str10 = str11; str9 = str10; str8 = str9; i25 = 0; i19 = 0; i18 = 0; i17 = 0; point = null; z15 = false; j15 = 0; str7 = str21; i16 = 0; } if (!Util.isNullOrNil(str12)) { bundle6.putString("current_page_biz_info", str12); } if (!Util.isNullOrNil(str11)) { bundle6.putString("current_page_source_info", str11); } bundle6.putInt("current_page_secCtrlMode", i17); bundle6.putString("current_page_fromUsername", str9); bundle6.putString("current_page_msgUsername", str8); bundle6.putInt("current_page_requestId", i18); bundle6.putInt("current_page_msgType", i19); bundle6.putInt("current_page_appMsgType", i16); bundle6.putInt("current_page_a8keyScene", i25); bundle6.putString("current_page_msgId", str10); bundle6.putBoolean("current_page_ad_onlineReport", true); c.b bVar2 = new c.b(); bVar2.f345559a = new kx2(); bVar2.f345560b = new lx2(); bVar2.f345561c = "/cgi-bin/mmbiz-bin/checklaunchapp"; bVar2.f345562d = TingProto.TingReportAction.TingReportAction_ControlAreaAudioIconClickToSquare_VALUE; yf0.c a152 = bVar2.a(); kx2 kx222 = (kx2) a152.f345548a.f345573a; kx222.f27888d = c15; kx222.f27889e = str15; kx222.f27890f = i25; kx222.f27891g = string3; kx222.f27892h = str4; kx222.f27893i = i15; kx222.f27894j = 0; kx222.f27897p = str5; kx222.f27898q = string2; kx222.f27899r = i18; kx222.f27900s = str9; kx222.f27901t = str8; kx222.f27902u = str10; kx222.f27903v = i19; kx222.f27904w = i16; kx222.f27905x = i17; kx222.f27906y = !z15 ? 1 : 2; if (!z15) { str13 = string2; if (j15 > 0) { str14 = str5; kx222.f27907z = Math.max(0L, System.currentTimeMillis() - j15); } else { str14 = str5; } point2 = point; if (point != null) { kx222.A = point2.x; kx222.B = point2.y; } } else { str13 = string2; str14 = str5; point2 = point; } b15 = j1.f165615a.b(str3, str6); if (b15 != null) { ((c0) j.c(c0.class)).kU(b15); } Log.i(str2, "run cgi to check(appId : %s, toAppId : %s, scene : %s, url : %s, schemeUrl : %s, alertType : %s, msgType: %d, appMsgType: %d, ctrlMode:%d, hasTouched: %s, touchTime: %s, touchPosition: %s)", c15, str15, Integer.valueOf(kx222.f27890f), kx222.f27891g, kx222.f27892h, Integer.valueOf(kx222.f27893i), Integer.valueOf(kx222.f27903v), Integer.valueOf(kx222.f27904w), Integer.valueOf(kx222.f27905x), Integer.valueOf(kx222.f27906y), Long.valueOf(kx222.f27907z), point2); Log.i(str2, "CheckLaunchAppWithA8keyParams:request_id:%s, user_name:%s, msg_username:%s, msg_id:%s", Integer.valueOf(i18), str9, str8, str10); l0.e(a152, new e0(msgHandler, z16, h1Var, str15, str13, str4, bundle6, str14, str7, str, str22), false); return true; } Log.e("MicroMsg.MsgHandler", "appid,pkg and scheme is null or nil"); msgHandler.q5(h1Var, "launchApplication:fail", null); return true; } public static boolean G2(MsgHandler msgHandler, final h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; String str2; String str3; String str4; int i15; msgHandler.getClass(); if (ChannelUtil.isGPVersion()) { Log.e("MicroMsg.MsgHandler", "doAddDownloadTask fail, GP Version not allowed to download"); msgHandler.q5(h1Var, "system:access_denied", null); return true; } String str5 = (String) ((HashMap) h1Var.f247819a).get("task_name"); String str6 = (String) ((HashMap) h1Var.f247819a).get("task_url"); String str7 = (String) ((HashMap) h1Var.f247819a).get("alternative_url"); long j15 = Util.getLong((String) ((HashMap) h1Var.f247819a).get("task_size"), 0); String str8 = (String) ((HashMap) h1Var.f247819a).get("file_md5"); String str9 = (String) ((HashMap) h1Var.f247819a).get("extInfo"); String str10 = (String) ((HashMap) h1Var.f247819a).get("fileType"); String str11 = (String) ((HashMap) h1Var.f247819a).get("appid"); if (Util.isNullOrNil(str11)) { str = "appid"; str2 = msgHandler.o6((String) ((HashMap) h1Var.f247819a).get("url")); } else { str = "appid"; str2 = str11; } String str12 = (String) ((HashMap) h1Var.f247819a).get(IXWebBroadcastListener.PACKAGE_NAME); String str13 = (String) ((HashMap) h1Var.f247819a).get("thumb_url"); String str14 = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); int i16 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("download_type"), 0); boolean isTeenMode = ((s0) z.q(s0.class)).isTeenMode(); Log.i("MicroMsg.MsgHandler", "doAddDownloadTask, md5 = " + str8 + ", url = " + str6 + ", extinfo = " + str9 + ", fileType = " + str10 + ", isTeenMode = " + isTeenMode); if (isTeenMode) { ((i) j.c(i.class)).O4(msgHandler.f167360d); msgHandler.q5(h1Var, "add_download_task:cancel", null); return true; } Bundle bundle = msgHandler.f167367n; if (bundle != null) { int i17 = bundle.getInt("key_download_restrict", 0); str4 = str10; String string = msgHandler.f167367n.getString("key_function_id", ""); if (!Util.isNullOrNil(string)) { str3 = str8; i15 = 1; q.INSTANCE.g(14596, string, Integer.valueOf(i17), 0); } else { str3 = str8; i15 = 1; } if (i17 == i15) { Log.e("MicroMsg.MsgHandler", "not allow to download file"); msgHandler.q5(h1Var, "add_download_task:fail", null); return true; } } else { str3 = str8; str4 = str10; } if (!NetStatusUtil.isNetworkConnected(msgHandler.f167360d)) { msgHandler.q5(h1Var, "add_download_task:fail_network_not_connected", null); MMHandlerThread.postToMainThread(new x1(msgHandler)); Log.i("MicroMsg.MsgHandler", "doAddDownloadTask fail, network not ready"); msgHandler.V6(str2, TingProto.TingReportContext.ACTIONSONGINDEXINLIST_FIELD_NUMBER, str9); return true; } else if (!z.s().n()) { msgHandler.q5(h1Var, "add_download_task:fail_sdcard_not_ready", null); MMHandlerThread.postToMainThread(new y1(msgHandler)); msgHandler.V6(str2, TingProto.TingReportContext.ACTIONCATEGORYID_FIELD_NUMBER, str9); Log.i("MicroMsg.MsgHandler", "doAddDownloadTask fail, sdcard not ready"); return true; } else if (j15 > 0 && !((kq.x) j.c(kq.x.class)).tw0(j15) && !((kq.x) j.c(kq.x.class)).fq(j15)) { msgHandler.q5(h1Var, "add_download_task:fail_sdcard_has_not_enough_space", null); MMHandlerThread.postToMainThread(new z1(msgHandler)); msgHandler.V6(str2, TingProto.TingReportContext.ACTIONCATEGORYID_FIELD_NUMBER, str9); Log.i("MicroMsg.MsgHandler", "doAddDownloadTask fail, not enough space, require size = " + j15); return true; } else if (Util.isNullOrNil(str6)) { Log.e("MicroMsg.MsgHandler", "doAddDownloadTask fail, url is null"); msgHandler.q5(h1Var, "add_download_task:fail_invalid_url", null); msgHandler.V6(str2, 700, str9); return true; } else { Intent intent = new Intent(); intent.setClass(msgHandler.f167360d, WebViewDownloadUI.class); intent.putExtra("task_name", str5); intent.putExtra("task_download_type", i16); intent.putExtra("app_developer", (String) ((HashMap) h1Var.f247819a).get("developer")); intent.putExtra("app_version", (String) ((HashMap) h1Var.f247819a).get("app_version")); intent.putExtra("app_desc", (String) ((HashMap) h1Var.f247819a).get("app_desc")); intent.putExtra("app_privacy_url", (String) ((HashMap) h1Var.f247819a).get("privacy_agreement_url")); intent.putExtra("app_permission_url", (String) ((HashMap) h1Var.f247819a).get("permission_url")); intent.putExtra("task_url", str6); intent.putExtra("alternative_url", str7); intent.putExtra("task_size", j15); intent.putExtra("file_md5", str3); intent.putExtra("extInfo", str9); intent.putExtra("fileType", str4); intent.putExtra(str, str2); intent.putExtra(IXWebBroadcastListener.PACKAGE_NAME, str12); intent.putExtra("thumb_url", str13); intent.putExtra(FFmpegMetadataRetriever.METADATA_KEY_TITLE, str14); intent.putExtra("page_url", (String) ((HashMap) h1Var.f247819a).get("url")); intent.putExtra("page_scene", 0); intent.addFlags(268435456); Context context = msgHandler.f167360d; k30.a aVar = new k30.a(); aVar.c(intent); j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doAddDownloadTask", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context.startActivity((Intent) aVar.a(0)); j30.a.e(context, "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doAddDownloadTask", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); AnonymousClass38 r25 = new IListener<AddDownloadTaskEvent>(h.f61283d) { /* class com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler.AnonymousClass38 */ { this.__eventId = 1058823164; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.tencent.mm.sdk.event.IEvent] */ @Override // com.tencent.mm.sdk.event.IListener public boolean callback(AddDownloadTaskEvent addDownloadTaskEvent) { AddDownloadTaskEvent addDownloadTaskEvent2 = addDownloadTaskEvent; if (!(addDownloadTaskEvent2 instanceof AddDownloadTaskEvent)) { Log.w("MicroMsg.MsgHandler", "mismatched event"); return false; } AddDownloadTaskEvent.a aVar = addDownloadTaskEvent2.f61796d; if (aVar.f61797a != 0) { Log.i("MicroMsg.MsgHandler", "not jsapi api callback"); return false; } HashMap hashMap = null; if (aVar.f61798b) { Log.i("MicroMsg.MsgHandler", "doAddDownloadTask callback, cancel"); if (!Util.isNullOrNil(addDownloadTaskEvent2.f61796d.f61800d)) { hashMap = new HashMap(); hashMap.put("detail_err_msg", addDownloadTaskEvent2.f61796d.f61800d); } MsgHandler.this.q5(h1Var, "add_download_task:cancel", hashMap); return false; } if (aVar.f61799c > 0) { HashMap hashMap2 = new HashMap(); hashMap2.put("download_id", Long.valueOf(addDownloadTaskEvent2.f61796d.f61799c)); hashMap2.put("detail_err_msg", addDownloadTaskEvent2.f61796d.f61800d); Log.i("MicroMsg.MsgHandler", "doAddDownloadTask callback, ok"); MsgHandler.this.q5(h1Var, "add_download_task:ok", hashMap2); } else { Log.i("MicroMsg.MsgHandler", "doAddDownloadTask callback, failed"); MsgHandler.this.q5(h1Var, "add_download_task:fail", null); } MsgHandler.this.L.dead(); return false; } }; msgHandler.L = r25; r25.alive(); return true; } } public static boolean G3(MsgHandler msgHandler, h1 h1Var) { String str; String str2; boolean z15; msgHandler.getClass(); try { Log.i("MicroMsg.MsgHandler", "handle qq mail login result"); Bundle bundle = new Bundle(); String str3 = ""; if (h1Var.f247819a.containsKey("mailAddr")) { str = (String) h1Var.f247819a.get("mailAddr"); bundle.putString("key_qq_mail", str); } else { str = str3; } if (h1Var.f247819a.containsKey("ticket")) { str2 = (String) h1Var.f247819a.get("ticket"); bundle.putString("key_bind_ticket", str2); } else { str2 = str3; } if (h1Var.f247819a.containsKey("needSecPWD")) { z15 = "true".equals((String) h1Var.f247819a.get("needSecPWD")); bundle.putBoolean("key_need_second_pwd", z15); } else { z15 = false; } if (h1Var.f247819a.containsKey("secpwdkey")) { str3 = (String) h1Var.f247819a.get("secpwdkey"); bundle.putString("key_second_pwd_key", str3); } Log.i("MicroMsg.MsgHandler", "mail %s, ticket %s, needSecondPwd %s, secPwdKey %s", str, str2, Boolean.valueOf(z15), str3); msgHandler.f167378x.Va0(); msgHandler.f167378x.d(bundle); new WebViewCloseWindowEvent().publish(); msgHandler.q5(h1Var, "qqMailLoginResult ok", null); } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "qqMailLoginResult exception", new Object[0]); } return true; } public static boolean G4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); try { msgHandler.f167378x.xH(3004, null); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "RemoteException : %s", e15.getMessage()); msgHandler.q5(h1Var, "showAllNonBaseMenuItem:param is empty", null); } msgHandler.q5(h1Var, "showAllNonBaseMenuItem:ok", null); return true; } /* JADX WARNING: Removed duplicated region for block: B:117:0x02e8 */ /* JADX WARNING: Removed duplicated region for block: B:202:0x0485 */ /* JADX WARNING: Removed duplicated region for block: B:205:0x0498 */ /* JADX WARNING: Removed duplicated region for block: B:219:0x050d */ /* JADX WARNING: Removed duplicated region for block: B:220:0x050f */ /* JADX WARNING: Removed duplicated region for block: B:223:0x0533 */ /* JADX WARNING: Removed duplicated region for block: B:226:0x0558 */ /* JADX WARNING: Removed duplicated region for block: B:229:0x0571 */ public static boolean H(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String[] strArr; String str; String[] strArr2; String str2; String str3; int i15; String str4; String[] strArr3; String str5; String str6; String str7; String str8; String str9; boolean z15; int i16; Exception e15; int i17; float f15; String str10; String str11; String str12; String str13; float f16; int i18; String str14; JSONObject jSONObject; JSONObject optJSONObject; boolean z16; int a15; double d15; int optDouble; int optDouble2; int optDouble3; String string; String string2; String string3; int i19; String a16; MsgHandler msgHandler2 = msgHandler; String str15 = "webViewId"; msgHandler.getClass(); String str16 = "wxappPathWithQuery"; String str17 = "geta8key_init_request_id"; String str18 = (String) h1Var.f247819a.get("current"); String[] strArr4 = (String[]) h1Var.f247819a.get("urls"); int i25 = Util.getInt((String) h1Var.f247819a.get("currentPos"), -1); int i26 = Util.getInt((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 0); ArrayList arrayList = new ArrayList(); if (strArr4 == null || strArr4.length == 0) { Log.e("MicroMsg.MsgHandler", "doImgPreview fail, urls is null"); msgHandler2.f167375u = false; msgHandler2.q5(h1Var, "imagePreview:fail_urls_invalid", null); return false; } int i27 = 0; while (i27 < strArr4.length) { if (Util.isNullOrNil(strArr4[i27]) || strArr4[i27].equalsIgnoreCase("null")) { Log.e("MicroMsg.MsgHandler", "null url, i = %d", Integer.valueOf(i27)); } else { if (Util.nullAsNil(strArr4[i27]).startsWith("weixin://resourceid/")) { strArr4[i27] = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(strArr4[i27]).f165430g; } arrayList.add(strArr4[i27]); } i27++; str15 = str15; str17 = str17; str16 = str16; } String[] strArr5 = (String[]) arrayList.toArray(strArr4); String[] strArr6 = (String[]) arrayList.toArray(new String[arrayList.size()]); if (Util.isNullOrNil(str18)) { str18 = strArr5[0]; } else if (str18.startsWith("weixin://resourceid/")) { str18 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str18).f165430g; } String str19 = ""; if (((String) h1Var.f247819a.get("liteAppId")) != null) { String[] strArr7 = (String[]) h1Var.f247819a.get("localCacheIds"); if (strArr7 != null) { int[] iArr = new int[strArr7.length]; for (int i28 = 0; i28 < strArr7.length; i28++) { iArr[i28] = Integer.parseInt(strArr7[i28]); } strArr = strArr6; str = "MicroMsg.MsgHandler"; strArr2 = LiteAppCenter.getResourcePath(Long.parseLong((String) h1Var.f247819a.get("liteAppPtr")), Long.parseLong((String) h1Var.f247819a.get("liteAppPageId")), iArr); } else { str = "MicroMsg.MsgHandler"; strArr = strArr6; strArr2 = null; } if (strArr2 != null) { ArrayList arrayList2 = new ArrayList(); for (int i29 = 0; i29 < strArr2.length; i29++) { if (Util.isNullOrNil(strArr2[i29]) || strArr2[i29].equalsIgnoreCase("null")) { arrayList2.add(str19); } else { arrayList2.add(strArr2[i29]); } } strArr2 = (String[]) arrayList2.toArray(strArr2); } } else { str = "MicroMsg.MsgHandler"; strArr = strArr6; strArr2 = null; } Intent intent = new Intent(); if (h1Var.f247819a.containsKey("key_wxapp_id")) { String str20 = (String) h1Var.f247819a.get("key_wxapp_id"); ((r21.d) z.q(r21.d.class)).gk0((String) h1Var.f247819a.get("url")); if (!Util.isNullOrNil(str20)) { intent.putExtra("isFromAppBrandWebView", true); } str2 = str20; } else { str2 = null; } try { Bundle bundle = new Bundle(); bundle.putString("currentPicUrl", str18); try { Bundle v65 = msgHandler2.f167378x.v6(90001, bundle); if (v65 != null) { try { String string4 = v65.getString("cookie", null); if (!Util.isNullOrNil(string4)) { intent.putExtra("cookie", string4); } f15 = v65.getFloat(Constants.PARAM_DENSITY, -1.0f); int i35 = v65.getInt("topOffset", -1); str10 = v65.getString("currentUrlPath", str19); i17 = i35; } catch (Exception e16) { e15 = e16; strArr3 = strArr2; str3 = str18; str4 = str19; str7 = str17; str8 = str16; str9 = str; z15 = true; i16 = 1; i15 = 0; str5 = str4; str6 = str2; Object[] objArr = new Object[i16]; objArr[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle2 = new Bundle(); bundle2.putInt("stat_scene", 4); bundle2.putInt(str7, i15); bundle2.putString("stat_url", str19); bundle2.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle2); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } else { f15 = -1.0f; i17 = -1; str10 = str19; } strArr3 = strArr2; str3 = str18; } catch (Exception e17) { e15 = e17; strArr3 = strArr2; str3 = str18; str4 = str19; str7 = str17; str8 = str16; str9 = str; str6 = str2; str19 = str4; str5 = str19; z15 = true; i16 = 1; i15 = 0; Object[] objArr2 = new Object[i16]; objArr2[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr2); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle22 = new Bundle(); bundle22.putInt("stat_scene", 4); bundle22.putInt(str7, i15); bundle22.putString("stat_url", str19); bundle22.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle22); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } try { Bundle v66 = msgHandler2.f167378x.v6(18, null); if (v66 != null) { try { string = v66.getString("preChatName"); string2 = v66.getString("preUsername"); i18 = i17; string3 = v66.getString("rawUrl"); f16 = f15; str12 = v66.getString("url", str19); } catch (Exception e18) { e15 = e18; str4 = str19; str7 = str17; str11 = str16; str9 = str; str6 = str2; str12 = str4; str5 = str12; str19 = str12; z15 = true; i15 = 0; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr22 = new Object[i16]; objArr22[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr22); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle222 = new Bundle(); bundle222.putInt("stat_scene", 4); bundle222.putInt(str7, i15); bundle222.putString("stat_url", str19); bundle222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } try { str5 = v66.getString(str16, str19); str11 = str16; try { i19 = v66.getInt("getA8KeyScene"); if (!Util.isNullOrNil(str2)) { str4 = str19; try { intent.putExtra("wxaSessionId", v66.getString("wxappSessionId")); intent.putExtra("wxaScene", v66.getInt("wxappScene")); i19 = 44; } catch (Exception e19) { e15 = e19; msgHandler2 = msgHandler; str19 = str12; str7 = str17; str9 = str; str8 = str11; z15 = true; i16 = 1; i15 = 0; str6 = str2; Object[] objArr222 = new Object[i16]; objArr222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle2222 = new Bundle(); bundle2222.putInt("stat_scene", 4); bundle2222.putInt(str7, i15); bundle2222.putString("stat_url", str19); bundle2222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle2222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } else { str4 = str19; } str6 = str2; try { i15 = v66.getInt(str17, 0); try { intent.putExtra(str15, v66.getInt(str15)); a16 = nf0.z0.a("ImgPreview"); str7 = str17; } catch (Exception e25) { e15 = e25; str7 = str17; str9 = str; str13 = str4; z15 = true; str4 = str13; str19 = str12; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr2222 = new Object[i16]; objArr2222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr2222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle22222 = new Bundle(); bundle22222.putInt("stat_scene", 4); bundle22222.putInt(str7, i15); bundle22222.putString("stat_url", str19); bundle22222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle22222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } catch (Exception e26) { e15 = e26; str7 = str17; str9 = str; str19 = str12; z15 = true; i15 = 0; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr22222 = new Object[i16]; objArr22222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr22222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle222222 = new Bundle(); bundle222222.putInt("stat_scene", 4); bundle222222.putInt(str7, i15); bundle222222.putString("stat_url", str19); bundle222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } catch (Exception e27) { e15 = e27; str4 = str19; str7 = str17; str9 = str; str6 = str2; str19 = str12; z15 = true; i15 = 0; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr222222 = new Object[i16]; objArr222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle2222222 = new Bundle(); bundle2222222.putInt("stat_scene", 4); bundle2222222.putInt(str7, i15); bundle2222222.putString("stat_url", str19); bundle2222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle2222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } try { z0.c c15 = nf0.z0.d().c(a16, true); c15.i("preUsername", string); c15.i("preChatName", string2); c15.i("url", str12); c15.i("rawUrl", string3); int i36 = !((r21.d) z.q(r21.d.class)).gk0(str12) ? 6 : 1; c15.i("Contact_Scene_Note", str12); c15.i("Contact_Sub_Scene", Integer.valueOf(i36)); if (i19 != 53) { if (i19 != 52) { str9 = str; z15 = true; try { intent.putExtra("scanQrCodeGetA8KeyScene", i19); intent.putExtra("nowWebUrl", str12); intent.putExtra("KScene", i26); intent.putExtra("img_gallery_session_id", a16); if (w0.D(string2)) { str4 = string; } str19 = str12; } catch (Exception e28) { e15 = e28; str19 = str12; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr2222222 = new Object[i16]; objArr2222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr2222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle22222222 = new Bundle(); bundle22222222.putInt("stat_scene", 4); bundle22222222.putInt(str7, i15); bundle22222222.putString("stat_url", str19); bundle22222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle22222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } } str9 = str; } catch (Exception e29) { e15 = e29; str9 = str; str13 = str4; z15 = true; str4 = str13; str19 = str12; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr22222222 = new Object[i16]; objArr22222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr22222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle222222222 = new Bundle(); bundle222222222.putInt("stat_scene", 4); bundle222222222.putInt(str7, i15); bundle222222222.putString("stat_url", str19); bundle222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } try { Log.i(str9, "not allow to ScanQRCode"); z15 = false; intent.putExtra("scanQrCodeGetA8KeyScene", i19); intent.putExtra("nowWebUrl", str12); intent.putExtra("KScene", i26); intent.putExtra("img_gallery_session_id", a16); if (w0.D(string2)) { } str19 = str12; } catch (Exception e35) { e15 = e35; str13 = str4; z15 = true; str4 = str13; str19 = str12; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr222222222 = new Object[i16]; objArr222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle2222222222 = new Bundle(); bundle2222222222.putInt("stat_scene", 4); bundle2222222222.putInt(str7, i15); bundle2222222222.putString("stat_url", str19); bundle2222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle2222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } catch (Exception e36) { e15 = e36; str11 = str16; str4 = str19; str7 = str17; str9 = str; str6 = str2; str5 = str4; str19 = str12; z15 = true; i15 = 0; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr2222222222 = new Object[i16]; objArr2222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr2222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle22222222222 = new Bundle(); bundle22222222222.putInt("stat_scene", 4); bundle22222222222.putInt(str7, i15); bundle22222222222.putString("stat_url", str19); bundle22222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle22222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } else { str4 = str19; f16 = f15; i18 = i17; str7 = str17; str11 = str16; str9 = str; str6 = str2; str5 = str19; z15 = true; i15 = 0; } } catch (Exception e37) { e15 = e37; str4 = str19; str7 = str17; str8 = str16; str9 = str; str6 = str2; str19 = str4; str5 = str19; z15 = true; i16 = 1; i15 = 0; Object[] objArr22222222222 = new Object[i16]; objArr22222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr22222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle222222222222 = new Bundle(); bundle222222222222.putInt("stat_scene", 4); bundle222222222222.putInt(str7, i15); bundle222222222222.putString("stat_url", str19); bundle222222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle222222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } try { String str21 = (String) h1Var.f247819a.get("currentInfo"); if (!Util.isNullOrNil(str21)) { try { jSONObject = new JSONObject(str21); if (com.tencent.mm.plugin.webview.modeltools.v.a(str10)) { intent.putExtra("nowUrlPath", str10); } } catch (Exception e38) { e15 = e38; str12 = str19; str13 = str4; str4 = str13; str19 = str12; i16 = 1; msgHandler2 = msgHandler; str8 = str11; Object[] objArr222222222222 = new Object[i16]; objArr222222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr222222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle2222222222222 = new Bundle(); bundle2222222222222.putInt("stat_scene", 4); bundle2222222222222.putInt(str7, i15); bundle2222222222222.putString("stat_url", str19); bundle2222222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle2222222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } else { jSONObject = null; } if (!com.tencent.mm.plugin.webview.modeltools.v.f() || jSONObject == null || (optJSONObject = jSONObject.optJSONObject("pos")) == null) { msgHandler2 = msgHandler; str14 = str19; str8 = str11; } else { msgHandler2 = msgHandler; str8 = str11; try { Bundle v67 = msgHandler2.f167378x.v6(107, new Bundle()); if (v67 != null) { z16 = v67.getBoolean("isFullScreen", false); } else { z16 = false; } float g15 = f16 <= 0.0f ? gy3.a.g(msgHandler2.f167360d) : f16; a15 = i18 < 0 ? l5.a(msgHandler2.f167360d) + l5.f(msgHandler2.f167360d) : i18; d15 = (double) g15; optDouble = (int) (optJSONObject.optDouble("width") * d15); optDouble2 = (int) (optJSONObject.optDouble("height") * d15); try { str14 = str19; optDouble3 = (int) (optJSONObject.optDouble("x") * d15); } catch (Exception e39) { e15 = e39; str14 = str19; str19 = str14; i16 = 1; Object[] objArr2222222222222 = new Object[i16]; objArr2222222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr2222222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle22222222222222 = new Bundle(); bundle22222222222222.putInt("stat_scene", 4); bundle22222222222222.putInt(str7, i15); bundle22222222222222.putString("stat_url", str19); bundle22222222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle22222222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } catch (Exception e45) { e15 = e45; str14 = str19; str19 = str14; i16 = 1; Object[] objArr22222222222222 = new Object[i16]; objArr22222222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr22222222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle222222222222222 = new Bundle(); bundle222222222222222.putInt("stat_scene", 4); bundle222222222222222.putInt(str7, i15); bundle222222222222222.putString("stat_url", str19); bundle222222222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle222222222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } try { double optDouble4 = optJSONObject.optDouble("y") * d15; if (z16) { a15 = 0; } intent.putExtra("img_gallery_width", optDouble).putExtra("img_gallery_height", optDouble2).putExtra("img_gallery_left", optDouble3).putExtra("img_gallery_top", (int) (optDouble4 + ((double) a15))); int j15 = gy3.a.j(msgHandler2.f167360d); if (optDouble > 0 && optDouble2 > 0 && optDouble2 < j15) { intent.putExtra("shouldRunDragAnimation", true); } } catch (Exception e46) { e15 = e46; str19 = str14; i16 = 1; Object[] objArr222222222222222 = new Object[i16]; objArr222222222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr222222222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle2222222222222222 = new Bundle(); bundle2222222222222222.putInt("stat_scene", 4); bundle2222222222222222.putInt(str7, i15); bundle2222222222222222.putString("stat_url", str19); bundle2222222222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle2222222222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } str19 = str14; } catch (Exception e47) { e15 = e47; msgHandler2 = msgHandler; str14 = str19; str8 = str11; str19 = str14; i16 = 1; Object[] objArr2222222222222222 = new Object[i16]; objArr2222222222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr2222222222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle22222222222222222 = new Bundle(); bundle22222222222222222.putInt("stat_scene", 4); bundle22222222222222222.putInt(str7, i15); bundle22222222222222222.putString("stat_url", str19); bundle22222222222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle22222222222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } } catch (Exception e48) { e15 = e48; strArr3 = strArr2; str3 = str18; str4 = str19; str9 = str; str7 = str17; str8 = str16; str6 = str2; str19 = str4; str5 = str19; z15 = true; i16 = 1; i15 = 0; Object[] objArr22222222222222222 = new Object[i16]; objArr22222222222222222[0] = e15.getMessage(); Log.e(str9, "doImgPreview fail : %s", objArr22222222222222222); msgHandler2.q5(h1Var, "imagePreview:fail", null); if (h1Var.f247819a.containsKey("pageInfos")) { } if (h1Var.f247819a.containsKey("url")) { } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { } Bundle bundle222222222222222222 = new Bundle(); bundle222222222222222222.putInt("stat_scene", 4); bundle222222222222222222.putInt(str7, i15); bundle222222222222222222.putString("stat_url", str19); bundle222222222222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { } if (!Util.isNullOrNil(str4)) { } intent.putExtra("_stat_obj", bundle222222222222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } if (h1Var.f247819a.containsKey("pageInfos")) { intent.putExtra("pageInfos", (String) h1Var.f247819a.get("pageInfos")); } if (h1Var.f247819a.containsKey("url")) { String str22 = (String) h1Var.f247819a.get("url"); if (Util.isNullOrNil(str22) || (!str22.startsWith("http://mp.weixin.qq.com/s?") && !str22.startsWith("https://mp.weixin.qq.com/s?") && !str22.startsWith("http://mp.weixin.qq.com/s/") && !str22.startsWith("https://mp.weixin.qq.com/s/"))) { intent.putExtra("isOfficialAccountImg", false); } else { intent.putExtra("isOfficialAccountImg", true); } } intent.putExtra("nowUrl", str3); intent.putExtra("urlList", strArr); intent.putExtra("cacheList", strArr3); intent.putExtra("type", -255); intent.putExtra("isFromWebView", true); intent.putExtra("currentPos", i25); intent.putExtra("forBidForward", Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1); intent.putExtra("showmenu", Util.getBoolean((String) h1Var.f247819a.get("showmenu"), true)); intent.putExtra("shouldShowScanQrCodeMenu", z15); if (msgHandler2.f167360d instanceof Service) { intent.addFlags(268435456); } Bundle bundle2222222222222222222 = new Bundle(); bundle2222222222222222222.putInt("stat_scene", 4); bundle2222222222222222222.putInt(str7, i15); bundle2222222222222222222.putString("stat_url", str19); bundle2222222222222222222.putString(str8, str5); if (!Util.isNullOrNil(str6)) { Log.i(str9, "[banjump] doImgPreview, wxappId:%s", str6); bundle2222222222222222222.putString("stat_app_id", str6); } if (!Util.isNullOrNil(str4)) { bundle2222222222222222222.putString("stat_send_msg_user", str4); } intent.putExtra("_stat_obj", bundle2222222222222222222); ((w1) ap3.a.f7840a).o(intent, msgHandler2.f167360d); msgHandler2.q5(h1Var, "imagePreview:ok", null); msgHandler2.f167375u = false; return false; } public static boolean H0(MsgHandler msgHandler, final h1 h1Var) { msgHandler.getClass(); String f15 = p.f(h1Var.f247819a, "businessType"); String s65 = msgHandler.s6(); String o65 = msgHandler.o6(s65); if (Util.isNullOrNil(o65)) { o65 = p.f(h1Var.f247819a, "referrerAppId"); } final HashMap hashMap = new HashMap(); if (Util.isNullOrNil(f15)) { hashMap.put("err_code", -4); msgHandler.q5(h1Var, "openBusinessView:fail invalid businessType", hashMap); } else if (Util.isNullOrNil(o65)) { hashMap.put("err_code", -1); msgHandler.q5(h1Var, "openBusinessView:fail invalid referrerAppId", hashMap); } else { String nullAsNil = Util.nullAsNil(p.f(h1Var.f247819a, "envVersion")); nullAsNil.getClass(); int i15 = !nullAsNil.equals("trial") ? !nullAsNil.equals("develop") ? 0 : 1 : 2; String f16 = p.f(h1Var.f247819a, "queryString"); ((d1) j.c(d1.class)).jP(msgHandler.f167360d, s65, o65, f15, f16, i15, msgHandler.l6()); Log.i("MicroMsg.MsgHandler", "doOpenBusinessView appid:%s, businessType:%s, queryString:%s, referrerUrl:%s", o65, f15, f16, s65); AnonymousClass142 r25 = new IListener<NavigateBackH5Event>(h.f61283d) { /* class com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler.AnonymousClass142 */ { this.__eventId = 123962501; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.tencent.mm.sdk.event.IEvent] */ @Override // com.tencent.mm.sdk.event.IListener public boolean callback(NavigateBackH5Event navigateBackH5Event) { NavigateBackH5Event navigateBackH5Event2 = navigateBackH5Event; MsgHandler.this.f167379x0.dead(); Log.i("MicroMsg.MsgHandler", "doOpenBusinessView errCode %d", Integer.valueOf(navigateBackH5Event2.f63563d.f63564a)); hashMap.put("err_code", Integer.valueOf(navigateBackH5Event2.f63563d.f63564a)); NavigateBackH5Event.a aVar = navigateBackH5Event2.f63563d; int i15 = aVar.f63564a; if (i15 == -4) { MsgHandler.this.q5(h1Var, "openBusinessView:fail invalid businessType", hashMap); } else if (i15 == -3) { MsgHandler.this.q5(h1Var, "openBusinessView:fail cancel", hashMap); } else if (i15 == -2) { MsgHandler.this.q5(h1Var, "openBusinessView:fail request CGI error", hashMap); } else if (i15 != 0) { MsgHandler.this.q5(h1Var, "openBusinessView:fail system error", hashMap); } else { hashMap.put("extraData", aVar.f63566c); MsgHandler.this.q5(h1Var, "openBusinessView:ok", hashMap); } return false; } }; msgHandler.f167379x0 = r25; r25.alive(); } return true; } public static boolean H1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doLoginOrAuthorize!"); f0 f0Var = new f0(msgHandler, h1Var); if (!f167358m1) { f167358m1 = true; f0Var.run(); } else { f167357l1.add(f0Var); Log.i("MicroMsg.MsgHandler", "add to authJsApiQueue!"); } return true; } public static boolean H2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; int i15 = msgHandler.f167370p0; msgHandler.f167370p0 = i15 + 1; Bundle b15 = h1.b(h1Var.f247819a); if (!b15.containsKey("playerId")) { b15.putString("playerId", String.valueOf(i15)); } else { i15 = Util.safeParseInt(b15.getString("playerId")); } Log.i("MicroMsg.MsgHandler", "inserting video player id %d, params %s", Integer.valueOf(i15), h1Var.f247819a); try { m mVar = msgHandler.f167378x; if (mVar != null) { mVar.callback(200000, b15); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "doInsertVideoPlayer exception" + e15.getMessage()); } HashMap hashMap = new HashMap(); hashMap.put("playerId", Integer.valueOf(i15)); msgHandler.q5(h1Var, "insertVideoPlayer:ok", hashMap); return true; } public static boolean H3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); HashMap hashMap = new HashMap(); String str = (String) h1Var.f247819a.get("desc"); if (str == null || "".equals(str)) { str = MMApplicationContext.getContext().getString(R.string.f368581fb2); } if (((xw.d) j.c(xw.d.class)).ar(MMApplicationContext.getContext())) { hashMap.put("ret", 0); msgHandler.q5(h1Var, "requestOverlayPermission:ok", hashMap); return true; } ((xw.c) j.c(xw.c.class)).zQ(MMApplicationContext.getContext(), str, new c1(msgHandler, hashMap, h1Var), true, bu3.a.b()); return true; } public static boolean H4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); a0.a aVar = new a0.a(); aVar.f165889b = (String) ((HashMap) h1Var.f247819a).get("link"); aVar.f165888a = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); aVar.f165891d = (String) ((HashMap) h1Var.f247819a).get("imgUrl"); if (Util.isNullOrNil(aVar.f165889b)) { Log.i("MicroMsg.MsgHandler", "doUpdateTimelineData link not allow to share %s", aVar.f165889b); msgHandler.q5(h1Var, "updateTimelineShareData:fail, link is needed.", null); } else if (msgHandler.a7(jsapiPermissionWrapper, h1Var)) { Log.i("MicroMsg.MsgHandler", "doUpdateTimelineData link not allow to share %s", aVar.f165889b); msgHandler.q5(h1Var, "updateTimelineShareData:fail, link must be in JS secure domain list", null); } else { String str = (String) ((HashMap) h1Var.f247819a).get("url"); Log.i("MicroMsg.MsgHandler", "doUpdateTimelineData url %s, imgUrl:%s", str, aVar.f165891d); msgHandler.E.f165885b.put(str, aVar); String r65 = msgHandler.r6(); if (!Util.isNullOrNil(r65)) { msgHandler.E.f165885b.put(r65, aVar); } msgHandler.q5(h1Var, "updateTimelineShareData:ok", null); } return true; } public static boolean I(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "hideNavBarShadow"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "hideNavBarShadow"); try { ((o0) j.c(o0.class)).vC(p.e(map, "webview_instance_id", -1)); } catch (Throwable unused) { } return false; } public static boolean I0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("idKeyDataInfo"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "idkey data is null"); msgHandler.q5(h1Var, "reportIDKey:fail_invaild_parms", null); } else { try { JSONArray jSONArray = new JSONArray(str); ArrayList<IDKey> arrayList = new ArrayList<>(); for (int i15 = 0; i15 < jSONArray.length(); i15++) { JSONObject optJSONObject = jSONArray.optJSONObject(i15); IDKey iDKey = new IDKey(); iDKey.SetID(Util.getInt(optJSONObject.optString("id"), 0)); iDKey.SetKey(Util.getInt(optJSONObject.optString("key"), 0)); iDKey.SetValue((long) Util.getInt(optJSONObject.optString("value"), 0)); arrayList.add(iDKey); } if (arrayList.size() > 0) { q.INSTANCE.a(arrayList, true); msgHandler.q5(h1Var, "reportIDKey:ok", null); } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "parse json array faild : %s", e15.getMessage()); } msgHandler.q5(h1Var, "reportIDKey:fail", null); } return false; } public static boolean I1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "hy: start do check is support face detect"); GetIsSupportFaceEvent getIsSupportFaceEvent = new GetIsSupportFaceEvent(); getIsSupportFaceEvent.publish(); GetIsSupportFaceEvent.a aVar = getIsSupportFaceEvent.f63171d; boolean z15 = aVar.f63172a; int i15 = aVar.f63173b; String str = aVar.f63174c; int i16 = aVar.f63175d; Log.i("MicroMsg.MsgHandler", "hy: is support: %b, errCode: %d, errMsg: %s, ilbVersion: %d", Boolean.valueOf(z15), Integer.valueOf(i15), str, Integer.valueOf(i16)); HashMap hashMap = new HashMap(); hashMap.put("err_code", "" + i15); hashMap.put("err_msg", str); hashMap.put("lib_version_code", "" + i16); msgHandler.q5(h1Var, "doCheckIsSupportFaceDetect: ok", hashMap); return true; } public static boolean I2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; Bundle b15 = h1.b(h1Var.f247819a); Log.i("MicroMsg.MsgHandler", "update video player params %s", h1Var.f247819a); try { m mVar = msgHandler.f167378x; if (mVar != null) { mVar.callback(200001, b15); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "doInsertVideoPlayer exception" + e15.getMessage()); } msgHandler.q5(h1Var, "updateVideoPlayer:ok", null); return true; } public static boolean I3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "openNewLifeProfile"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); boolean z15 = true; Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "openFinderProfile %s", map); String f15 = p.f(map, "userName"); String f16 = p.f(map, "reportExtraInfo"); Intent intent = new Intent(); intent.putExtra("finder_username", f15); intent.putExtra("report_scene", 14); intent.putExtra("key_enter_profile_type", 1); intent.putExtra("key_extra_info", f16); if (p.e(map, "isInsideFinder", 0) != 1 && !p.d(map, "isInsideFinder", false)) { z15 = false; } int e15 = p.e(map, "commentScene", 0); intent.putExtra("key_is_in_finder", z15); intent.putExtra("key_entry_type", e15); ((e2) j.c(e2.class)).I7(6, 2, 213, intent); ((e2) j.c(e2.class)).i2(MMApplicationContext.getContext(), intent); return false; } public static boolean I4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("jsApiList"); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "checkJsApi:param is empty", null); } else { try { JSONObject jSONObject = new JSONObject(); JSONArray jSONArray = new JSONArray(str); if (jSONArray.length() == 0) { msgHandler.q5(h1Var, "checkJsApi:param is empty", null); } else { for (int i15 = 0; i15 < jSONArray.length(); i15++) { String string = jSONArray.getString(i15); if (f0.f164574a.a(string) == null) { if (!c.we.a(string)) { z15 = false; jSONObject.put(string, z15); } } z15 = true; jSONObject.put(string, z15); } HashMap hashMap = new HashMap(); hashMap.put("checkResult", jSONObject.toString()); msgHandler.q5(h1Var, "checkJsApi:ok", hashMap); } } catch (JSONException e15) { Log.w("MicroMsg.MsgHandler", "JSONException : %s", e15.getMessage()); msgHandler.q5(h1Var, "checkJsApi:param is empty", null); } } return true; } public static boolean J(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", com.tencent.mm.plugin.appbrand.jsapi.finder.i.NAME); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); boolean z15 = true; Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "openFinderProfile %s", map); String f15 = p.f(map, "userName"); String f16 = p.f(map, "reportExtraInfo"); Intent intent = new Intent(); intent.putExtra("finder_username", f15); intent.putExtra("report_scene", 14); intent.putExtra("key_enter_profile_type", 1); intent.putExtra("key_extra_info", f16); if (p.e(map, "isInsideFinder", 0) != 1 && !p.d(map, "isInsideFinder", false)) { z15 = false; } int e15 = p.e(map, "commentScene", 0); intent.putExtra("key_is_in_finder", z15); intent.putExtra("key_entry_type", e15); ((e2) j.c(e2.class)).I7(6, 2, 32, intent); ((e2) j.c(e2.class)).i2(MMApplicationContext.getContext(), intent); return false; } public static boolean J0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (((jt.b) j.c(jt.b.class)).tn0()) { Log.i("MicroMsg.MsgHandler", "eu user just return fail"); msgHandler.q5(h1Var, "add_contact:fail EU user failed", null); return true; } String str = (String) h1Var.f247819a.get("username"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "user name is null or nil"); msgHandler.q5(h1Var, "add_contact:fail", null); return false; } String str2 = (String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE); String str3 = (String) h1Var.f247819a.get("scenenote"); Log.i("MicroMsg.MsgHandler", "doQuicklyAddContact scene = %s, sceneNote = %s", str2, str3); int i15 = Util.getInt(str2, 91); cu3.a aVar = new cu3.a(); aVar.f193992a = (String) h1Var.f247819a.get("profileReportInfo"); aVar.f193993b = 4; aVar.f193994c = str3; aVar.f193995d = (String) h1Var.f247819a.get("finderBuffer"); aVar.f193996e = (String) h1Var.f247819a.get("searchClickId"); aVar.f193998g = false; MMHandlerThread.postToMainThread(new q(msgHandler, ((cu3.v) j.c(cu3.v.class)).Hb(msgHandler.f167360d, str, i15, new w3(msgHandler, h1Var), aVar))); return true; } public static boolean J1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) ((HashMap) h1Var.f247819a).get("operationType"); Log.i("MicroMsg.MsgHandler", "doOperateBackgroundAudio(), optype:%s", str); o1.a(h1Var.f247862h, false, null, msgHandler.n6()); if (!msgHandler.y6(h1Var)) { Log.e("MicroMsg.MsgHandler", "doOperateBackgroundAudio getMusicPermission is false"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } else if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "doOperateBackgroundAudio optype is empty"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } else { msgHandler.f167381y0.alive(); if (str.equalsIgnoreCase(AssetExtension.SCENE_PLAY)) { if (bh0.j.c()) { msgHandler.q5(h1Var, "operateBackgroundAudio:ok", null); } else { Log.e("MicroMsg.MsgHandler", "operateBackgroundAudio play fail"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } } else if (str.equalsIgnoreCase("resume")) { if (bh0.j.c()) { msgHandler.q5(h1Var, "operateBackgroundAudio:ok", null); } else { Log.e("MicroMsg.MsgHandler", "operateBackgroundAudio resume fail"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } } else if (str.equalsIgnoreCase("pause")) { if (bh0.j.b()) { MMHandlerThread.postToMainThread(new bh0.g()); msgHandler.q5(h1Var, "operateBackgroundAudio:ok", null); } else { Log.e("MicroMsg.MsgHandler", "operateBackgroundAudio pause fail"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } } else if (str.equalsIgnoreCase("seek")) { int i15 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("currentTime"), -1); Log.i("MicroMsg.MsgHandler", "currentTime:%d", Integer.valueOf(i15)); if (i15 < 0) { Log.e("MicroMsg.MsgHandler", "currentTime is invalid!"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } else if (d.i(i15 * 1000)) { msgHandler.q5(h1Var, "operateBackgroundAudio:ok", null); } else { Log.e("MicroMsg.MsgHandler", "operateBackgroundAudio seek fail"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } } else if (str.equalsIgnoreCase("stop")) { if (bh0.j.d()) { msgHandler.q5(h1Var, "operateBackgroundAudio:ok", null); } else { Log.e("MicroMsg.MsgHandler", "operateBackgroundAudio stop fail"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } } else if (str.equalsIgnoreCase("next")) { MMHandlerThread.postToMainThread(new e()); msgHandler.q5(h1Var, "operateBackgroundAudio:ok", null); } else if (str.equalsIgnoreCase("pre")) { MMHandlerThread.postToMainThread(new f()); msgHandler.q5(h1Var, "operateBackgroundAudio:ok", null); } else { Log.e("MicroMsg.MsgHandler", "operateBackgroundAudio fail, invalid opeType"); msgHandler.q5(h1Var, "operateBackgroundAudio:fail", null); } } return true; } public static boolean J2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; Bundle b15 = h1.b(h1Var.f247819a); Log.i("MicroMsg.MsgHandler", "remove video player params %s", h1Var.f247819a); try { m mVar = msgHandler.f167378x; if (mVar != null) { mVar.callback(200002, b15); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "doRemoveVideoPlayer exception" + e15.getMessage()); } msgHandler.q5(h1Var, "removeVideoPlayer:ok", null); return true; } public static boolean J3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "openNewLifeDetailPage"); msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); try { String f15 = p.f(map, "feedId"); String f16 = p.f(map, "nonceId"); int e15 = p.e(map, "fromScene", 14); ((gw.h) j.c(gw.h.class)).YI("newlife_reportExtraInfo", p.f(map, "reportExtraInfo")); p.e(map, "webview_instance_id", -1); gx0.r.b(new com.tencent.mm.plugin.websearch.i(fTSWebViewLogic, f16, f15, e15)); } catch (Exception unused) { } return false; } public static boolean J4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get(l3.COL_LOCALID); Object obj = h1Var.f247819a.get("isShowProgressTips"); if (obj != null) { try { z15 = Util.getInt(obj.toString(), 0) == 1; } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "Exception has occured : %s", e15.getMessage()); } Log.i("MicroMsg.MsgHandler", "isShowProgressTips(%s)", Boolean.valueOf(z15)); o1.a(h1Var.f247862h, false, null, str); if (!Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.i("MicroMsg.MsgHandler", "The localId(%s) is null or appId(%s) is null.", str2, str); msgHandler.q5(h1Var, "translateVoice:fail_missing arguments", null); } else { WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str2); if (b15 != null) { MMHandlerThread.postToMainThread(new g3(msgHandler, z15, h1Var, str2, b15)); } else { msgHandler.q5(h1Var, "translateVoice:fail_arguments error", null); } } return true; } z15 = true; Log.i("MicroMsg.MsgHandler", "isShowProgressTips(%s)", Boolean.valueOf(z15)); o1.a(h1Var.f247862h, false, null, str); if (!Util.isNullOrNil(str)) { } Log.i("MicroMsg.MsgHandler", "The localId(%s) is null or appId(%s) is null.", str2, str); msgHandler.q5(h1Var, "translateVoice:fail_missing arguments", null); return true; } public static List<String> J6(JSONArray jSONArray) { if (jSONArray == null || jSONArray.length() <= 0) { return new LinkedList(); } LinkedList linkedList = new LinkedList(); for (int i15 = 0; i15 < jSONArray.length(); i15++) { linkedList.add(jSONArray.optString(i15)); } return linkedList; } public static boolean K(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; ((FTSWebViewLogic) com.tencent.mm.plugin.webview.modeltools.m.ka()).e(h1Var.f247819a); return false; } /* JADX WARNING: Removed duplicated region for block: B:62:0x010e A[ADDED_TO_REGION] */ /* JADX WARNING: Removed duplicated region for block: B:65:0x0115 A[ADDED_TO_REGION] */ /* JADX WARNING: Removed duplicated region for block: B:70:0x0126 */ /* JADX WARNING: Removed duplicated region for block: B:83:0x0173 */ public static boolean K0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; int[] iArr; int i15; boolean z16; msgHandler.getClass(); int i16 = Util.getInt((String) h1Var.f247819a.get("needResult"), 1); String str = (String) h1Var.f247819a.get("scanType"); Log.i("MicroMsg.MsgHandler", "desc : %s, scene : %d, scanType : %s", (String) h1Var.f247819a.get("desc"), Integer.valueOf(i16), str); boolean isNullOrNil = Util.isNullOrNil(str); ArrayList arrayList = new ArrayList(); try { if (!Util.isNullOrNil(str)) { try { JSONArray jSONArray = new JSONArray(str); z15 = isNullOrNil; for (int i17 = 0; i17 < jSONArray.length(); i17++) { try { String str2 = (String) jSONArray.get(i17); switch (str2.hashCode()) { case -993060056: if (str2.equals("pdf417")) { z16 = true; break; } z16 = true; break; case -952485970: if (str2.equals("qrCode")) { z16 = true; break; } z16 = true; break; case -334537568: if (str2.equals("barCode")) { z16 = false; break; } z16 = true; break; case 2003869675: if (str2.equals("datamatrix")) { z16 = true; break; } z16 = true; break; default: z16 = true; break; } if (!z16) { arrayList.add(1); isNullOrNil = true; } else if (z16) { arrayList.add(2); arrayList.add(3); z15 = true; } else if (z16) { arrayList.add(5); } else if (z16) { arrayList.add(4); } } catch (Exception unused) { i15 = 4; iArr = null; Log.e("MicroMsg.MsgHandler", "doScanQRCode, ex in scanType"); if (z15) { } if (i16 != 0) { } return true; } } } catch (Exception unused2) { z15 = isNullOrNil; i15 = 4; iArr = null; Log.e("MicroMsg.MsgHandler", "doScanQRCode, ex in scanType"); if (z15) { } if (i16 != 0) { } return true; } } else { z15 = isNullOrNil; } if (arrayList.isEmpty()) { arrayList.add(2); arrayList.add(1); i15 = 4; try { arrayList.add(4); } catch (Exception unused3) { iArr = null; Log.e("MicroMsg.MsgHandler", "doScanQRCode, ex in scanType"); if (z15) { } if (i16 != 0) { } return true; } } else { i15 = 4; } iArr = new int[arrayList.size()]; for (int i18 = 0; i18 < arrayList.size(); i18++) { try { iArr[i18] = ((Integer) arrayList.get(i18)).intValue(); } catch (Exception unused4) { Log.e("MicroMsg.MsgHandler", "doScanQRCode, ex in scanType"); if (z15) { } if (i16 != 0) { } return true; } } } catch (Exception unused5) { i15 = 4; z15 = isNullOrNil; iArr = null; Log.e("MicroMsg.MsgHandler", "doScanQRCode, ex in scanType"); if (z15) { } if (i16 != 0) { } return true; } int i19 = (z15 || isNullOrNil) ? (!z15 || !isNullOrNil) ? 1 : i15 : 8; if (i16 != 0) { Intent intent = new Intent(); intent.putExtra("BaseScanUI_select_scan_mode", i19); intent.putExtra("key_show_scan_tips", false); intent.putExtra("key_enable_multi_code", false); intent.putExtra("key_scan_report_enter_scene", 1); if (iArr != null && iArr.length > 0) { intent.putExtra("key_support_scan_code_type", iArr); } if (!zk.a.g(msgHandler.f167360d) && !zk.a.w(msgHandler.f167360d) && !zk.a.c(msgHandler.f167360d, true)) { v.e(intent.getExtras(), "scanner", ".ui.BaseScanUI", msgHandler.f167378x, new k1(msgHandler, intent)); } msgHandler.q5(h1Var, "scanQRCode:ok", null); } else if (i16 == 1) { Intent intent2 = new Intent(); intent2.putExtra("BaseScanUI_select_scan_mode", i19); intent2.putExtra("key_show_scan_tips", false); intent2.putExtra("key_enable_multi_code", false); intent2.putExtra("BaseScanUI_only_scan_qrcode_with_zbar", true); intent2.putExtra("key_set_result_after_scan", true); intent2.putExtra("GetFriendQRCodeUI.INTENT_FROM_ACTIVITY", 3); intent2.putExtra("key_scan_report_enter_scene", 1); if (iArr != null && iArr.length > 0) { intent2.putExtra("key_support_scan_code_type", iArr); } if (!zk.a.g(msgHandler.f167360d) && !zk.a.w(msgHandler.f167360d) && !zk.a.c(msgHandler.f167360d, true)) { WebViewStubTempUI.V7(msgHandler.f167360d, "scanner", ".ui.BaseScanUI", intent2, 15, false, msgHandler.A); } } else { Log.e("MicroMsg.MsgHandler", "unkown scene"); msgHandler.q5(h1Var, "scanQRCode:fail_invalid_scene", null); } return true; } /* JADX DEBUG: Failed to insert an additional move for type inference into block B:70:0x02f6 */ /* JADX DEBUG: Failed to insert an additional move for type inference into block B:49:0x021d */ /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Type inference failed for: r14v7, types: [int, boolean] */ /* JADX WARN: Type inference failed for: r0v31 */ /* JADX WARN: Type inference failed for: r0v49 */ /* JADX WARN: Type inference failed for: r0v54 */ /* JADX WARN: Type inference failed for: r14v16 */ /* JADX WARN: Type inference failed for: r0v56 */ /* JADX WARN: Type inference failed for: r15v12, types: [com.tencent.mm.plugin.webview.ui.tools.media.x] */ /* JADX WARN: Type inference failed for: r2v8 */ /* JADX WARN: Type inference failed for: r1v24, types: [org.json.JSONArray] */ /* JADX WARN: Type inference failed for: r44v12 */ /* JADX WARN: Type inference failed for: r15v15 */ /* JADX WARN: Type inference failed for: r2v11 */ /* JADX WARN: Type inference failed for: r1v27 */ /* JADX WARN: Type inference failed for: r1v32, types: [org.json.JSONObject] */ /* JADX WARN: Type inference failed for: r44v15, types: [java.lang.String] */ /* JADX WARN: Type inference failed for: r2v14 */ /* JADX WARN: Type inference failed for: r2v16 */ /* JADX WARN: Type inference failed for: r1v34 */ /* JADX WARN: Type inference failed for: r44v17 */ /* JADX WARN: Type inference failed for: r2v17 */ /* JADX WARN: Type inference failed for: r15v17 */ /* JADX WARN: Type inference failed for: r44v19 */ /* JADX WARN: Type inference failed for: r15v19 */ /* JADX WARN: Type inference failed for: r2v19 */ /* JADX WARN: Type inference failed for: r1v36 */ /* JADX WARN: Type inference failed for: r1v38, types: [java.lang.String] */ /* JADX WARN: Type inference failed for: r2v21, types: [java.lang.String] */ /* JADX WARN: Type inference failed for: r44v21 */ /* JADX WARN: Type inference failed for: r15v21, types: [java.lang.String] */ /* JADX WARN: Type inference failed for: r15v24, types: [java.lang.String] */ /* JADX WARN: Type inference failed for: r2v25, types: [double] */ /* JADX WARN: Type inference failed for: r1v40, types: [com.tencent.mm.plugin.webview.ui.tools.media.x] */ /* JADX WARN: Type inference failed for: r2v27, types: [java.util.ArrayList] */ /* JADX WARN: Type inference failed for: r2v28 */ /* JADX WARN: Type inference failed for: r15v25 */ /* JADX WARN: Type inference failed for: r1v41 */ /* JADX WARN: Type inference failed for: r3v33, types: [org.json.JSONObject] */ /* JADX WARN: Type inference failed for: r2v33 */ /* JADX WARN: Type inference failed for: r2v34 */ /* JADX WARN: Type inference failed for: r1v42 */ /* JADX WARN: Type inference failed for: r2v35 */ /* JADX WARN: Type inference failed for: r15v27 */ /* JADX WARN: Type inference failed for: r14v27 */ /* JADX WARN: Type inference failed for: r14v28 */ /* JADX WARNING: Removed duplicated region for block: B:132:0x0540 */ /* JADX WARNING: Removed duplicated region for block: B:133:0x0546 */ /* JADX WARNING: Removed duplicated region for block: B:140:0x0595 */ /* JADX WARNING: Removed duplicated region for block: B:143:0x05c8 */ /* JADX WARNING: Removed duplicated region for block: B:170:0x0494 A[SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:70:0x02f6 A[SYNTHETIC, Splitter:B:70:0x02f6] */ /* JADX WARNING: Unknown variable types count: 6 */ public static boolean K1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { double d15; int i15; String str; String str2; String str3; String str4; String str5; String str6; double d16; double d17; int i16; String str7; int i17; ?? r05; Map<String, Object> map; int i18; int i19; ArrayList arrayList; x xVar; int i25; double d18; int i26; String str8; int i27; x xVar2; Exception e15; double d19; String str9; ArrayList arrayList2; x xVar3; x xVar4; double d25; ArrayList arrayList3; String str10; double d26; double d27; String str11; ArrayList arrayList4; x xVar5; ArrayList arrayList5; String str12; n a15; String str13; String str14; String str15; LinkedList<String> linkedList; h1 h1Var2 = h1Var; msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doSetBackgroundAudioState()"); msgHandler.L6(false); String n65 = msgHandler.n6(); Log.i("MicroMsg.MsgHandler", "appId:%s", n65); o1.a(h1Var2.f247862h, false, null, n65); String str16 = (String) ((HashMap) h1Var2.f247819a).get("url"); String c15 = !Util.isNullOrNil(str16) ? up3.b.c(str16) : null; String str17 = (String) ((HashMap) h1Var2.f247819a).get("src"); String str18 = (String) ((HashMap) h1Var2.f247819a).get("lowbandSrc"); String str19 = (String) ((HashMap) h1Var2.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str20 = (String) ((HashMap) h1Var2.f247819a).get("epname"); String str21 = (String) ((HashMap) h1Var2.f247819a).get("singer"); String str22 = (String) ((HashMap) h1Var2.f247819a).get("coverImgUrl"); String str23 = (String) ((HashMap) h1Var2.f247819a).get("webUrl"); int i28 = Util.getInt((String) ((HashMap) h1Var2.f247819a).get("startTime"), 0); String str24 = (String) ((HashMap) h1Var2.f247819a).get("srcId"); String str25 = (String) ((HashMap) h1Var2.f247819a).get("protocol"); String str26 = (String) ((HashMap) h1Var2.f247819a).get("musicbar_url"); boolean f15 = jsapiPermissionWrapper.f(308); String str27 = (String) ((HashMap) h1Var2.f247819a).get("songLyric"); String str28 = (String) ((HashMap) h1Var2.f247819a).get("src_username"); int i29 = Util.getInt((String) ((HashMap) h1Var2.f247819a).get("needStartMusicUI"), 0); double d28 = (double) Util.getFloat((String) ((HashMap) h1Var2.f247819a).get("playbackRate"), 1.0f); int i35 = (d28 > 0.5d ? 1 : (d28 == 0.5d ? 0 : -1)); double d29 = (double) Util.getFloat((String) ((HashMap) h1Var2.f247819a).get("volume"), 1.0f); if (i35 < 0 || d28 > 2.0d) { d28 = 1.0d; } if (TextUtils.isEmpty(str27)) { Log.e("MicroMsg.MsgHandler", "songLyric is empty"); d15 = d28; } else { d15 = d28; Log.i("MicroMsg.MsgHandler", "songLyric:%s", str27); } if (str22 == null) { str22 = ""; } String str29 = (String) ((HashMap) h1Var2.f247819a).get("albumId"); String str30 = (String) ((HashMap) h1Var2.f247819a).get("audioList"); String str31 = (String) ((HashMap) h1Var2.f247819a).get("playAudioId"); if (x.f168144l == null) { synchronized (x.class) { if (x.f168144l == null) { i15 = i29; Context context = MMApplicationContext.getContext(); str = str28; lh4.m.f(context, "getContext()"); x xVar6 = new x(context, null); x.f168144l = xVar6; IListener<MusicPlayerEvent> iListener = xVar6.f168150f; if (iListener != null) { iListener.alive(); } } else { i15 = i29; str = str28; } b0 b0Var = b0.f332794a; } } else { i15 = i29; str = str28; } x xVar7 = x.f168144l; String str32 = "audioId"; String str33 = ""; xVar7.f168148d = c15; String str34 = "MicroMsg.MusicAlbumHelper"; if (Util.isNullOrNil(str30) || Util.isNullOrNil(str29) || Util.isNullOrNil(str31)) { i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; str7 = c15; str6 = str; d17 = d29; d16 = d15; i18 = 1; Log.i(str34, "playAudioList invalid params"); } else { try { JSONArray jSONArray = new JSONArray(str30); if (jSONArray.length() <= 0) { Log.i(str34, "playAudioList invalid mAudioList"); } else { ArrayList arrayList6 = new ArrayList(); try { xVar7.f168146b = new gt5(); xVar7.f168147c = str29; int length = jSONArray.length(); ArrayList arrayList7 = arrayList6; int i36 = 0; i26 = 0; ?? r15 = jSONArray; ?? r25 = h1Var2; ?? r152 = xVar7; while (i36 < length) { try { Object obj = r15.get(i36); lh4.m.e(obj, "null cannot be cast to non-null type org.json.JSONObject"); r15 = (JSONObject) obj; String optString = r15.optString(str32, str33); if (Util.isNullOrNil(optString)) { Log.i(str34, "playAudioList audioId is empty"); } else { lh4.m.f(optString, str32); lh4.m.d(str29); i16 = i36; String f16 = r152.f(optString, str29, c15); if (lh4.m.b(optString, str31)) { str10 = f16; i26 = i16; } else { str10 = f16; } ?? r442 = r15.optString("src", str33); String optString2 = r15.optString(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String optString3 = r15.optString("epname", str33); String optString4 = r15.optString("singer", str33); String optString5 = r15.optString("coverImgUrl", str33); String optString6 = r15.optString("webUrl"); String optString7 = r15.optString("srcId", str33); String optString8 = r15.optString("protocol", str33); String optString9 = r15.optString("lowbandSrc", str33); String optString10 = r15.optString("musicbar_url", str33); r25 = 4607182418800017408; r25 = 4607182418800017408; try { double optDouble = r15.optDouble("playbackRate", 1.0d); double optDouble2 = r15.optDouble("volume", 1.0d); if (optDouble >= 0.5d) { if (optDouble <= 2.0d) { d26 = optDouble2; r25 = optDouble; String optString11 = r15.optString("songLyric", str33); String optString12 = r15.optString("src_username", str33); int optInt = r15.optInt("startTime", 0); if (Util.isNullOrNil((String) r442)) { try { if (!Util.isNullOrNil(optString2)) { gt5 gt5 = r152.f168146b; if (!(gt5 == null || (linkedList = gt5.f23060e) == null)) { linkedList.add(optString); } d16 = d15; r15 = optString7; r25 = optString10; i16 = i15; str6 = str; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; r442 = d29; r152 = n65; try { a15 = bh0.o.a(10, optString5, optString2, optString4, optString6, optString9, r442, str10, z80.b.E(), bc2.a.a() + optString5.hashCode(), optString3, r152); r152 = c15; } catch (Exception e16) { e15 = e16; arrayList5 = arrayList7; str12 = c15; xVar5 = r152; arrayList4 = arrayList5; str11 = str12; d27 = r442; str34 = str34; xVar3 = xVar5; arrayList2 = arrayList4; str9 = str11; d19 = d27; i27 = 1; xVar2 = xVar3; arrayList = arrayList2; str8 = str9; d18 = d19; Object[] objArr = new Object[i27]; objArr[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } try { a15.C = r152; int i37 = optInt * 1000; a15.D = i37; a15.E = r15; a15.F = optString8; a15.H = r25; a15.f12714q = optString11; a15.I = optString12; r25 = r25; a15.K = r25; a15.L = (float) d26; r15 = r152; try { ht5 e17 = r15.e(str10); if (e17 == null) { e17 = new ht5(); } if (e17.f24151e <= 0) { e17.f24151e = 0; str14 = str29; e17.f24153g = str14; e17.f24152f = optString; e17.f24167x = (float) r25; ?? r35 = r15; JSONObject optJSONObject = r35.optJSONObject("reportData"); if (optJSONObject != null) { e17.f24154h = optJSONObject.optInt("VoiceType", 0); str13 = str33; e17.f24155i = optJSONObject.optString("BizUin", str13); e17.f24156j = optJSONObject.optLong("MsgId", 0); e17.f24157n = optJSONObject.optInt("Idx", 0); e17.f24158o = optJSONObject.optString("SessionIdStr", "0"); e17.f24159p = optJSONObject.optString("AlbumURL", str13); e17.f24160q = optJSONObject.optString("AlbumTitle", str13); e17.f24161r = optJSONObject.optString("AudioTitle", str13); e17.f24162s = optJSONObject.optLong("EnterId", 0); e17.f24163t = optJSONObject.optInt("Scene", 0); e17.f24164u = optJSONObject.optInt("SubScene", 0); String str35 = "AudioPos"; e17.f24165v = optJSONObject.optInt(str35, 0); str15 = str35; } else { str13 = str33; str15 = r35; } e17.f24166w = r152; r15.i(str10, e17); str34 = str15; } else { str14 = str29; str13 = str33; str34 = i37; } r25 = arrayList7; try { r25.add(a15); i36 = i16 + 1; i28 = i15; arrayList7 = r25; str29 = str14; str33 = str13; c15 = r152; length = length; str31 = str31; str32 = str32; i15 = i16; d29 = r442; str34 = str34; d15 = d16; str = str6; str27 = str5; str26 = str4; str25 = str3; str24 = str2; r25 = h1Var; r152 = r15; r15 = r15; } catch (Exception e18) { e15 = e18; xVar5 = r15; arrayList4 = r25; str11 = r152; d27 = r442; str34 = str34; xVar3 = xVar5; arrayList2 = arrayList4; str9 = str11; d19 = d27; i27 = 1; xVar2 = xVar3; arrayList = arrayList2; str8 = str9; d18 = d19; Object[] objArr2 = new Object[i27]; objArr2[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr2); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } } catch (Exception e19) { e15 = e19; arrayList4 = arrayList7; xVar5 = r15; str11 = r152; d27 = r442; str34 = str34; xVar3 = xVar5; arrayList2 = arrayList4; str9 = str11; d19 = d27; i27 = 1; xVar2 = xVar3; arrayList = arrayList2; str8 = str9; d18 = d19; Object[] objArr22 = new Object[i27]; objArr22[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr22); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } } catch (Exception e25) { e15 = e25; arrayList5 = arrayList7; str12 = r152; xVar5 = r152; arrayList4 = arrayList5; str11 = str12; d27 = r442; str34 = str34; xVar3 = xVar5; arrayList2 = arrayList4; str9 = str11; d19 = d27; i27 = 1; xVar2 = xVar3; arrayList = arrayList2; str8 = str9; d18 = d19; Object[] objArr222 = new Object[i27]; objArr222[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr222); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } } } catch (Exception e26) { e15 = e26; i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; xVar5 = r152; str6 = str; d27 = d29; d16 = d15; arrayList4 = arrayList7; str11 = c15; str34 = str34; xVar3 = xVar5; arrayList2 = arrayList4; str9 = str11; d19 = d27; i27 = 1; xVar2 = xVar3; arrayList = arrayList2; str8 = str9; d18 = d19; Object[] objArr2222 = new Object[i27]; objArr2222[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr2222); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } } i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; r15 = r152; str6 = str; r442 = d29; d16 = d15; r25 = arrayList7; r152 = c15; str34 = str34; Log.e(str34, "playAudioList fail, src or title is null"); str7 = r152; d17 = r442; r05 = false; i17 = 1; break; } } d26 = optDouble2; String optString112 = r15.optString("songLyric", str33); String optString122 = r15.optString("src_username", str33); int optInt2 = r15.optInt("startTime", 0); if (Util.isNullOrNil((String) r442)) { } i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; r15 = r152; str6 = str; r442 = d29; d16 = d15; r25 = arrayList7; r152 = c15; str34 = str34; try { Log.e(str34, "playAudioList fail, src or title is null"); str7 = r152; d17 = r442; r05 = false; i17 = 1; break; } catch (Exception e27) { e15 = e27; xVar3 = r15; arrayList2 = r25; str9 = r152; d19 = r442; i27 = 1; xVar2 = xVar3; arrayList = arrayList2; str8 = str9; d18 = d19; Object[] objArr22222 = new Object[i27]; objArr22222[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr22222); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } } catch (Exception e28) { e15 = e28; i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; xVar4 = r152; str6 = str; d25 = d29; d16 = d15; arrayList3 = arrayList7; str34 = str34; str9 = c15; xVar3 = xVar4; arrayList2 = arrayList3; d19 = d25; i27 = 1; xVar2 = xVar3; arrayList = arrayList2; str8 = str9; d18 = d19; Object[] objArr222222 = new Object[i27]; objArr222222[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr222222); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } } } catch (Exception e29) { e15 = e29; i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; xVar4 = r152; str6 = str; d25 = d29; d16 = d15; arrayList3 = arrayList7; str9 = c15; xVar3 = xVar4; arrayList2 = arrayList3; d19 = d25; i27 = 1; xVar2 = xVar3; arrayList = arrayList2; str8 = str9; d18 = d19; Object[] objArr2222222 = new Object[i27]; objArr2222222[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr2222222); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } } i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; x xVar8 = r152; str6 = str; d17 = d29; d16 = d15; arrayList = arrayList7; String str36 = c15; gt5 gt52 = xVar8.f168146b; lh4.m.d(gt52); xVar8.h(str29, str36, gt52); i25 = i26; i19 = 1; xVar = xVar8; str7 = str36; } catch (Exception e35) { e15 = e35; i16 = i15; arrayList = arrayList6; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; xVar2 = xVar7; str6 = str; d18 = d29; d16 = d15; str8 = c15; i27 = 1; i26 = 0; Object[] objArr22222222 = new Object[i27]; objArr22222222[0] = e15.getMessage(); Log.w(str34, "playAudioList ex:%s", objArr22222222); i25 = i26; xVar = xVar2; i19 = i27; str7 = str8; d17 = d18; if (!Util.isNullOrNil(arrayList)) { } } if (!Util.isNullOrNil(arrayList)) { Log.e(str34, "playAudioList fail, wrapperList is null"); i18 = i19; } else { xVar.f168152h = i19; MMHandlerThread.postToMainThread(new bh0.i(arrayList, i25)); r05 = i19; i17 = i19; if (r05 == true) { msgHandler.q5(h1Var, "setBackgroundAudioState:ok", null); Object[] objArr3 = new Object[i17]; objArr3[0] = Integer.valueOf(i16); Log.i("MicroMsg.MsgHandler", "needStartMusicUI :%d", objArr3); if (i16 == i17) { Intent intent = new Intent(); intent.putExtra("key_scene", 8); sv3.b.j(msgHandler.f167360d, "music", ".ui.MusicMainUI", intent, null); } } else { Object[] objArr4 = new Object[11]; objArr4[0] = str17; objArr4[i17] = str19; objArr4[2] = str21; objArr4[3] = str22; objArr4[4] = str23; objArr4[5] = Integer.valueOf(i15); objArr4[6] = str3; objArr4[7] = Boolean.valueOf(f15); objArr4[8] = str4; objArr4[9] = Double.valueOf(d16); objArr4[10] = Double.valueOf(d17); Log.i("MicroMsg.MsgHandler", "src : %s, title : %s, singer : %s, coverImgUrl : %s, webUrl : %s, startTime:%d, protocol:%s, barBackToWebView:%b, musicbar_url:%s, playbackRate:%f, volume:%f", objArr4); if (Util.isNullOrNil(str17) || Util.isNullOrNil(str19)) { Log.e("MicroMsg.MsgHandler", "setBackgroundAudioState fail, src or title is null"); msgHandler.q5(h1Var, "setBackgroundAudioState:fail, src or title is null", null); return i17; } else if (str5 == null || str5.length() <= 32768) { n a16 = bh0.o.a(10, str22, str19, str21, str23, str18, str17, "" + str17.hashCode(), z80.b.E(), bc2.a.a() + str22.hashCode(), str20, n65); a16.C = str7; a16.D = i15 * 1000; a16.E = str2; a16.F = str3; a16.H = str4; a16.f12714q = str5; a16.I = str6; a16.K = d16; a16.L = (float) d17; boolean z15 = a16.b(d.b()) && d.c(); Log.i("MicroMsg.MsgHandler", "needStartMusicUI :%d", Integer.valueOf(i16)); if (!z15) { Log.i("MicroMsg.MsgHandler", "play the music"); d.j(a16); if (i16 == 1) { Intent intent2 = new Intent(); intent2.putExtra("key_scene", 8); map = null; sv3.b.j(msgHandler.f167360d, "music", ".ui.MusicMainUI", intent2, null); } else { map = null; } } else { map = null; Log.i("MicroMsg.MsgHandler", "The same music is playing"); d.l(a16); } Log.i("MicroMsg.MsgHandler", "setBackgroundAudioState ok"); msgHandler.q5(h1Var, "setBackgroundAudioState:ok", map); return true; } else { Log.e("MicroMsg.MsgHandler", "setBackgroundAudioState fail, src or title is null"); msgHandler.q5(h1Var, "setBackgroundAudioState:fail", null); } } return i17; } } i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; str7 = c15; str6 = str; d17 = d29; d16 = d15; r05 = false; i17 = 1; break; } catch (Exception e36) { i16 = i15; str5 = str27; str4 = str26; str3 = str25; str2 = str24; i15 = i28; str7 = c15; str6 = str; d17 = d29; d16 = d15; i18 = 1; Log.w(str34, "setAudioList ex:%s", e36.getMessage()); } if (r05 == true) { } return i17; } r05 = false; i17 = i18; if (r05 == true) { } return i17; } public static boolean K2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; Bundle b15 = h1.b(h1Var.f247819a); Log.i("MicroMsg.MsgHandler", "operate video player params %s", h1Var.f247819a); try { m mVar = msgHandler.f167378x; if (mVar != null) { mVar.callback(200003, b15); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "doOperateVideoPlayer exception" + e15.getMessage()); } msgHandler.q5(h1Var, "operateVideoPlayer:ok", null); return true; } public static boolean K3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); e04.a.a(new j2(msgHandler, h1Var)); return true; } /* JADX WARNING: Removed duplicated region for block: B:12:0x0079 */ /* JADX WARNING: Removed duplicated region for block: B:15:0x0095 */ /* JADX WARNING: Removed duplicated region for block: B:23:0x00cc */ public static boolean L(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { r0 r0Var; boolean z15; r0 r0Var2; msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); int e15 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 201); int nullAsInt = Util.nullAsInt(((HashMap) map).get("webview_instance_id"), -1); if (((HashMap) fTSWebViewLogic.f164237j).get(Integer.valueOf(e15)) == null) { q1 q1Var = new q1(et2.e.a(), r0.a(e15)); byte[] N2 = u1.N(q1Var.o(), 0, (int) q1Var.y()); r0 r0Var3 = null; try { db3 db32 = new db3(); db32.parseFrom(N2); r0Var2 = new r0(); try { r0Var2.f242480a = db32.f19145d; r0Var2.f242481b = db32.f19146e; r0Var2.f242482c = db32.f19147f; r0Var2.f242483d = db32.f19148g; r0Var2.f242484e = db32.f19149h; } catch (Exception unused) { r0Var3 = r0Var2; } } catch (Exception unused2) { r0Var2 = r0Var3; if (r0Var2 != null) { } r0Var = (r0) ((HashMap) fTSWebViewLogic.f164237j).get(Integer.valueOf(e15)); z15 = true; if (r0Var != null) { } if (z15) { } return false; } if (r0Var2 != null) { ((HashMap) fTSWebViewLogic.f164237j).put(Integer.valueOf(e15), r0Var2); } } r0Var = (r0) ((HashMap) fTSWebViewLogic.f164237j).get(Integer.valueOf(e15)); z15 = true; if (r0Var != null) { ((o0) j.c(o0.class)).gh0(nullAsInt, r0Var.f242481b, 1, r0Var.f242483d + r0Var.f242482c <= System.currentTimeMillis() / 1000 ? 1 : 0, r0Var.f242484e); if (r0Var.f242483d + r0Var.f242482c > System.currentTimeMillis() / 1000) { z15 = false; } } if (z15) { z.d().a(1866, fTSWebViewLogic); i0 i0Var = new i0(map, e15, 0); i0Var.f242393h = p.e(map, "webview_instance_id", -1); z.d().f(i0Var); } return false; } public static boolean L0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("consumedCardId"); String str2 = (String) h1Var.f247819a.get("consumedCode"); Log.i("MicroMsg.MsgHandler", "doConsumedShareCard consumedCardId is " + str); if (Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.w("MicroMsg.MsgHandler", "doConsumedShareCard failed, illegal params (id : %s, code : %s)", str, str2); msgHandler.q5(h1Var, "consumedShareCard:fail", null); return false; } Intent intent = new Intent(); intent.putExtra("key_from_scene", 1); intent.putExtra("key_consumed_card_id", str); intent.putExtra("key_consumed_Code", str2); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "card", ".sharecard.ui.CardConsumeSuccessUI", intent, 29); return true; } public static boolean L1(MsgHandler msgHandler, h1 h1Var) { String str; int i15; msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doGetBackgroundAudioState()"); String str2 = (String) ((HashMap) h1Var.f247819a).get("albumId"); int i16 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("needLastPlayInfo"), 0); String str3 = (String) ((HashMap) h1Var.f247819a).get("url"); String c15 = !Util.isNullOrNil(str3) ? up3.b.c(str3) : null; if (!Util.isNullOrNil(str2)) { if (x.f168144l == null) { synchronized (x.class) { if (x.f168144l == null) { Context context = MMApplicationContext.getContext(); lh4.m.f(context, "getContext()"); x xVar = new x(context, null); x.f168144l = xVar; IListener<MusicPlayerEvent> iListener = xVar.f168150f; if (iListener != null) { iListener.alive(); } } b0 b0Var = b0.f332794a; } } str = x.f168144l.c(str2, c15); } else { str = null; } if (msgHandler.y6(h1Var)) { msgHandler.L6(false); n b15 = d.b(); if (b15 != null) { bh0.k a15 = d.a(); if (Util.isNullOrNil(str2)) { x.a aVar = x.f168143k; ht5 e15 = aVar.a().e(b15.f12705e); String str4 = e15 != null ? e15.f24153g : null; if (!Util.isNullOrNil(str4) || i16 == 1) { if (Util.isNullOrNil(str4)) { x a16 = aVar.a(); synchronized (a16) { str = a16.c(MMKVSlotManager.decodeString$default(a16.f168149e, "currentAlbumIdKey_" + c15 + '}', null, 2, null), c15); } } else { str = aVar.a().c(str4, c15); } } str2 = str4; } if (x.f168144l == null) { synchronized (x.class) { if (x.f168144l == null) { Context context2 = MMApplicationContext.getContext(); lh4.m.f(context2, "getContext()"); x xVar2 = new x(context2, null); x.f168144l = xVar2; IListener<MusicPlayerEvent> iListener2 = xVar2.f168150f; if (iListener2 != null) { iListener2.alive(); } } b0 b0Var2 = b0.f332794a; } } ht5 e16 = x.f168144l.e(b15.f12705e); String str5 = e16 != null ? e16.f24152f : null; int i17 = -1; if (a15 != null) { i17 = a15.f12697a; i15 = a15.f12698b; } else { i15 = -1; } if (a15 != null && !"stop".equals(a15.f12701e) && i17 >= 0 && i15 >= 0) { int i18 = i17 / 1000; int i19 = i15 / 1000; int i25 = a15.f12699c; int i26 = i18 > 0 ? (a15.f12700d * i18) / 100 : 0; HashMap hashMap = new HashMap(); hashMap.put("duration", Integer.valueOf(i18)); hashMap.put("currentTime", Integer.valueOf(i19)); hashMap.put("paused", Integer.valueOf(i25 == 1 ? 0 : 1)); hashMap.put("src", b15.f12711n); hashMap.put("buffered", Integer.valueOf(i26)); hashMap.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, b15.f12707g); hashMap.put("epname", b15.f12709i); hashMap.put("singer", b15.f12708h); hashMap.put("coverImgUrl", b15.f12710j); hashMap.put("isLive", 0); hashMap.put("startTime", Integer.valueOf(b15.D / 1000)); hashMap.put("srcId", b15.E); String str6 = b15.F; if (str6 == null) { str6 = ""; } hashMap.put("protocol", str6); hashMap.put("webUrl", b15.f12713p); hashMap.put("playState", a15.f12701e); hashMap.put("songLyric", b15.f12714q); hashMap.put("playbackRate", Double.valueOf(b15.K)); if (!Util.isNullOrNil(str)) { hashMap.put("audioListState", str); } if (!Util.isNullOrNil(str5)) { hashMap.put("audioId", str5); } if (!Util.isNullOrNil(str2)) { hashMap.put("albumId", str2); } Log.i("MicroMsg.MsgHandler", "getBackgroundAudioState ok"); msgHandler.q5(h1Var, "getBackgroundAudioState:ok", hashMap); } else if (!msgHandler.B5(str, i16, c15)) { Log.e("MicroMsg.MsgHandler", "return parameter is invalid"); msgHandler.q5(h1Var, "getBackgroundAudioState:fail", null); } } else if (!msgHandler.B5(str, i16, c15)) { Log.e("MicroMsg.MsgHandler", "currentWrapper is null"); msgHandler.q5(h1Var, "getBackgroundAudioState:fail", null); } } else if (d.b() != null || !msgHandler.B5(str, i16, c15)) { Log.e("MicroMsg.MsgHandler", "no permission to do get state"); msgHandler.q5(h1Var, "getBackgroundAudioState:fail", null); } return true; } public static boolean L2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); int i15 = msgHandler.A; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "getSearchHistory count %d, webviewId %d", 20, Integer.valueOf(i15)); FTSWebViewLogic.f fVar = new FTSWebViewLogic.f(fTSWebViewLogic, null); fVar.f47191c = ""; fVar.f47197i = 20; fVar.f47201m = fTSWebViewLogic.f164232e; fVar.f164260s = i15; ((b62.q) j.c(b62.q.class)).cc(8, fVar); return false; } public static void L3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (h1Var.f247863i.equalsIgnoreCase(JsApiAddDownloadTask.NAME) && msgHandler.f167360d != null) { ((xc4.j) xc4.j.f338034d).z(new r1(msgHandler)); } } public static boolean L4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("desc"); String str2 = (String) h1Var.f247819a.get("img_url"); String str3 = (String) h1Var.f247819a.get("link"); try { if (Util.isNullOrNil(str3)) { str3 = msgHandler.f167378x.getCurrentUrl(); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "Get current url fail. exception : %s", e15.getMessage()); } String C6 = msgHandler.C6(str3); if (Util.isNullOrNil(C6)) { Log.e("MicroMsg.MsgHandler", "link is null or nil."); msgHandler.q5(h1Var, "shareWeiboApp:fail", null); } else { if (Util.isNullOrNil(str)) { str = ((String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)) + " " + C6; } HashMap hashMap = new HashMap(); hashMap.put("type", 0); hashMap.put("openLBS", 0); QueueWorkerThread queueWorkerThread = c2.f173194a; hashMap.put("content", WebViewUtilities.doUrlEncode(str)); hashMap.put("url", WebViewUtilities.doUrlEncode(str2)); hashMap.put("thumbnailurl", WebViewUtilities.doUrlEncode(str2)); Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("weibo://t.qq.com/proxy/write")); StringBuilder sb5 = new StringBuilder(); sb5.append("TencentWeibo://Edit?from=weixin&"); sb5.append(c2.b(hashMap)); Log.i("MicroMsg.MsgHandler", "Uri : %s", sb5.toString()); intent.putExtra("microblog.intent.extra.ACTION", sb5.toString()); intent.setFlags(268435456); if (Util.isIntentAvailable(msgHandler.f167360d, intent, true)) { try { Context context = msgHandler.f167360d; k30.a aVar = new k30.a(); aVar.c(intent); j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doShareWeiboApp", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context.startActivity((Intent) aVar.a(0)); j30.a.e(context, "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doShareWeiboApp", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); msgHandler.q5(h1Var, "shareWeiboApp:ok", null); } catch (Exception e16) { msgHandler.q5(h1Var, "shareWeiboApp:fail", null); Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "", new Object[0]); } } else { msgHandler.q5(h1Var, "shareWeiboApp:fail", null); } } return true; } /* JADX WARNING: Removed duplicated region for block: B:24:0x0113 A[Catch:{ JSONException -> 0x0141 }] */ /* JADX WARNING: Removed duplicated region for block: B:34:0x0125 A[SYNTHETIC] */ public static boolean M(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.n vU = ((jo3.p) j.c(jo3.p.class)).vU(); Map<String, Object> map = h1Var.f247819a; FTSWebViewImageLogic fTSWebViewImageLogic = (FTSWebViewImageLogic) vU; fTSWebViewImageLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewImageLogic", "getSearchAvatarList"); String f15 = p.f(map, "data"); int nullAsInt = Util.nullAsInt(((HashMap) map).get("webview_instance_id"), -1); try { JSONArray jSONArray = new JSONArray(f15); JSONArray jSONArray2 = new JSONArray(); String str = null; for (int i15 = 0; i15 < jSONArray.length(); i15++) { JSONObject jSONObject = jSONArray.getJSONObject(i15); String optString = jSONObject.optString("id"); String optString2 = jSONObject.optString("userName"); int optInt = jSONObject.optInt("type"); String optString3 = jSONObject.optString("imageUrl"); String optString4 = jSONObject.optString("bigImageUrl"); if (!(optInt == 1 || optInt == 4)) { if (optInt == 32) { com.tencent.mm.modelavatar.n nVar = new com.tencent.mm.modelavatar.n(); nVar.f78487a = optString2; nVar.f78491e = optString4; nVar.f78490d = optString3; nVar.f78495i = -1; nVar.f78488b = 3; nVar.f78492f = 1; ((com.tencent.mm.modelavatar.o) ((yn.g) j.c(yn.g.class)).Ci()).sb(nVar); } else if (optInt != 64) { } String g15 = ((AvatarStorage) ((yn.g) j.c(yn.g.class)).oL()).g(optString2, false, false); if (u1.k(g15)) { Log.i("MicroMsg.WebSearch.FTSWebViewImageLogic", "avatar file exist %s", g15); str = "weixin://fts/avatar?path=" + g15; } else { Log.i("MicroMsg.WebSearch.FTSWebViewImageLogic", "avatar file not exist %s", g15); fTSWebViewImageLogic.f164224g.put(optString2, Integer.valueOf(nullAsInt)); HashSet<String> hashSet = fTSWebViewImageLogic.f164221d.get(optString2); if (hashSet == null) { hashSet = new HashSet<>(); } hashSet.add(optString); fTSWebViewImageLogic.f164221d.put(optString2, hashSet); ((yn.f) j.c(yn.f.class)).p30().loadBitmap(optString2); } if (str == null) { JSONObject jSONObject2 = new JSONObject(); jSONObject2.put("id", optString); jSONObject2.put("src", str); jSONArray2.put(jSONObject2); str = null; } } str = optString3; if (str == null) { } } if (jSONArray2.length() > 0) { ((o0) j.c(o0.class)).dk0(nullAsInt, 0, jSONArray2.toString()); } return false; } catch (JSONException e15) { Log.printErrStackTrace("MicroMsg.WebSearch.FTSWebViewImageLogic", e15, "", new Object[0]); ((o0) j.c(o0.class)).dk0(nullAsInt, -1, ""); return false; } } public static boolean M0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!f2.f165535c.f165537b) { msgHandler.q5(h1Var, "videoProxyPreload:fail_has_not_init", null); } else { String str = (String) h1Var.f247819a.get("webviewVideoProxyPlaydataId"); int i15 = Util.getInt((String) h1Var.f247819a.get("webviewVideoProxyPreloadTime"), 0); Log.i("MicroMsg.MsgHandler", "doWebviewProxyPreload, playDataId = %s, duration = %d", str, Integer.valueOf(i15)); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "playDataId is null or nil"); msgHandler.q5(h1Var, "videoProxyPreload:fail_invaild_play_data_id", null); } else { try { int i16 = Util.getInt(str, 0); Bundle bundle = new Bundle(); bundle.putInt("webview_video_proxy_play_data_id", i16); bundle.putInt("webview_video_proxy_preload_duration", i15); int i17 = msgHandler.f167378x.v6(5007, bundle).getInt("webview_video_proxy_pre_load_result"); Log.i("MicroMsg.MsgHandler", "preload video result = %d", Integer.valueOf(i17)); if (i17 == 0) { msgHandler.q5(h1Var, "videoProxyPreload:ok", null); } else { msgHandler.q5(h1Var, "videoProxyPreload:fail", null); } } catch (Exception unused) { msgHandler.q5(h1Var, "videoProxyPreload:fail", null); } } } return false; } public static boolean M1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; boolean z15; int i15; Map<String, Object> map; msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doSetBackgroundAudioStateMV()"); msgHandler.L6(false); String str2 = (String) h1Var.f247819a.get("appId"); if (msgHandler.f167367n != null) { if (TextUtils.isEmpty(str2)) { str2 = msgHandler.f167367n.getString("jsapi_args_appid"); } if (TextUtils.isEmpty(str2)) { str2 = msgHandler.f167382z.c(msgHandler.s6()); } } Log.i("MicroMsg.MsgHandler", "appId:%s", str2); o1.a(h1Var.f247862h, false, null, str2); String str3 = (String) h1Var.f247819a.get("url"); String c15 = !Util.isNullOrNil(str3) ? up3.b.c(str3) : null; String str4 = (String) h1Var.f247819a.get("src"); String str5 = (String) h1Var.f247819a.get("lowbandSrc"); String str6 = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str7 = (String) h1Var.f247819a.get("epname"); String str8 = (String) h1Var.f247819a.get("singer"); String str9 = (String) h1Var.f247819a.get("coverImgUrl"); String str10 = (String) h1Var.f247819a.get("webUrl"); int i16 = Util.getInt((String) h1Var.f247819a.get("startTime"), 0); String str11 = (String) h1Var.f247819a.get("srcId"); String str12 = (String) h1Var.f247819a.get("protocol"); String str13 = (String) h1Var.f247819a.get("musicbar_url"); boolean f15 = jsapiPermissionWrapper.f(308); String str14 = (String) h1Var.f247819a.get("songLyric"); String str15 = (String) h1Var.f247819a.get("src_username"); int i17 = Util.getInt((String) h1Var.f247819a.get("needStartMusicUI"), 0); double d15 = (double) Util.getFloat((String) h1Var.f247819a.get("playbackRate"), 1.0f); double d16 = (double) Util.getFloat((String) h1Var.f247819a.get("volume"), 1.0f); if (d15 < 0.5d || d15 > 2.0d) { d15 = 1.0d; } if (TextUtils.isEmpty(str14)) { str = str5; Log.e("MicroMsg.MsgHandler", "songLyric is empty"); } else { str = str5; Log.i("MicroMsg.MsgHandler", "songLyric:%s", str14); } String str16 = str9 == null ? "" : str9; String str17 = (String) h1Var.f247819a.get("mid"); String str18 = (String) h1Var.f247819a.get("mvMusicGenre"); String str19 = (String) h1Var.f247819a.get("mvIdentification"); long j15 = Util.getLong((String) h1Var.f247819a.get("mvIssueDate"), 0); long j16 = Util.getLong((String) h1Var.f247819a.get("mvDuration"), 0); String str20 = (String) h1Var.f247819a.get(TPReportKeys.LiveExKeys.LIVE_EX_EXTRA_INFO); String str21 = (String) h1Var.f247819a.get("mvObjectId"); String str22 = (String) h1Var.f247819a.get("mvNonceId"); String str23 = (String) h1Var.f247819a.get("mvCoverUrl"); String str24 = (String) h1Var.f247819a.get("mvMakerFinderNickname"); String str25 = (String) h1Var.f247819a.get("musicOperationUrl"); String str26 = (String) h1Var.f247819a.get("sceneNote"); String str27 = (String) h1Var.f247819a.get("musicAppId"); String str28 = !TextUtils.isEmpty(str27) ? str27 : str2; Log.i("MicroMsg.MsgHandler", "src : %s, title : %s, singer : %s, coverImgUrl : %s, webUrl : %s, startTime:%d, protocol:%s, barBackToWebView:%b, musicbar_url:%s, playbackRate:%f, volume:%f", str4, str6, str8, str16, str10, Integer.valueOf(i16), str12, Boolean.valueOf(f15), str13, Double.valueOf(d15), Double.valueOf(d16)); Log.i("MicroMsg.MsgHandler", "genre:%s, identification:%s, issueDate:%d, duration:%d, extraInfo:%s, mvObjectId:%s, mvNonceId:%s, mvCoverUrl:%s, mvMakerFinderNickname:%s, sceneNote:%s, musicAppId:%s", str18, str19, Long.valueOf(j15), Long.valueOf(j16), str20, str21, str22, str23, str24, str26, str27); if (Util.isNullOrNil(str4) || Util.isNullOrNil(str6)) { Log.e("MicroMsg.MsgHandler", "setBackgroundAudioStateMv fail, src or title is null"); msgHandler.q5(h1Var, "setBackgroundAudioStateMv:fail, src or title is null", null); return true; } else if (str14 == null || str14.length() <= 32768) { String str29 = "" + str4.hashCode(); n a15 = bh0.o.a(10, str16, str6, str8, str10, str, str4, "" + str4.hashCode(), z80.b.E(), bc2.a.a() + str16.hashCode(), str7, str28); a15.C = c15; a15.D = i16 * 1000; a15.E = str11; a15.F = str12; a15.H = str13; a15.f12714q = str14; a15.I = str15; a15.K = d15; a15.L = (float) d16; a15.P = str17; ck3 ck32 = new ck3(); ck32.f18393d = str21; ck32.f18394e = str22; ck32.f18395f = str23; ck32.f18396g = str24; ck32.f18407u = str6; ck32.f18397h = str8; ck32.f18409w = str16; ck32.f18398i = str7; ck32.f18401o = j15; int i18 = (int) j16; ck32.f18403q = i18; ck32.f18402p = str19; ck32.f18399j = str20; ck32.f18408v = str14; ck32.f18400n = str18; ck32.f18404r = str17; ((jv.b) j.c(jv.b.class)).P1(a15, bh0.p.a(str29, ck32)); if (!a15.b(d.b()) || !d.c()) { i15 = 1; z15 = false; } else { i15 = 1; z15 = true; } Object[] objArr = new Object[i15]; objArr[0] = Integer.valueOf(i17); Log.i("MicroMsg.MsgHandler", "needStartMusicUI :%d", objArr); if (!z15) { Log.i("MicroMsg.MsgHandler", "play the music"); d.j(a15); if (i17 == 1) { Intent intent = new Intent(); intent.putExtra("key_scene", 8); sv3.b.j(msgHandler.f167360d, "music", ".ui.MusicMainUI", intent, null); map = null; } else if (i17 == 2) { Intent intent2 = new Intent(); intent2.putExtra("key_mv_song_name", str6); intent2.putExtra("key_mv_song_lyric", str14); intent2.putExtra("key_mv_album_cover_url", str16); intent2.putExtra("key_mv_feed_id", str21); intent2.putExtra("key_mv_nonce_id", str22); intent2.putExtra("key_mv_cover_url", str23); intent2.putExtra("key_mv_poster", str24); intent2.putExtra("key_mv_singer_name", str8); intent2.putExtra("key_mv_album_name", str7); intent2.putExtra("key_mv_music_genre", str18); intent2.putExtra("key_mv_issue_date", j15 + ""); intent2.putExtra("key_mv_identification", str19); intent2.putExtra("key_mv_extra_info", str20); intent2.putExtra("key_mv_music_duration", i18); intent2.putExtra("key_mv_music_operation_url", str25); intent2.putExtra("key_mv_song_mid", str17); intent2.putExtra("key_mv_scene_note", str26); gk3 gk32 = new gk3(); String uuid = UUID.randomUUID().toString(); lh4.m.f(uuid, "randomUUID().toString()"); gk32.f22772e = uuid; gk32.f22771d = 22; gk32.f22774g = str29; try { intent2.putExtra("key_mv_report_data", gk32.toByteArray()); } catch (IOException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } intent2.setFlags(268435456); map = null; sv3.b.j(MMApplicationContext.getContext(), "mv", ".ui.MusicMvMainUI", intent2, null); } else { map = null; } } else { map = null; Log.i("MicroMsg.MsgHandler", "The same music is playing"); d.l(a15); } Log.i("MicroMsg.MsgHandler", "setBackgroundAudioStateMV ok"); msgHandler.q5(h1Var, "setBackgroundAudioStateMv:ok", map); return true; } else { Log.e("MicroMsg.MsgHandler", "setBackgroundAudioState fail, src or title is null"); msgHandler.q5(h1Var, "setBackgroundAudioStateMv:fail", null); return true; } } public static boolean M2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); int e15 = p.e(map, "showType", 0); String f15 = p.f(map, "query"); if (p.e(map, "isDeleteAll", 0) == 1) { ((b62.q) j.c(b62.q.class)).S3(); } else { ((b62.q) j.c(b62.q.class)).N2(f15 + "" + e15); } return false; } public static boolean M4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { if (msgHandler.f167360d instanceof MMActivity) { int i15 = Util.getInt((String) h1Var.f247819a.get("procint"), 0); int i16 = Util.getInt((String) h1Var.f247819a.get("dataint"), 0); Intent intent = new Intent(); intent.putExtra("encryptKey", (String) h1Var.f247819a.get("key")); intent.putExtra("procInterval", i15); intent.putExtra("dataInterval", i16); intent.putExtra("exdevice_airkiss_open_type", 1); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "exdevice", ".ui.ExdeviceConnectWifiUI", intent, 19); } else { msgHandler.q5(h1Var, "configWXDeviceWiFi:fail", null); } return true; } public static boolean N(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { HashSet<String> hashSet; msgHandler.f167375u = false; jo3.n vU = ((jo3.p) j.c(jo3.p.class)).vU(); Map<String, Object> map = h1Var.f247819a; FTSWebViewImageLogic fTSWebViewImageLogic = (FTSWebViewImageLogic) vU; fTSWebViewImageLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewImageLogic", "getSearchSnsImageList"); String f15 = p.f(map, "data"); int nullAsInt = Util.nullAsInt(((HashMap) map).get("webview_instance_id"), -1); try { JSONArray jSONArray = new JSONArray(f15); JSONArray jSONArray2 = new JSONArray(); String str = null; for (int i15 = 0; i15 < jSONArray.length(); i15++) { JSONObject jSONObject = jSONArray.getJSONObject(i15); String string = jSONObject.getString("id"); String string2 = jSONObject.getString("objectXmlDesc"); int i16 = jSONObject.getInt(FirebaseAnalytics.b.INDEX); TimeLineObject fJ0 = ((d63.v) j.c(d63.v.class)).fJ0(string2); if (fJ0.ContentObj.f29271h.size() > i16) { mc3 mc32 = fJ0.ContentObj.f29271h.get(i16); SnsImageDownloadedEvent snsImageDownloadedEvent = new SnsImageDownloadedEvent(); SnsImageDownloadedEvent.a aVar = snsImageDownloadedEvent.f64626d; aVar.f64627a = 3; aVar.f64629c = mc32.f29560d; snsImageDownloadedEvent.publish(); Log.i("MicroMsg.WebSearch.FTSWebViewImageLogic", "generatePath: %s", snsImageDownloadedEvent.f64626d.f64630d); if (u1.k(snsImageDownloadedEvent.f64626d.f64630d)) { str = "weixin://fts/sns?path=" + u1.i(snsImageDownloadedEvent.f64626d.f64630d, false); } else { synchronized (fTSWebViewImageLogic.f164222e) { if (fTSWebViewImageLogic.f164222e.containsKey(mc32.f29560d)) { hashSet = fTSWebViewImageLogic.f164222e.get(mc32.f29560d); } else { hashSet = new HashSet<>(); } hashSet.add(string); fTSWebViewImageLogic.f164222e.put(mc32.f29560d, hashSet); fTSWebViewImageLogic.f164225h.put(mc32.f29560d, Integer.valueOf(nullAsInt)); } SnsImageDownloadedEvent snsImageDownloadedEvent2 = new SnsImageDownloadedEvent(); SnsImageDownloadedEvent.a aVar2 = snsImageDownloadedEvent2.f64626d; aVar2.f64627a = 1; aVar2.f64628b = mc32; snsImageDownloadedEvent2.publish(); } if (str != null) { JSONObject jSONObject2 = new JSONObject(); jSONObject2.put("id", string); jSONObject2.put("src", str); jSONArray2.put(jSONObject2); str = null; } } } if (jSONArray2.length() > 0) { ((o0) j.c(o0.class)).dk0(nullAsInt, 0, jSONArray2.toString()); } } catch (JSONException unused) { } return false; } /* JADX WARNING: Removed duplicated region for block: B:25:0x00cc */ /* JADX WARNING: Removed duplicated region for block: B:26:0x00d0 */ public static boolean N0(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); String str2 = (String) ((HashMap) h1Var.f247819a).get("key"); if (Util.isNullOrNil(str2)) { msgHandler.q5(h1Var, "getLocalData:fail_key_is_null", null); } else { try { String currentUrl = msgHandler.f167378x.getCurrentUrl(); String str3 = new String(Base64.encode(str2.getBytes(), 0)); String c15 = msgHandler.f167382z.c(currentUrl); t1 bO0 = com.tencent.mm.plugin.webview.modeltools.m.bO0(); bO0.getClass(); String domin = Util.getDomin(currentUrl); Log.i("MicroMsg.WebViewLocalDataStorage", "get value by key = %s, appid = %s, domin = %s", str3, c15, domin); if (!Util.isNullOrNil(str3) && !Util.isNullOrNil(c15) && !Util.isNullOrNil(currentUrl) && !Util.isNullOrNil(domin)) { int hashCode = (c15 + domin + str3).hashCode(); StringBuilder sb5 = new StringBuilder(); sb5.append("select value from WebviewLocalData where recordId = "); sb5.append(hashCode); String sb6 = sb5.toString(); Log.i("MicroMsg.WebViewLocalDataStorage", sb6); Cursor rawQuery = bO0.rawQuery(sb6, new String[0]); if (rawQuery == null) { Log.e("MicroMsg.WebViewLocalDataStorage", "get cursor is null"); } else { str = rawQuery.moveToFirst() ? rawQuery.getString(0) : null; rawQuery.close(); Log.i("MicroMsg.WebViewLocalDataStorage", "get value : %s for key : %s", str, str3); if (!Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "getLocalData:fail", null); } else { String str4 = new String(Base64.decode(str.getBytes(), 0)); HashMap hashMap = new HashMap(); hashMap.put("data", str4); Log.i("MicroMsg.MsgHandler", "get local data, key = %s, value = %s", str3, str4); msgHandler.q5(h1Var, "getLocalData:ok", hashMap); } } } str = null; if (!Util.isNullOrNil(str)) { } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "get url failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "getLocalData:fail", null); } } return true; } public static boolean N1(MsgHandler msgHandler, h1 h1Var) { msgHandler.L6(true); if (com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c == null) { synchronized (com.tencent.mm.plugin.webview.ui.tools.media.z.class) { if (com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c == null) { Context context = MMApplicationContext.getContext(); lh4.m.f(context, "getContext()"); com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c = new com.tencent.mm.plugin.webview.ui.tools.media.z(context, null); } b0 b0Var = b0.f332794a; } } com.tencent.mm.plugin.webview.ui.tools.media.z zVar = com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c; msgHandler.y6(h1Var); synchronized (zVar) { HashMap<String, Object> hashMap = new HashMap<>(); if (zVar.a(h1Var, msgHandler, hashMap)) { TingClientProto.TingItem playingItem = zVar.b().playingItem(); if (playingItem != null) { l2 playerState = zVar.b().getPlayerState(); String categoryId = playingItem.getListenItem().getCategoryId(); float duration = (float) zVar.b().getDuration(); float playPosition = (float) zVar.b().getPlayPosition(); float f15 = 0.0f; if (playerState == l2.Idle || duration < 0.0f || playPosition < 0.0f) { Log.w("MicroMsg.WebViewTingHelper", "getTingAudioState audio is stop duration=" + duration + ", position=" + playPosition); } float f16 = duration / 1000.0f; float f17 = playPosition / 1000.0f; int Z4 = zVar.b().Z4(); if (f16 > 0.0f) { f15 = (((float) Z4) * f16) / ((float) 100); } if (!Util.isNullOrNil(categoryId)) { lh4.m.f(categoryId, "categoryId"); hashMap.put("categoryId", categoryId); } hashMap.put("currentTime", Float.valueOf(f17)); hashMap.put("buffered", Float.valueOf(f15)); hashMap.put("duration", Float.valueOf(f16)); hashMap.put("status", pf3.b.f282813a.a(playerState)); float playRate = zVar.b().getPlayRate(); if (playRate < 0.5f || playRate > 2.0f) { playRate = 1.0f; } hashMap.put("playRate", Float.valueOf(playRate)); String jSONObject = zVar.b().ep(playingItem, f16).toString(); lh4.m.f(jSONObject, "getTingService().getPlay…tem, duration).toString()"); hashMap.put("item", jSONObject); JSONArray jSONArray = new JSONArray(); jSONArray.put("item"); String jSONArray2 = jSONArray.toString(); lh4.m.f(jSONArray2, "JSONArray().apply {\n …\n }.toString()"); hashMap.put("__json_key_set", jSONArray2); Objects.toString(hashMap.get("status")); playingItem.getClientId(); Objects.toString(hashMap.get("item")); hashMap.put("err_code", 0); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); return true; } Log.e("MicroMsg.WebViewTingHelper", "no playing item"); hashMap.put("status", "idle"); hashMap.put("err_code", 0); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); } return false; } } public static boolean N2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; ((z00.o) j.c(z00.o.class)).RB(msgHandler.f167360d, ((e00.h) j.c(e00.h.class)).RR(h1Var.f247819a)); HashMap hashMap = new HashMap(); hashMap.put("ret", 0); msgHandler.q5(h1Var, "0", hashMap); return false; } public static boolean N4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); HashMap hashMap = new HashMap(); try { ExDeviceGetCurrentSSIDEvent exDeviceGetCurrentSSIDEvent = new ExDeviceGetCurrentSSIDEvent(); exDeviceGetCurrentSSIDEvent.f62310d.f62312a = true; exDeviceGetCurrentSSIDEvent.publish(); ExDeviceGetCurrentSSIDEvent.b bVar = exDeviceGetCurrentSSIDEvent.f62311e; if (bVar.f62313a) { hashMap.put("currentSSID", bVar.f62314b); msgHandler.q5(h1Var, "getCurrentSSID:ok", hashMap); } else { hashMap.put("err_desc", "not on wifi"); msgHandler.q5(h1Var, "getCurrentSSID:fail", hashMap); } } catch (Exception unused) { Log.e("MicroMsg.MsgHandler", "getCurrentSSID:fail"); hashMap.put("err_desc", "not on wifi"); msgHandler.q5(h1Var, "getCurrentSSID:fail", hashMap); } return true; } public static boolean O(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { HashSet<String> hashSet; msgHandler.f167375u = false; jo3.n vU = ((jo3.p) j.c(jo3.p.class)).vU(); Map<String, Object> map = h1Var.f247819a; FTSWebViewImageLogic fTSWebViewImageLogic = (FTSWebViewImageLogic) vU; fTSWebViewImageLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewImageLogic", "getSearchImageList"); int e15 = p.e(map, "requestType", 0); String f15 = p.f(map, "data"); int nullAsInt = Util.nullAsInt(((HashMap) map).get("webview_instance_id"), -1); boolean isWifi = NetStatusUtil.isWifi(MMApplicationContext.getContext()); if (e15 != 1) { try { JSONArray jSONArray = new JSONArray(f15); JSONArray jSONArray2 = new JSONArray(); for (int i15 = 0; i15 < jSONArray.length(); i15++) { JSONObject jSONObject = jSONArray.getJSONObject(i15); JSONObject jSONObject2 = new JSONObject(); String string = jSONObject.getString("id"); String string2 = jSONObject.getString("imageUrl"); jSONObject2.put("id", string); jSONObject2.put("src", string2); jSONArray2.put(jSONObject2); } ((o0) j.c(o0.class)).dk0(nullAsInt, 0, jSONArray2.toString()); } catch (JSONException unused) { } } else { JSONArray jSONArray3 = new JSONArray(f15); JSONArray jSONArray4 = new JSONArray(); String str = null; for (int i16 = 0; i16 < jSONArray3.length(); i16++) { JSONObject jSONObject3 = jSONArray3.getJSONObject(i16); int optInt = jSONObject3.optInt("emojiType"); String optString = jSONObject3.optString("id"); if (optInt == 2) { FTSEmojiDownloadedEvent fTSEmojiDownloadedEvent = new FTSEmojiDownloadedEvent(); FTSEmojiDownloadedEvent.a aVar = fTSEmojiDownloadedEvent.f62641d; aVar.f62643a = 3; aVar.f62649g = jSONObject3.optString("md5"); fTSEmojiDownloadedEvent.f62641d.f62644b = jSONObject3.optString("designerId"); fTSEmojiDownloadedEvent.f62641d.f62647e = jSONObject3.optString("aesKey"); fTSEmojiDownloadedEvent.f62641d.f62648f = jSONObject3.optString("encryptUrl"); fTSEmojiDownloadedEvent.f62641d.f62650h = jSONObject3.optString("productID"); fTSEmojiDownloadedEvent.f62641d.f62646d = jSONObject3.optString("express"); fTSEmojiDownloadedEvent.f62641d.f62645c = jSONObject3.optString("imageUrl"); fTSEmojiDownloadedEvent.publish(); if (u1.k(fTSEmojiDownloadedEvent.f62642e.f62651a)) { str = "weixin://fts/emoji?path=" + fTSEmojiDownloadedEvent.f62642e.f62651a; Log.i("MicroMsg.WebSearch.FTSWebViewImageLogic", "path=%s", fTSEmojiDownloadedEvent.f62642e.f62651a); } else if (isWifi) { synchronized (fTSWebViewImageLogic.f164223f) { if (fTSWebViewImageLogic.f164223f.containsKey(fTSEmojiDownloadedEvent.f62641d.f62649g)) { hashSet = fTSWebViewImageLogic.f164223f.get(fTSEmojiDownloadedEvent.f62641d.f62649g); } else { hashSet = new HashSet<>(); } hashSet.add(optString); fTSWebViewImageLogic.f164223f.put(fTSEmojiDownloadedEvent.f62641d.f62649g, hashSet); fTSWebViewImageLogic.f164226i.put(fTSEmojiDownloadedEvent.f62641d.f62649g, Integer.valueOf(nullAsInt)); } fTSEmojiDownloadedEvent.f62641d.f62643a = 1; fTSEmojiDownloadedEvent.publish(); } else { str = jSONObject3.optString("imageUrl"); } if (str != null) { JSONObject jSONObject4 = new JSONObject(); jSONObject4.put("id", optString); jSONObject4.put("src", str); jSONArray4.put(jSONObject4); str = null; } } else if (optInt == 4) { JSONObject jSONObject5 = new JSONObject(); jSONObject5.put("id", optString); if (isWifi) { jSONObject5.put("src", jSONObject3.optString(ShareConstants.DEXMODE_RAW)); } else { jSONObject5.put("src", jSONObject3.optString("imageUrl")); } jSONArray4.put(jSONObject5); } else { JSONObject jSONObject6 = new JSONObject(); jSONObject6.put("id", optString); jSONObject6.put("src", jSONObject3.optString("imageUrl")); jSONArray4.put(jSONObject6); } } if (jSONArray4.length() > 0) { ((o0) j.c(o0.class)).dk0(nullAsInt, 0, jSONArray4.toString()); } } return false; } public static boolean O0(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); String str2 = (String) ((HashMap) h1Var.f247819a).get("key"); String str3 = (String) ((HashMap) h1Var.f247819a).get("data"); Log.i("MicroMsg.MsgHandler", "set local data, key = %s, data = %s", str2, str3); if (Util.isNullOrNil(str2) || Util.isNullOrNil(str3)) { msgHandler.q5(h1Var, "setLocalData:fail_param_should_not_null", null); return true; } else if (str2.length() > 1024 || str3.length() > 1024) { msgHandler.q5(h1Var, "setLocalData:fail_param_lenght_too_long", null); return true; } else { try { String currentUrl = msgHandler.f167378x.getCurrentUrl(); byte[] encode = Base64.encode(str2.getBytes(), 0); byte[] encode2 = Base64.encode(str3.getBytes(), 0); String str4 = new String(encode); String str5 = new String(encode2); String c15 = msgHandler.f167382z.c(currentUrl); t1 bO0 = com.tencent.mm.plugin.webview.modeltools.m.bO0(); bO0.getClass(); String domin = Util.getDomin(currentUrl); Log.i("MicroMsg.WebViewLocalDataStorage", "set data, key = %s, value = %s, url = %s, appId = %s, domin = %s", str4, str5, currentUrl, c15, domin); if (Util.isNullOrNil(str4) || Util.isNullOrNil(currentUrl) || Util.isNullOrNil(c15) || Util.isNullOrNil(domin)) { str = "fail_params_invalid"; } else { int hashCode = (c15 + domin + str4).hashCode(); String str6 = "select count(*) from WebviewLocalData where appId = '" + c15 + "' and domin = '" + domin + "'"; Log.i("MicroMsg.WebViewLocalDataStorage", str6); Cursor rawQuery = bO0.rawQuery(str6, new String[0]); if (rawQuery != null) { if (rawQuery.moveToFirst()) { int i15 = rawQuery.getInt(0); Log.i("MicroMsg.WebViewLocalDataStorage", "now count = %d", Integer.valueOf(i15)); rawQuery.close(); if (i15 >= 5) { str = "fail_exceed_max_count"; } else { String str7 = "select count(*) from WebviewLocalData where recordId =" + hashCode; rawQuery = bO0.rawQuery(str7, new String[0]); if (rawQuery != null) { if (rawQuery.moveToFirst()) { int i16 = rawQuery.getInt(0); Log.i("MicroMsg.WebViewLocalDataStorage", "sql = %s, count = %d", str7, Integer.valueOf(i16)); rawQuery.close(); if (i16 > 0) { String str8 = "update WebviewLocalData set value = '" + str5 + "' where recordId =" + hashCode; boolean execSQL = bO0.execSQL("WebviewLocalData", str8); Log.i("MicroMsg.WebViewLocalDataStorage", "sql = %s, ret = %b", str8, Boolean.valueOf(execSQL)); if (!execSQL) { str = "fail"; } str = "ok"; } } rawQuery.close(); } } } rawQuery.close(); } s1 s1Var = new s1(); s1Var.field_appId = c15; s1Var.field_domin = domin; s1Var.field_key = str4; s1Var.field_value = str5; s1Var.field_recordId = hashCode; Log.i("MicroMsg.WebViewLocalDataStorage", "insert data, ret = %b", Boolean.valueOf(bO0.insert(s1Var))); str = "ok"; } Log.i("MicroMsg.MsgHandler", "doSetLocalData retValue = %s", str); msgHandler.q5(h1Var, "setLocalData:" + str, null); return true; } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "get url failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "setLocalData:fail", null); return true; } } } public static boolean O1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); Log.i("MicroMsg.MsgHandler", "doEditAddress"); Intent intent = new Intent(); intent.putExtra("req_url", (String) h1Var.f247819a.get("url")); intent.putExtra("req_app_id", (String) h1Var.f247819a.get("appId")); intent.putExtra("launch_from_webview", true); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "address", ".ui.WalletSelectAddrUI", intent, 3, false); } return true; } /* JADX WARNING: Removed duplicated region for block: B:39:0x0125 */ /* JADX WARNING: Removed duplicated region for block: B:40:0x012a */ public static boolean O2(MsgHandler msgHandler, h1 h1Var) { boolean z15; msgHandler.f167375u = false; msgHandler.q5(h1Var, "recordHistory:ok", null); jh0.a aVar = jh0.a.f240052c; if (!aVar.f240054b && z.a()) { aVar.f240053a = u0.j(); aVar.f240054b = true; } if (!((aVar.f240053a & 131072) == 131072)) { Log.i("MicroMsg.MsgHandler", "doRecordHistory switch close"); } else { String C6 = msgHandler.C6((String) ((HashMap) h1Var.f247819a).get("url")); if (Util.isNullOrNil(C6)) { msgHandler.q5(h1Var, "recordHistory:fail", null); } else { int i15 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("webview_scene"), 0); if (i15 == 33 || i15 == 46) { Log.i("MicroMsg.MsgHandler", "hasRecordPermission false, getA8keyScene = " + i15); } else if (C6.startsWith(ProxyConfig.MATCH_HTTP)) { Uri parse = Uri.parse(C6); String str = parse.getHost() + parse.getPath(); Log.i("MicroMsg.MsgHandler", "hasRecordPermission, hostPath: " + str); String b15 = com.tencent.mm.plugin.webview.model.o0.b(); if (Util.isNullOrNil(b15)) { b15 = WeChatHosts.domainString(R.string.fya) + "/connect/oauth2/authorize"; } String[] split = b15.split(";"); if (!str.contains(WeChatHosts.domainString(R.string.fys))) { if (com.tencent.mm.plugin.webview.core.e.f164565a.contains(parse.getHost().toLowerCase())) { Log.i("MicroMsg.MsgHandler", "forbidden host %s", parse.getHost()); } else { int i16 = 0; while (true) { if (i16 >= split.length) { z15 = true; break; } else if (str.equalsIgnoreCase(split[i16])) { break; } else { i16++; } } if (z15) { msgHandler.q5(h1Var, "recordHistory:fail", null); } else { String nullAsNil = Util.nullAsNil((String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)); String nullAsNil2 = Util.nullAsNil((String) ((HashMap) h1Var.f247819a).get("source")); String nullAsNil3 = Util.nullAsNil((String) ((HashMap) h1Var.f247819a).get("img_url")); Log.i("MicroMsg.MsgHandler", "doRecordHistory link %s,title %s,source %s,imgUrl %s", C6, nullAsNil, nullAsNil2, nullAsNil3); bp3.f ZN0 = com.tencent.mm.plugin.webview.modeltools.m.ZN0(); ZN0.getClass(); bp3.d dVar = new bp3.d(); dVar.field_link = C6; if (!ZN0.get(dVar, "link")) { dVar = null; } if (dVar != null) { Log.i("MicroMsg.MsgHandler", "doRecordHistory update"); dVar.field_link = C6; dVar.field_title = nullAsNil; dVar.field_source = nullAsNil2; dVar.field_imgUrl = nullAsNil3; dVar.field_timeStamp = System.currentTimeMillis() / 1000; com.tencent.mm.plugin.webview.modeltools.m.ZN0().update(dVar, new String[0]); } else { Log.i("MicroMsg.MsgHandler", "doRecordHistory insert"); bp3.f ZN02 = com.tencent.mm.plugin.webview.modeltools.m.ZN0(); ZN02.getClass(); bp3.d dVar2 = new bp3.d(); dVar2.field_link = C6; dVar2.field_title = nullAsNil; dVar2.field_source = nullAsNil2; dVar2.field_imgUrl = nullAsNil3; dVar2.field_timeStamp = System.currentTimeMillis() / 1000; dVar2.field_recordId = "" + C6.hashCode() + "_" + System.currentTimeMillis(); boolean insert = ZN02.insert(dVar2); StringBuilder sb5 = new StringBuilder(); sb5.append("insert: "); sb5.append(insert); Log.i("MicroMsg.WebViewHistoryStorage", sb5.toString()); e04.a.a(new bp3.e(ZN02)); } msgHandler.q5(h1Var, "recordHistory:ok", null); } } } } z15 = false; if (z15) { } } } return true; } public static boolean O3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); long j15 = Util.getLong((String) h1Var.f247819a.get("download_id"), -1); Util.getInt((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 1000); Log.i("MicroMsg.MsgHandler", "doInstallDownloadTask, downloadId = " + j15); if (j15 <= 0) { Log.e("MicroMsg.MsgHandler", "doInstallDownloadTask fail, invalid downloadId = " + j15); msgHandler.q5(h1Var, "install_download_task:fail", null); return true; } c3 Uj = ((t) j.c(t.class)).Uj(j15); if (Uj == null) { Log.e("MicroMsg.MsgHandler", "doInstallDownloadTask fail, info is null"); msgHandler.q5(h1Var, "install_download_task:fail", null); return true; } int i15 = Uj.field_status; if (i15 == -1) { Log.e("MicroMsg.MsgHandler", "doInstallDownloadTask fail, apilevel not supported"); msgHandler.q5(h1Var, "install_download_task:fail_apilevel_too_low", null); return true; } else if (i15 != 3) { Log.e("MicroMsg.MsgHandler", "doInstallDownloadTask fail, invalid status = " + Uj.field_status); msgHandler.q5(h1Var, "install_download_task:fail", null); return true; } else { c3 Uj2 = ((t) j.c(t.class)).Uj(j15); if (Uj2 != null) { int i16 = Util.getInt((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 0); int i17 = Util.getInt((String) h1Var.f247819a.get("uiarea"), 0); int i18 = Util.getInt((String) h1Var.f247819a.get("notice_id"), 0); int i19 = Util.getInt((String) h1Var.f247819a.get(TPDownloadProxyEnum.USER_SSID), 0); Uj2.field_scene = i16; Uj2.field_uiarea = i17; Uj2.field_noticeId = i18; Uj2.field_ssid = i19; ((t) j.c(t.class)).A00(Uj2); } ((kq.o) j.c(kq.o.class)).dj(Uj.field_downloadId, false, new k2(msgHandler, (String) h1Var.f247819a.get("bizInfo"), (String) h1Var.f247819a.get("sourceInfo"), h1Var)); return true; } } public static boolean O4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { if (msgHandler.f167360d instanceof MMActivity) { WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); PayUProceedPayEvent payUProceedPayEvent = new PayUProceedPayEvent(); PayUProceedPayEvent.a aVar = payUProceedPayEvent.f63895d; aVar.f63896a = walletJsapiData.f173486d; aVar.f63897b = walletJsapiData.f173487e; aVar.f63898c = walletJsapiData.f173488f; aVar.f63899d = walletJsapiData.f173489g; aVar.f63900e = walletJsapiData.f173490h; aVar.f63901f = walletJsapiData.f173491i; aVar.f63902g = walletJsapiData.f173495p; aVar.f63903h = walletJsapiData.f173497r; aVar.f63904i = walletJsapiData.f173498s; aVar.f63905j = walletJsapiData.f173499t; aVar.f63907l = walletJsapiData.f173501v; aVar.f63906k = walletJsapiData.f173500u; payUProceedPayEvent.publish(); msgHandler.mmOnActivityResult(21, -1, null); } o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); return true; } public static boolean P(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; String str2; msgHandler.getClass(); HashMap hashMap = new HashMap(); jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); try { JSONArray jSONArray = new JSONArray(p.f(map, "data")); JSONArray jSONArray2 = new JSONArray(); for (int i15 = 0; i15 < jSONArray.length(); i15++) { JSONObject jSONObject = jSONArray.getJSONObject(i15); if (jSONObject.has("id")) { str = jSONObject.getString("id"); } else { str = ""; } if (jSONObject.has("userName")) { str2 = jSONObject.getString("userName"); } else { str2 = ""; } String displayName = ((hh2.j) j.c(hh2.j.class)).getDisplayName(str2); JSONObject jSONObject2 = new JSONObject(); jSONObject2.put("id", str); jSONObject2.put("userName", str2); jSONObject2.put("displayName", displayName); jSONArray2.put(jSONObject2); } hashMap.put("ret", 0); hashMap.put("data", jSONArray2.toString()); } catch (JSONException e15) { Log.printErrStackTrace("MicroMsg.WebSearch.FTSWebViewLogic", e15, "", new Object[0]); } msgHandler.q5(h1Var, "getSearchDisplayName:ok", hashMap); return true; } public static boolean P0(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); try { String currentUrl = msgHandler.f167378x.getCurrentUrl(); t1 bO0 = com.tencent.mm.plugin.webview.modeltools.m.bO0(); String c15 = msgHandler.f167382z.c(currentUrl); bO0.getClass(); String domin = Util.getDomin(currentUrl); Log.i("MicroMsg.WebViewLocalDataStorage", "appid = %s, url = %s, domin = %s", c15, currentUrl, domin); if (!Util.isNullOrNil(c15) && !Util.isNullOrNil(currentUrl) && !Util.isNullOrNil(domin)) { if (bO0.execSQL("WebviewLocalData", "delete from WebviewLocalData where appId = '" + c15 + "' and domin = '" + domin + "'")) { str = "ok"; Log.i("MicroMsg.MsgHandler", "doClearLocalData retValue = %s", str); msgHandler.q5(h1Var, "clearLocalData:" + str, null); return true; } } str = "fail"; Log.i("MicroMsg.MsgHandler", "doClearLocalData retValue = %s", str); msgHandler.q5(h1Var, "clearLocalData:" + str, null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "get url failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "clearLocalData:fail", null); } return true; } /* JADX WARNING: Removed duplicated region for block: B:126:0x0384 */ /* JADX WARNING: Removed duplicated region for block: B:149:0x040f */ /* JADX WARNING: Removed duplicated region for block: B:163:0x0435 */ /* JADX WARNING: Removed duplicated region for block: B:166:0x0443 */ /* JADX WARNING: Removed duplicated region for block: B:59:0x0225 */ /* JADX WARNING: Removed duplicated region for block: B:61:0x0249 */ public static boolean P1(MsgHandler msgHandler, h1 h1Var) { boolean z15; int i15; int i16; TingProto.TingScene tingScene; TingProto.TingScene tingScene2; TingProto.MMListenCategoryItem mMListenCategoryItem; boolean z16; TingClientProto.TingItem playingItem; boolean z17; TingProto.MMListenItem listenItem; TingProto.MMListenArticleInfo articleInfo; TingProto.MMListenItem listenItem2; TingProto.MMListenArticleInfo articleInfo2; TingProto.MMListenItem listenItem3; TingProto.MMListenItem listenItem4; TingProto.MMListenArticleInfo articleInfo3; TingProto.MMListenItem listenItem5; TingProto.MMListenArticleInfo articleInfo4; int i17; Exception e15; String str; String str2; msgHandler.L6(true); String n65 = msgHandler.n6(); Log.i("MicroMsg.MsgHandler", "doSetTingAudioState appId:%s", n65); o1.a(h1Var.f247862h, false, null, n65); if (com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c == null) { synchronized (com.tencent.mm.plugin.webview.ui.tools.media.z.class) { if (com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c == null) { Context context = MMApplicationContext.getContext(); lh4.m.f(context, "getContext()"); com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c = new com.tencent.mm.plugin.webview.ui.tools.media.z(context, null); } b0 b0Var = b0.f332794a; } } com.tencent.mm.plugin.webview.ui.tools.media.z zVar = com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c; zVar.getClass(); HashMap<String, Object> hashMap = new HashMap<>(); if (!zVar.a(h1Var, msgHandler, hashMap)) { return false; } String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("playSrcId")); int i18 = Util.getInt((String) h1Var.f247819a.get("playMode"), 0); boolean z18 = Util.getBoolean((String) h1Var.f247819a.get("shuffle"), false); boolean z19 = Util.getBoolean((String) h1Var.f247819a.get("openPlayerUI"), false); float f15 = Util.getFloat((String) h1Var.f247819a.get("playRate"), 0.0f); if (f15 < 0.5f || f15 > 2.0f) { f15 = 1.0f; } String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get("categoryId")); String nullAsNil3 = Util.nullAsNil((String) h1Var.f247819a.get("categoryName")); int i19 = Util.getInt((String) h1Var.f247819a.get("categoryType"), 0); String str3 = (String) h1Var.f247819a.get("mpExtraInfo"); String str4 = (String) h1Var.f247819a.get("itemList"); Log.i("MicroMsg.WebViewTingHelper", "setTingAudioState playSrcId: " + nullAsNil + ", categoryId: " + nullAsNil2 + ", categoryName: " + nullAsNil3 + ", categoryType: " + i19 + ", playRate: " + f15 + ", playMode: " + i18 + ", shuffle: " + z18 + ", openPlayerUI: " + z19 + ", mpExtraInfo: " + str3); if (Util.isNullOrNil(str4)) { Log.i("MicroMsg.WebViewTingHelper", "setTingAudioState itemList is null"); hashMap.put("err_code", -100); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); } else { try { JSONArray jSONArray = new JSONArray(str4); if (jSONArray.length() <= 0) { Log.i("MicroMsg.WebViewTingHelper", "setTingAudioState audioList is empty"); hashMap.put("err_code", -100); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); } else { ArrayList arrayList = new ArrayList(); try { int length = jSONArray.length(); i15 = i18; int i25 = 0; i16 = 0; while (i25 < length) { try { Object obj = jSONArray.get(i25); lh4.m.e(obj, "null cannot be cast to non-null type org.json.JSONObject"); JSONObject jSONObject = (JSONObject) obj; z.a aVar = com.tencent.mm.plugin.webview.ui.tools.media.z.f168156b; if (nullAsNil2 == null) { str = ""; } else { str = nullAsNil2; } if (nullAsNil3 == null) { str2 = ""; } else { str2 = nullAsNil3; } z.b a15 = aVar.a(jSONObject, str, str2, f15, new com.tencent.mm.plugin.webview.ui.tools.media.a0(hashMap, msgHandler, h1Var)); if (a15 == null) { Log.w("MicroMsg.WebViewTingHelper", "wrapper is null"); break; } if (lh4.m.b(a15.f168160b, nullAsNil)) { i16 = i25; } arrayList.add(a15.f168159a); i25++; length = length; jSONArray = jSONArray; } catch (Exception e16) { e15 = e16; i17 = 1; Object[] objArr = new Object[i17]; objArr[0] = e15.getMessage(); Log.w("MicroMsg.WebViewTingHelper", "setTingAudioState ex:%s", objArr); if (arrayList.isEmpty()) { } } } b0 b0Var2 = b0.f332794a; } catch (Exception e17) { e15 = e17; i15 = i18; i17 = 1; i16 = 0; Object[] objArr2 = new Object[i17]; objArr2[0] = e15.getMessage(); Log.w("MicroMsg.WebViewTingHelper", "setTingAudioState ex:%s", objArr2); if (arrayList.isEmpty()) { } } if (arrayList.isEmpty()) { Log.e("MicroMsg.WebViewTingHelper", "setTingAudioState fail, wrapperList is null"); hashMap.put("err_code", -100); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); } else { TingClientProto.TingItem tingItem = (TingClientProto.TingItem) xg4.c0.R(arrayList, i16); String bizUsername = (tingItem == null || (listenItem5 = tingItem.getListenItem()) == null || (articleInfo4 = listenItem5.getArticleInfo()) == null) ? null : articleInfo4.getBizUsername(); if (tingItem != null && pf3.i0.f(tingItem)) { tingScene = TingProto.TingScene.TingScene_MpMusic; } else { tingScene = TingProto.TingScene.TingScene_MpAudio; } int number = tingScene.getNumber(); dg3.c cVar = new dg3.c(str3, i16, number, !z19, nullAsNil2, nullAsNil3, i19, i15, z18, false, null, null, null, null, null, null, null, 130560, null); dg3.d dVar = cVar.f200331q; dVar.f200333b = z19; if (bizUsername != null) { dVar.f200335d.put("bizusername", bizUsername); b0 b0Var3 = b0.f332794a; } b0 b0Var4 = b0.f332794a; String albumId = (tingItem == null || (listenItem4 = tingItem.getListenItem()) == null || (articleInfo3 = listenItem4.getArticleInfo()) == null) ? null : articleInfo3.getAlbumId(); boolean z25 = !(albumId == null || albumId.length() == 0); if (z25) { tingScene2 = TingProto.TingScene.TingScene_MpAlbum; } else { tingScene2 = TingProto.TingScene.forNumber(number); } if (z19) { ((l1) j.c(l1.class)).fv(false); } if (z25) { if (z19) { TingClientProto.TingTapeInfo TI0 = zVar.b().TI0(); TingClientProto.TingItem playingItem2 = zVar.b().playingItem(); if (!(TI0 == null || playingItem2 == null)) { if (lh4.m.b(playingItem2.getClientId(), tingItem != null ? tingItem.getClientId() : null)) { if (((nullAsNil2 == null || y.n(nullAsNil2)) && TI0.getCategoryItem().getType() == 7) || lh4.m.b(nullAsNil2, TI0.getCategoryItem().getCategoryId())) { z17 = true; Log.i("MicroMsg.WebViewTingHelper", "setTingAudioState playWithCategory playSameSong:" + z17 + ", categoryId: " + nullAsNil2 + ", currentCategoryId: " + TI0.getCategoryItem().getCategoryId()); if (!z17) { cVar.f200317c = TingProto.TingScene.TingScene_MpAlbum.getNumber(); StringBuilder sb5 = new StringBuilder(); sb5.append("setTingAudioState playWithCategory title: "); sb5.append((tingItem == null || (listenItem3 = tingItem.getListenItem()) == null) ? null : listenItem3.getTitle()); sb5.append(", audioId: "); sb5.append((tingItem == null || (listenItem2 = tingItem.getListenItem()) == null || (articleInfo2 = listenItem2.getArticleInfo()) == null) ? null : articleInfo2.getAudioId()); sb5.append(", albumId: "); sb5.append((tingItem == null || (listenItem = tingItem.getListenItem()) == null || (articleInfo = listenItem.getArticleInfo()) == null) ? null : articleInfo.getAlbumId()); Log.i("MicroMsg.WebViewTingHelper", sb5.toString()); TingProto.MMListenCategoryItem.Builder newBuilder = TingProto.MMListenCategoryItem.newBuilder(); newBuilder.setType(7); z15 = true; newBuilder.setListType(1); TingProto.MMListenCategoryItem mMListenCategoryItem2 = (TingProto.MMListenCategoryItem) newBuilder.build(); y1 b15 = zVar.b(); lh4.m.d(tingItem); b15.Tb0(tingItem, null, mMListenCategoryItem2, null, cVar); mMListenCategoryItem = mMListenCategoryItem2; if (z19) { x1 JC = zVar.b().JC(); Context context2 = MMApplicationContext.getContext(); lh4.m.f(context2, "getContext()"); lh4.m.f(tingScene2, "enterScene"); x1.a.d(JC, context2, false, tingItem, cVar, mMListenCategoryItem, null, tingScene2, null, 160, null); ((ih.w1) j.c(ih.w1.class)).RW(tingItem, tingScene2); } hashMap.put("err_code", 0); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); return z15; } z15 = true; } } z17 = false; Log.i("MicroMsg.WebViewTingHelper", "setTingAudioState playWithCategory playSameSong:" + z17 + ", categoryId: " + nullAsNil2 + ", currentCategoryId: " + TI0.getCategoryItem().getCategoryId()); if (!z17) { } } } z17 = false; if (!z17) { } } else { z15 = true; if (z19 && (playingItem = zVar.b().playingItem()) != null) { if (lh4.m.b(playingItem.getClientId(), tingItem != null ? tingItem.getClientId() : null)) { z16 = true; if (!z16) { zVar.b().So("webview", arrayList, cVar); } } } z16 = false; if (!z16) { } } mMListenCategoryItem = null; if (z19) { } hashMap.put("err_code", 0); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); return z15; } } } catch (Exception e18) { z15 = false; Log.printErrStackTrace("MicroMsg.WebViewTingHelper", e18, "setTingAudioState exception", new Object[0]); hashMap.put("err_code", -100); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); } } return false; } public static boolean P2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "do open offline pay view"); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); ((u00.f) j.c(u00.f.class)).HR(msgHandler.f167360d, new WalletJsapiData(h1Var.f247819a), 60); return true; } public static Map P3(MsgHandler msgHandler, JSONObject jSONObject) { msgHandler.getClass(); HashMap hashMap = new HashMap(); if (jSONObject != null) { Iterator<String> keys = jSONObject.keys(); while (keys.hasNext()) { String next = keys.next(); hashMap.put(next, jSONObject.opt(next)); } } return hashMap; } public static boolean P4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doVerifyWCPayPassword JSOAUTH"); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); if (msgHandler.f167360d instanceof MMActivity) { WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); intent.putExtra("appId", walletJsapiData.f173486d); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); intent.putExtra("url", walletJsapiData.f173497r); intent.putExtra(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 1); intent.putExtra("pay_channel", walletJsapiData.f173501v); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "wallet_core", ".ui.WalletCheckPwdUI", intent, 20, false); } return true; } public static boolean Q(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; String str2; boolean z15; boolean z16; int i15; boolean z17; Bundle bundle; Bundle bundle2; boolean z18 = false; msgHandler.f167375u = false; m mVar = msgHandler.f167378x; lh4.m.g(h1Var, "msg"); if (!((r21.d) d60.z.q(r21.d.class)).yc(5)) { str = "srcUserName"; } else { int optInt = h1Var.f247858d.optInt("itemType", -1); Bundle bundle3 = new Bundle(); if (optInt >= 0) { String optString = h1Var.f247858d.optString("jumpUrl"); lh4.m.f(optString, "msg.rawParams.optString(\"jumpUrl\")"); bundle3.putString("url", optString); bundle3.putInt("item_show_type", optInt); bundle3.putInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, h1Var.f247858d.optInt("openScene")); bundle3.putInt("openType", -1); bundle3.putString("KPublisherId", h1Var.f247858d.optString("publishId")); bundle3.putInt("geta8key_scene", 65); bundle3.putInt("KPageScene", 1); String d15 = ((FTSWebViewLogic) com.tencent.mm.plugin.webview.modeltools.m.ka()).d(optString); if (d15 == null) { d15 = ""; } String f15 = ((FTSWebViewLogic) com.tencent.mm.plugin.webview.modeltools.m.ka()).f(d15); if (f15 == null) { f15 = ""; } bundle3.putString("KPageInfo", f15); if (optInt == 5) { if (h1Var.f247858d.has("currentInfo")) { bundle3.putString("currentInfo", h1Var.f247858d.optString("currentInfo")); } if (h1Var.f247858d.has("openScene")) { bundle3.putInt("biz_video_scene", h1Var.f247858d.optInt("openScene")); } bundle3.putInt("subscene", h1Var.f247858d.optInt("subScene", 10000)); bundle3.putInt("biz_video_session_id", com.tencent.mm.storage.u0.f175105c); bundle3.putBoolean("isNativePage", true); JSONObject jSONObject = h1Var.f247858d; lh4.m.f(jSONObject, "msg.rawParams"); if (optInt == 5 || optInt == 16) { ub0.o oVar = new ub0.o(); oVar.f317189j = jSONObject.optString("srcUserName"); oVar.f317190n = jSONObject.optString("srcDisplayName"); if (jSONObject.has("url")) { oVar.f317193q.f317211e = jSONObject.optString("url"); } else if (jSONObject.has("jumpUrl")) { oVar.f317193q.f317211e = jSONObject.optString("jumpUrl"); } oVar.f317193q.f317210d = jSONObject.optString(FFmpegMetadataRetriever.METADATA_KEY_TITLE); oVar.f317193q.f317217n = jSONObject.optString("digest"); oVar.f317193q.f317215i = jSONObject.optString("cover"); l lVar = oVar.f317193q; lVar.f317218o = optInt; str = "srcUserName"; lVar.f317214h = (long) jSONObject.optInt("pubTime"); oVar.f317193q.f317220q = jSONObject.optInt("duration"); oVar.f317193q.E = jSONObject.optInt(V2TXJSAdapterConstants.PUSHER_KEY_RESOLUTION_WIDTH); oVar.f317193q.F = jSONObject.optInt(V2TXJSAdapterConstants.PUSHER_KEY_RESOLUTION_HEIGHT); oVar.f317193q.G = jSONObject.optString(TPReportKeys.Common.COMMON_VID); oVar.b(bundle3); } else { str = "srcUserName"; } q.INSTANCE.idkeyStat(1061, 20, 1, false); } else { str = "srcUserName"; } Bundle v65 = mVar != null ? mVar.v6(200, bundle3) : null; if (v65 != null && v65.getBoolean("success")) { z18 = true; } } else { str = "srcUserName"; } z18 = false; } if (z18) { return true; } jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; int i16 = msgHandler.A; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "startSearchItemDetailPage %s", map.toString()); fTSWebViewLogic.f164238n.f242414d = true; boolean d16 = p.d(map, "isTeachPage", false); boolean d17 = p.d(map, "isMoreButton", false); if (p.e(map, "isFeedBack", 0) == 1) { str2 = str; z15 = true; } else { str2 = str; z15 = false; } String f16 = p.f(map, str2); String f17 = p.f(map, "sessionId"); HashMap hashMap = (HashMap) map; String str3 = (String) hashMap.get("navBarColor"); int e15 = p.e(map, "subType", 0); p.f(map, "searchPlaceHolder"); String f18 = p.f(map, "jumpUrl"); String f19 = p.f(map, "searchClickId"); int i17 = (Util.isNullOrNil(f18) || (!f18.contains("http://mp.weixin.qq.com/imgretrieval") && !f18.contains("https://mp.weixin.qq.com/imgretrieval"))) ? -1 : 3; if (!Util.isNullOrNil(str3)) { try { i15 = Color.parseColor(str3); } catch (IllegalArgumentException e16) { Log.e("MicroMsg.WebSearch.FTSWebViewLogic", "startSearchItemDetailPage: " + e16.getMessage()); z16 = true; } } else { i15 = 0; } String str4 = (String) hashMap.get("statusBarStyle"); if (z15) { String f25 = p.f(map, "jumpUrl"); if (i16 != -1) { bundle2 = ((o0) j.c(o0.class)).TQ(i16); } else { bundle2 = null; } fTSWebViewLogic.n(f25, bundle2, 0, "", "", 0, "", 0, 0, ""); } else { int e17 = p.e(map, "type", 0); int e18 = p.e(map, "opType", 0); if (e18 > 0) { if (e18 == 2) { fTSWebViewLogic.k(fTSWebViewLogic.i(map), d16); } else if (e18 == 3) { jo3.d i18 = fTSWebViewLogic.i(map); if (!w0.F(i18.f242291a)) { fTSWebViewLogic.k(i18, d16); } else { a1.a(i18.f242291a); Intent intent = new Intent(); intent.putExtra("Chat_User", i18.f242291a); intent.putExtra("finish_direct", true); intent.putExtra("key_temp_session_show_type", 0); intent.putExtra("preChatTYPE", 9); intent.putExtra("KOpenArticleSceneFromScene", 7); sv3.b.t(MMApplicationContext.getContext(), ".ui.chatting.ChattingUI", intent, null); } } else if (e18 == 4) { String f26 = p.f(map, "jumpUrl"); if (i16 != -1) { bundle = ((o0) j.c(o0.class)).TQ(i16); } else { bundle = null; } fTSWebViewLogic.n(f26, bundle, 0, "", "", 0, "", 0, 0, ""); } } else if (d17) { String f27 = p.f(map, "query"); int e19 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); String f28 = p.f(map, "searchId"); Intent intent2 = new Intent(); intent2.putExtra("hardcode_jspermission", JsapiPermissionWrapper.f173510h); intent2.putExtra("hardcode_general_ctrl", GeneralControlWrapper.f173507e); intent2.putExtra("neverGetA8Key", true); intent2.putExtra("key_load_js_without_delay", true); intent2.putExtra("ftsQuery", f27); intent2.putExtra("ftsType", e17); intent2.putExtra("sessionId", f17); Map<String, String> c15 = jo3.z0.c(e19, false, e17, ""); try { ((HashMap) c15).put("query", ck.q.b(f27, "UTF-8")); } catch (Exception unused) { ((HashMap) c15).put("query", f27); } HashMap hashMap2 = (HashMap) c15; hashMap2.put("searchId", f28); hashMap2.put("sessionId", f17); String f29 = jo3.z0.f(Util.safeParseInt((String) hashMap2.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE))); hashMap2.put("subSessionId", f29); intent2.putExtra("subSessionId", f29); intent2.putExtra("rawUrl", jo3.z0.e(c15, 0)); intent2.putExtra("key_session_id", f17); intent2.putExtra("searchId", f28); if (e19 == 20 || e19 == 22 || e19 == 24 || e19 == 33) { sv3.b.j(MMApplicationContext.getContext(), "webview", ".ui.tools.fts.MMFTSSOSMoreWebViewUI", intent2, null); } else { sv3.b.y(MMApplicationContext.getContext(), intent2, null); } } else { Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "doStartSearchItemDetailPage: type=%d link=%s", Integer.valueOf(e17), (String) hashMap.get("url")); if (e17 == 1) { z17 = false; fTSWebViewLogic.k(fTSWebViewLogic.i(map), false); } else if (e17 == 8) { z17 = false; fTSWebViewLogic.m(p.f(map, "snsid"), p.f(map, "objectXmlDesc"), p.f(map, "userName"), p.d(map, "fromMusicItem", false)); } else if (e17 != 32) { String f35 = p.f(map, "jumpUrl"); String f36 = p.f(map, "publishId"); int e25 = p.e(map, "payScene", 0); int e26 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "jump url = %s, publishId = %s, payScene = %d", f35, f36, Integer.valueOf(e25)); String f37 = p.f(map, "cookie"); Bundle TQ = i16 != -1 ? ((o0) j.c(o0.class)).TQ(i16) : null; if (!Util.isNullOrNil(f35)) { fTSWebViewLogic.o(f35, TQ, i15, str4, f36, e25, f16, e26, e15, f37, i17, f19); } } else { fTSWebViewLogic.l(fTSWebViewLogic.h(map)); } z16 = z17; return z16; } } z17 = false; z16 = z17; return z16; } public static boolean Q0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); int i15 = Util.getInt((String) h1Var.f247819a.get("selectMode"), 0); Log.i("MicroMsg.MsgHandler", "doSelectSingleContact selectedMode:%d", Integer.valueOf(i15)); Intent intent = new Intent(); if (i15 == 1) { intent.putExtra("Select_Conv_Type", TPReportParams.LIVE_STEP_PLAY); intent.putExtra("jsapi_select_mode", 1); } else { intent.putExtra("Select_Conv_Type", TinkerStatusReport.KVSTAT_TYPE_ID_TINKER_EXCEPTION); } intent.putExtra("select_is_ret", true); intent.putExtra("Select_block_List", u0.r()); intent.putExtra("scene_from", 4); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { sv3.b.v((MMActivity) context, ".ui.transmit.SelectConversationUI", intent, 30, msgHandler); } return true; } public static boolean Q1(MsgHandler msgHandler, h1 h1Var) { String n65 = msgHandler.n6(); Log.i("MicroMsg.MsgHandler", "doSetTingAudioState appId:%s", n65); o1.a(h1Var.f247862h, false, null, n65); msgHandler.L6(true); if (com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c == null) { synchronized (com.tencent.mm.plugin.webview.ui.tools.media.z.class) { if (com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c == null) { Context context = MMApplicationContext.getContext(); lh4.m.f(context, "getContext()"); com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c = new com.tencent.mm.plugin.webview.ui.tools.media.z(context, null); } b0 b0Var = b0.f332794a; } } com.tencent.mm.plugin.webview.ui.tools.media.z zVar = com.tencent.mm.plugin.webview.ui.tools.media.z.f168157c; msgHandler.y6(h1Var); zVar.getClass(); if (!zVar.a(h1Var, msgHandler, new HashMap<>())) { return false; } String str = (String) h1Var.f247819a.get("operationType"); Log.i("MicroMsg.WebViewTingHelper", "doOperateTingAudio, opType:%s", str); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.WebViewTingHelper", "doOperateTingAudio optype is empty"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return true; } else if (y.l(str, AssetExtension.SCENE_PLAY, true) || y.l(str, "resume", true)) { if (zVar.b().resume()) { msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } Log.e("MicroMsg.WebViewTingHelper", h1Var.f247863i + " play fail"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return true; } else if (y.l(str, "pause", true)) { if (zVar.b().pause()) { msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } Log.e("MicroMsg.WebViewTingHelper", h1Var.f247863i + " pause fail"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return true; } else if (y.l(str, "seek", true)) { float f15 = Util.getFloat((String) h1Var.f247819a.get("seektime"), 0.0f); Log.i("MicroMsg.WebViewTingHelper", "operateTingAudio seek currentTime: " + f15); if (f15 < 0.0f) { Log.e("MicroMsg.WebViewTingHelper", "currentTime is invalid!"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return true; } else if (zVar.b().seekTo((long) (f15 * ((float) 1000)))) { msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } else { Log.e("MicroMsg.WebViewTingHelper", h1Var.f247863i + " seek fail"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return true; } } else if (y.l(str, "stop", true)) { if (zVar.b().stop()) { msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } Log.e("MicroMsg.WebViewTingHelper", h1Var.f247863i + " stop fail"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return true; } else if (y.l(str, "next", true)) { zVar.b().next(); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } else if (y.l(str, "pre", true)) { zVar.b().tT(); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } else if (y.m(str, "playRate", false, 2, null)) { float safeParseFloat = Util.safeParseFloat((String) h1Var.f247819a.get("playRate")); if (safeParseFloat <= 0.5f || ((double) safeParseFloat) > 2.0d) { safeParseFloat = 1.0f; } Log.i("MicroMsg.WebViewTingHelper", "operateTingAudio updatePlayRate: " + safeParseFloat); zVar.b().setPlayRate(safeParseFloat); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } else if (y.m(str, "playMode", false, 2, null)) { int i15 = Util.getInt((String) h1Var.f247819a.get("playMode"), 0); Log.i("MicroMsg.WebViewTingHelper", "operateTingAudio updatePlayMode: " + i15); zVar.b().tu0(i15); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } else if (y.m(str, "shuffle", false, 2, null)) { boolean z15 = Util.getBoolean((String) h1Var.f247819a.get("shuffle"), false); Log.i("MicroMsg.WebViewTingHelper", "operateTingAudio updateShuffle: " + z15); zVar.b().Dy(z15); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } else { Log.e("MicroMsg.WebViewTingHelper", h1Var.f247863i + " fail, invalid opType"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return true; } } public static boolean Q2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Log.i("MicroMsg.MsgHandler", "appid %s timeStamp %s nonceStr %s packageExt %s signType %s", Util.nullAs((String) h1Var.f247819a.get("appid"), ""), walletJsapiData.f173490h, walletJsapiData.f173489g, walletJsapiData.f173491i, walletJsapiData.f173488f); Log.i("MicroMsg.MsgHandler", "isKindaBankCardManagerEnable"); ((qv3.c) j.c(qv3.c.class)).startUseCase("bankCard", ITransmitKvData.create(), new o0(msgHandler)); msgHandler.q5(h1Var, "openWCPayCardList:ok", null); q.INSTANCE.g(14954, qv3.h.f291958a, "openWCPayCardList:ok"); return true; } public static boolean Q3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("specificview"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "doOpenSpecificView fail, invalid specificview"); msgHandler.q5(h1Var, "specific_view:fail", null); } else { Bundle bundle = new Bundle(); bundle.putInt("webview_scene", Util.getInt((String) h1Var.f247819a.get("webview_scene"), 0)); bundle.putString("url", (String) h1Var.f247819a.get("url")); bundle.putString("extinfo", (String) h1Var.f247819a.get("extinfo")); cu3.z zVar = ap3.a.f7840a; ((w1) zVar).getClass(); boolean d15 = ((com.tencent.mm.app.plugin.e) f0.a.a()).d(msgHandler.f167360d, str, bundle); Log.i("MicroMsg.MsgHandler", "doOpenSpecificView, targetView = %s, ret = %b", str, Boolean.valueOf(d15)); if (d15) { msgHandler.q5(h1Var, "specific_view:ok", null); } else { Log.e("MicroMsg.MsgHandler", "doOpenSpecificView, targetView not supported in current wechat version"); msgHandler.q5(h1Var, "specific_view:not_supported", null); } } return true; } public static boolean Q4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper, int[] iArr) { msgHandler.q5(h1Var, "startMonitoringBeacons:ok", null); return true; } public static boolean R(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "startCommonSearchItemDetailPage %s", map.toString()); String f15 = p.f(map, "snsid"); String f16 = p.f(map, "objectXmlDesc"); TimeLineObject fJ0 = ((d63.v) j.c(d63.v.class)).fJ0(f16); if (fJ0 == null || fJ0.ContentObj == null) { return false; } String Uh0 = ((bz.d1) j.c(bz.d1.class)).Uh0(fJ0.Id); m20 m202 = fJ0.ContentObj; int i15 = m202.f29268e; if (i15 != 1) { if (i15 == 10) { LinkedList<mc3> linkedList = m202.f29271h; if (linkedList != null && linkedList.size() >= 1) { String str = fJ0.ContentObj.f29271h.get(0).f29574u; Intent intent = new Intent(); intent.putExtra("sns_object_data", str); intent.putExtra("preceding_scence", 10); intent.putExtra("download_entrance_scene", 13); sv3.b.j(MMApplicationContext.getContext(), "emoji", ".ui.EmojiStoreDetailUI", intent, null); } } else if (i15 != 15) { if (i15 != 26) { if (i15 == 28 || i15 == 50) { ((bz.d1) j.c(bz.d1.class)).iq(MMApplicationContext.getContext(), fJ0); } } else if (Util.isNullOrNil(m202.f29273j)) { return false; } else { if (Util.isNullOrNil(Uh0)) { fTSWebViewLogic.m(f15, f16, p.f(map, "userName"), p.d(map, "fromMusicItem", false)); } else { FavoriteOperationEvent favoriteOperationEvent = new FavoriteOperationEvent(); FavoriteOperationEvent.a aVar = favoriteOperationEvent.f62696d; aVar.f62698a = 37; aVar.f62700c = fJ0.ContentObj.f29273j; aVar.f62712o = ((bz.d1) j.c(bz.d1.class)).UH0(fJ0); favoriteOperationEvent.f62696d.f62699b = ((bz.d1) j.c(bz.d1.class)).Uh0(fJ0.Id); favoriteOperationEvent.f62696d.f62705h = MMApplicationContext.getContext(); favoriteOperationEvent.publish(); } } } else if (Util.isNullOrNil(Uh0)) { fTSWebViewLogic.m(f15, f16, p.f(map, "userName"), p.d(map, "fromMusicItem", false)); } else { ThreadPool.post(new com.tencent.mm.plugin.websearch.g(fTSWebViewLogic, fJ0), "play_video_task"); } } else if (Util.isNullOrNil(Uh0)) { fTSWebViewLogic.m(f15, f16, p.f(map, "userName"), p.d(map, "fromMusicItem", false)); } else { int e15 = p.e(map, "snsImageIndex", 0); if (!((bz.d1) j.c(bz.d1.class)).mn(Uh0, e15, new ArrayList())) { fTSWebViewLogic.m(f15, f16, p.f(map, "userName"), p.d(map, "fromMusicItem", false)); } else { ((bz.d1) j.c(bz.d1.class)).ur0(MMApplicationContext.getContext(), 2, 1, fJ0, f15, e15); } } return true; } public static boolean R0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doSendAppMsgToSpecifiedContact"); String str = (String) h1Var.f247819a.get(Scopes.OPEN_ID); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "doSendAppMsgToSpecifiedContact openid is null"); msgHandler.q5(h1Var, "sendAppMessageToSpecifiedContact:fail", null); return true; } String str2 = (String) h1Var.f247819a.get("appId"); if (msgHandler.f167367n != null && TextUtils.isEmpty(str2)) { str2 = msgHandler.f167367n.getString("jsapi_args_appid"); } if (Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "doSendAppMsgToSpecifiedContact appid is null"); msgHandler.q5(h1Var, "sendAppMessageToSpecifiedContact:fail", null); return true; } msgHandler.f167362f = msgHandler.w5(h1Var, false); m0 m0Var = new m0(str2, str); d60.z.d().a(bt0.c.CTRL_INDEX, new a0(msgHandler, h1Var, str2)); d60.z.d().f(m0Var); Context context = msgHandler.f167360d; msgHandler.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(msgHandler.f167360d).getString(R.string.f367656zq), true, true, new b0(msgHandler, m0Var)); return true; } public static boolean R1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); if (ChannelUtil.isGPVersion()) { Log.e("MicroMsg.MsgHandler", "doAddDownloadTaskStraight fail, GP Version not allowed to download"); msgHandler.q5(h1Var, "system:access_denied", null); return true; } String str = (String) ((HashMap) h1Var.f247819a).get("appid"); String str2 = (String) ((HashMap) h1Var.f247819a).get("url"); String str3 = (String) ((HashMap) h1Var.f247819a).get("extInfo"); String str4 = (String) ((HashMap) h1Var.f247819a).get("task_url"); long j15 = Util.getLong((String) ((HashMap) h1Var.f247819a).get("task_size"), 0); int i15 = Util.getInt((String) ((HashMap) h1Var.f247819a).get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 1000); int i16 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("download_type"), 1); int i17 = Util.getInt((String) ((HashMap) h1Var.f247819a).get(TPDownloadProxyEnum.USER_SSID), 0); int i18 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("uiarea"), 0); int i19 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("notice_id"), 0); boolean z15 = Util.getBoolean((String) ((HashMap) h1Var.f247819a).get("use_downloader_widget"), false); ((w) j.c(w.class)).Rq(9, new ua1.b(str, i15, str3, i18, i17, i19, i16)); if (((s0) d60.z.q(s0.class)).isTeenMode()) { Log.i("MicroMsg.MsgHandler", "doAddDownloadTaskStraight isTeenMode and ignore"); ((i) j.c(i.class)).O4(msgHandler.f167360d); msgHandler.q5(h1Var, "add_download_task_straight:cancel", null); } else if (z15) { ((kq.c0) j.c(kq.c0.class)).Lx(msgHandler.f167360d, com.tencent.mm.plugin.downloader_app.model.a.c(h1Var.f247819a), new w1(msgHandler, h1Var)); ((lv.i) j.c(lv.i.class)).yP(10, "MsgHandler_doAddDownloadTaskStraight", msgHandler.hashCode()); } else if (!NetStatusUtil.isNetworkConnected(msgHandler.f167360d)) { Context context = msgHandler.f167360d; ak.a.makeText(context, hy3.h.a(context).getString(R.string.f368635fm1), 0).show(); msgHandler.q5(h1Var, "add_download_task_straight:fail_network_not_connected", null); Log.i("MicroMsg.MsgHandler", "doAddDownloadTaskStraight fail, network not ready"); msgHandler.V6(str, TingProto.TingReportContext.ACTIONSONGINDEXINLIST_FIELD_NUMBER, str3); } else if (!d60.z.s().n()) { Context context2 = msgHandler.f167360d; ak.a.makeText(context2, hy3.h.a(context2).getString(R.string.f368637fm3), 0).show(); msgHandler.q5(h1Var, "add_download_task_straight:fail_sdcard_not_ready", null); msgHandler.V6(str, TingProto.TingReportContext.ACTIONCATEGORYID_FIELD_NUMBER, str3); Log.i("MicroMsg.MsgHandler", "doAddDownloadTaskStraight fail, sdcard not ready"); } else if (j15 > 0 && !((kq.x) j.c(kq.x.class)).tw0(j15) && !((kq.x) j.c(kq.x.class)).fq(j15)) { Context context3 = msgHandler.f167360d; ak.a.makeText(context3, hy3.h.a(context3).getString(R.string.f368636fm2), 0).show(); msgHandler.q5(h1Var, "add_download_task_straight:fail_sdcard_has_not_enough_space", null); msgHandler.V6(str, TingProto.TingReportContext.ACTIONCATEGORYID_FIELD_NUMBER, str3); Log.i("MicroMsg.MsgHandler", "doAddDownloadTaskStraight fail, not enough space, require size = " + j15); } else if (NetStatusUtil.isWifi(msgHandler.f167360d)) { msgHandler.A5(h1Var, jsapiPermissionWrapper); } else { q.INSTANCE.g(14217, str, 4, str2, str4, 3); Context context4 = msgHandler.f167360d; i14.j.D(context4, hy3.h.a(context4).getString(R.string.l5x), hy3.h.a(msgHandler.f167360d).getString(R.string.l5y), hy3.h.a(msgHandler.f167360d).getString(R.string.l5q), hy3.h.a(msgHandler.f167360d).getString(R.string.f367394sg), false, new u1(msgHandler, str, str2, str4, h1Var, jsapiPermissionWrapper), new v1(msgHandler, str, str2, str4, h1Var), R.color.aaq); } return true; } public static boolean R2(MsgHandler msgHandler, final h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { final String str; final String str2; int i15; msgHandler.getClass(); if (ChannelUtil.isGPVersion()) { Log.e("MicroMsg.MsgHandler", "addDownloadApp fail, GP Version not allowed to download"); msgHandler.q5(h1Var, "system:access_denied", null); } else { final String str3 = (String) ((HashMap) h1Var.f247819a).get("targetAppid"); final String str4 = (String) ((HashMap) h1Var.f247819a).get("apk_url"); String str5 = (String) ((HashMap) h1Var.f247819a).get("file_md5"); final String str6 = (String) ((HashMap) h1Var.f247819a).get("task_name"); String str7 = (String) ((HashMap) h1Var.f247819a).get("alternative_url"); final long j15 = Util.getLong((String) ((HashMap) h1Var.f247819a).get("task_size"), 0); final String str8 = (String) ((HashMap) h1Var.f247819a).get("extInfo"); final String str9 = (String) ((HashMap) h1Var.f247819a).get(IXWebBroadcastListener.PACKAGE_NAME); final String str10 = (String) ((HashMap) h1Var.f247819a).get("url"); final int i16 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("download_type"), 0); if (Util.isNullOrNil(str3)) { Log.e("MicroMsg.MsgHandler", "addDownloadApp fail_invalid_appid"); msgHandler.q5(h1Var, "addDownloadApp:fail_invalid_appid", null); } else { boolean isTeenMode = ((s0) d60.z.q(s0.class)).isTeenMode(); Log.i("MicroMsg.MsgHandler", "addDownloadApp, md5=%s, url=%s, appid=%s, currentUrl=%s, isTeenMode=%s", str5, str4, str3, str10, Boolean.valueOf(isTeenMode)); if (isTeenMode) { ((i) j.c(i.class)).O4(msgHandler.f167360d); msgHandler.q5(h1Var, "addDownloadApp:cancel", null); } else { Bundle bundle = msgHandler.f167367n; if (bundle != null) { int i17 = bundle.getInt("key_download_restrict", 0); String string = msgHandler.f167367n.getString("key_function_id", ""); if (!Util.isNullOrNil(string)) { str = str5; str2 = str7; i15 = 1; q.INSTANCE.g(14596, string, Integer.valueOf(i17), 0); } else { str2 = str7; str = str5; i15 = 1; } if (i17 == i15) { Log.e("MicroMsg.MsgHandler", "not allow to download file"); msgHandler.q5(h1Var, "addDownloadApp:fail", null); } } else { str2 = str7; str = str5; } if (!NetStatusUtil.isNetworkConnected(msgHandler.f167360d)) { msgHandler.q5(h1Var, "addDownloadApp:fail_network_not_connected", null); MMHandlerThread.postToMainThread(new a2(msgHandler)); Log.i("MicroMsg.MsgHandler", "addDownloadApp fail, network not ready"); msgHandler.V6(str3, TingProto.TingReportContext.ACTIONSONGINDEXINLIST_FIELD_NUMBER, ""); } else if (!d60.z.s().n()) { msgHandler.q5(h1Var, "addDownloadApp:fail_sdcard_not_ready", null); MMHandlerThread.postToMainThread(new c2(msgHandler)); msgHandler.V6(str3, TingProto.TingReportContext.ACTIONCATEGORYID_FIELD_NUMBER, ""); Log.i("MicroMsg.MsgHandler", "addDownloadApp fail, sdcard not ready"); } else if (j15 > 0 && !ck.f.c(j15) && !((kq.x) j.c(kq.x.class)).fq(j15)) { msgHandler.q5(h1Var, "addDownloadApp:fail_sdcard_has_not_enough_space", null); MMHandlerThread.postToMainThread(new d2(msgHandler)); msgHandler.V6(str3, TingProto.TingReportContext.ACTIONCATEGORYID_FIELD_NUMBER, str8); Log.i("MicroMsg.MsgHandler", "addDownloadApp fail, not enough space, require size = " + j15); } else if (Util.isNullOrNil(str4)) { Log.e("MicroMsg.MsgHandler", "addDownloadApp fail, url is null"); msgHandler.q5(h1Var, "addDownloadApp:fail_invalid_url", null); msgHandler.V6(str3, 700, ""); } else { c.b bVar = new c.b(); bVar.f345559a = new ix(); bVar.f345560b = new jx(); bVar.f345561c = "/cgi-bin/mmbiz-bin/check_yybmicrodownloadurl"; bVar.f345562d = 2643; yf0.c a15 = bVar.a(); ix ixVar = (ix) a15.f345548a.f345573a; ixVar.f25432e = str10; ixVar.f25431d = str3; yf0.y f15 = l0.f(a15, new l0$$e() { /* class com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler.AnonymousClass42 */ @Override // yf0.l0$$e public int callback(int i15, int i16, String str, yf0.c cVar, yf0.y yVar) { ProgressDialog progressDialog = MsgHandler.this.f167363g; if (progressDialog != null && progressDialog.isShowing()) { MsgHandler.this.f167363g.dismiss(); } Log.i("MicroMsg.MsgHandler", "doAddDownloadApp check result errType:%d errCode:%d msg:%s", Integer.valueOf(i15), Integer.valueOf(i16), str); if (i15 == 0 && i16 == 0) { jx jxVar = (jx) cVar.f345549b.f345576a; if (jxVar == null || jxVar.f26679f != 0) { Object[] objArr = new Object[1]; objArr[0] = Integer.valueOf(jxVar != null ? jxVar.f26679f : Integer.MAX_VALUE); Log.e("MicroMsg.MsgHandler", "doAddDownloadApp %d", objArr); MsgHandler.this.q5(h1Var, "addDownloadApp:fail_check fail", null); return 0; } Intent intent = new Intent(); intent.setClass(MsgHandler.this.f167360d, WebViewDownloadUI.class); intent.putExtra("task_name", str6); intent.putExtra("task_url", str4); intent.putExtra("alternative_url", str2); intent.putExtra("task_size", j15); intent.putExtra("file_md5", str); intent.putExtra("extInfo", str8); intent.putExtra("appid", str3); intent.putExtra(IXWebBroadcastListener.PACKAGE_NAME, str9); intent.putExtra("page_url", str10); intent.putExtra("page_scene", 0); intent.putExtra("thumb_url", jxVar.f26678e); intent.putExtra(FFmpegMetadataRetriever.METADATA_KEY_TITLE, jxVar.f26677d); intent.putExtra("task_download_type", i16); intent.putExtra("app_developer", (String) h1Var.f247819a.get("developer")); intent.putExtra("app_desc", (String) h1Var.f247819a.get("app_desc")); intent.putExtra("app_privacy_url", (String) h1Var.f247819a.get("privacy_agreement_url")); intent.putExtra("app_permission_url", (String) h1Var.f247819a.get("permission_url")); intent.putExtra("from_scene", 4); intent.addFlags(268435456); Context context = MsgHandler.this.f167360d; k30.a aVar = new k30.a(); aVar.c(intent); j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler$42", "callback", "(IILjava/lang/String;Lcom/tencent/mm/modelbase/CommReqResp;Lcom/tencent/mm/modelbase/NetSceneBase;)I", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context.startActivity((Intent) aVar.a(0)); j30.a.e(context, "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler$42", "callback", "(IILjava/lang/String;Lcom/tencent/mm/modelbase/CommReqResp;Lcom/tencent/mm/modelbase/NetSceneBase;)I", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); MsgHandler.this.L = new IListener<AddDownloadTaskEvent>(h.f61283d) { /* class com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler.AnonymousClass42.AnonymousClass1 */ { this.__eventId = 1058823164; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.tencent.mm.sdk.event.IEvent] */ @Override // com.tencent.mm.sdk.event.IListener public boolean callback(AddDownloadTaskEvent addDownloadTaskEvent) { AddDownloadTaskEvent addDownloadTaskEvent2 = addDownloadTaskEvent; if (!(addDownloadTaskEvent2 instanceof AddDownloadTaskEvent)) { Log.w("MicroMsg.MsgHandler", "mismatched event"); return false; } AddDownloadTaskEvent.a aVar = addDownloadTaskEvent2.f61796d; if (aVar.f61797a != 0) { Log.i("MicroMsg.MsgHandler", "not jsapi api callback"); return false; } HashMap hashMap = null; if (aVar.f61798b) { Log.i("MicroMsg.MsgHandler", "addDownloadApp callback, cancel"); if (!Util.isNullOrNil(addDownloadTaskEvent2.f61796d.f61800d)) { hashMap = new HashMap(); hashMap.put("detail_err_msg", addDownloadTaskEvent2.f61796d.f61800d); } AnonymousClass42 r102 = AnonymousClass42.this; MsgHandler.this.q5(h1Var, "addDownloadApp:cancel", hashMap); return false; } if (aVar.f61799c > 0) { HashMap hashMap2 = new HashMap(); hashMap2.put("download_id", Long.valueOf(addDownloadTaskEvent2.f61796d.f61799c)); hashMap2.put("detail_err_msg", addDownloadTaskEvent2.f61796d.f61800d); Log.i("MicroMsg.MsgHandler", "addDownloadApp callback, ok"); AnonymousClass42 r103 = AnonymousClass42.this; MsgHandler.this.q5(h1Var, "addDownloadApp:ok", hashMap2); } else { Log.i("MicroMsg.MsgHandler", "addDownloadApp callback, failed"); AnonymousClass42 r104 = AnonymousClass42.this; MsgHandler.this.q5(h1Var, "addDownloadApp:fail", null); } MsgHandler.this.L.dead(); return false; } }; MsgHandler.this.L.alive(); return 0; } MsgHandler.this.q5(h1Var, "addDownloadApp:fail_check fail", null); return 0; } }, true, null); Context context = msgHandler.f167360d; msgHandler.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(msgHandler.f167360d).getString(R.string.f367656zq), true, true, new e2(msgHandler, f15)); } } return true; } } return true; } public static void R3(MsgHandler msgHandler) { msgHandler.getClass(); try { msgHandler.f167378x.v6(12, new Bundle(0)); msgHandler.f167378x.v6(11, new Bundle(0)); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "clearCloseWindowConfirmDialogInfo, exception = %s", e15); } } public static boolean R4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper, int[] iArr) { msgHandler.q5(h1Var, "stopMonitoringBeacons:ok", null); return true; } public static boolean S(MsgHandler msgHandler) { msgHandler.getClass(); try { msgHandler.f167378x.xH(3003, null); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "doShowOptionMenu, RemoteException : %s", e15.getMessage()); } msgHandler.f167375u = false; return false; } public static boolean S0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); try { Bundle bundle = new Bundle(1); bundle.putString("place_holder", "place_holder"); msgHandler.f167378x.Va0(); msgHandler.f167378x.d(bundle); } catch (Exception unused) { } return true; } /* JADX WARNING: Removed duplicated region for block: B:22:0x0058 A[Catch:{ Exception -> 0x0075 }] */ /* JADX WARNING: Removed duplicated region for block: B:23:0x0071 A[Catch:{ Exception -> 0x0075 }] */ public static boolean S1(MsgHandler msgHandler, h1 h1Var) { int i15; msgHandler.getClass(); String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("orientation")); if (!Util.isNullOrNil(nullAsNil)) { if (nullAsNil.equals("horizontal")) { i15 = 0; } else if (nullAsNil.equals("vertical")) { i15 = 1; } else if (nullAsNil.equals("sensor")) { i15 = 4; } else if (nullAsNil.equals("horizontal_unforced")) { i15 = 1001; } else if (nullAsNil.equals("vertical_unforced")) { i15 = 1002; } if (msgHandler.f167378x == null) { Bundle bundle = new Bundle(); bundle.putInt("screen_orientation", i15); msgHandler.f167378x.v6(1009, bundle); msgHandler.q5(h1Var, "setScreenOrientation:ok", null); } else { msgHandler.q5(h1Var, "setScreenOrientation:fail", null); } return true; } i15 = -1; try { if (msgHandler.f167378x == null) { } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doSetScreenOrientation exception, " + e15.getMessage()); msgHandler.q5(h1Var, "setScreenOrientation:fail", null); } return true; } public static boolean S2(MsgHandler msgHandler, h1 h1Var) { Context context = msgHandler.f167360d; if (context == null || !(context instanceof MMActivity)) { return true; } ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.m(msgHandler.f167360d, "setting", ".ui.setting.SettingsModifyEmailAddrUI", 58); return true; } /* JADX WARNING: Removed duplicated region for block: B:24:0x00c3 */ /* JADX WARNING: Removed duplicated region for block: B:29:0x00d9 */ /* JADX WARNING: Removed duplicated region for block: B:33:0x00e6 */ /* JADX WARNING: Removed duplicated region for block: B:40:0x0154 */ public static boolean S3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; String str2; int i15; Signature signature; String f15; Bundle bundle = msgHandler.f167367n; String str3 = ""; if (bundle != null) { int i16 = bundle.getInt("key_download_restrict", 0); String string = msgHandler.f167367n.getString("key_function_id", str3); if (!Util.isNullOrNil(string)) { q.INSTANCE.g(14596, string, Integer.valueOf(i16), 1); } if (i16 == 1) { Log.e("MicroMsg.MsgHandler", "not allow tolaunch 3rd app"); msgHandler.q5(h1Var, "launch_3rdApp:fail", null); return true; } } String str4 = (String) h1Var.f247819a.get("type"); String str5 = (String) h1Var.f247819a.get("appID"); long nowSecond = Util.nowSecond() - msgHandler.I; Log.i("MicroMsg.MsgHandler", "lauchTimeInterval = %d", Long.valueOf(nowSecond)); if (nowSecond >= 2 || msgHandler.I <= 0) { str = str3; } else { try { String currentUrl = msgHandler.f167378x.getCurrentUrl(); str = msgHandler.f167382z.c(currentUrl); try { String encode = URLEncoder.encode(currentUrl, "UTF-8"); q.INSTANCE.g(13983, 5, encode, str3); str3 = encode; } catch (Exception unused) { Log.e("MicroMsg.MsgHandler", "report lauch3rd failed"); o1.a(h1Var.f247862h, false, null, str5); if (!Util.isNullOrNil(str4)) { } i15 = 0; Log.i("MicroMsg.MsgHandler", "doLaunch3RdApp launchType = %s", str2); if (i15 == 0) { } return true; } } catch (Exception unused2) { str = str3; Log.e("MicroMsg.MsgHandler", "report lauch3rd failed"); o1.a(h1Var.f247862h, false, null, str5); if (!Util.isNullOrNil(str4)) { } Log.i("MicroMsg.MsgHandler", "doLaunch3RdApp launchType = %s", str2); if (i15 == 0) { } return true; } } o1.a(h1Var.f247862h, false, null, str5); if (!Util.isNullOrNil(str4)) { str2 = str4; try { i15 = Util.getInt(str2, 0); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "invalid type", e15.getMessage()); } } else { str2 = str4; i15 = 0; } Log.i("MicroMsg.MsgHandler", "doLaunch3RdApp launchType = %s", str2); if (i15 == 0) { String str6 = (String) h1Var.f247819a.get("extInfo"); Log.i("MicroMsg.MsgHandler", "doLaunch3RdApp, appid:[%s], extinfo:[%s]", str5, str6); if (Util.isNullOrNil(str5)) { Log.e("MicroMsg.MsgHandler", "appid is null or nil"); msgHandler.q5(h1Var, "launch_3rdApp:fail", null); } else if (!ap3.a.f7841b.ec(MMApplicationContext.getContext(), str5)) { Log.e("MicroMsg.MsgHandler", "app is not installed, appid:[%s]", str5); msgHandler.q5(h1Var, "launch_3rdApp:fail", null); } else { WXAppExtendObject wXAppExtendObject = new WXAppExtendObject(); wXAppExtendObject.extInfo = str6; WXMediaMessage wXMediaMessage = new WXMediaMessage(wXAppExtendObject); wXMediaMessage.sdkVer = Build.SDK_INT; wXMediaMessage.messageExt = str6; Launch3RdAppEvent launch3RdAppEvent = new Launch3RdAppEvent(); Launch3RdAppEvent.a aVar = launch3RdAppEvent.f63377d; aVar.f63379a = wXMediaMessage; aVar.f63380b = str5; aVar.f63382d = msgHandler.f167360d; aVar.f63383e = new l2(msgHandler, h1Var); launch3RdAppEvent.publish(); } } else if (i15 == 1) { String str7 = (String) h1Var.f247819a.get("signature"); String str8 = (String) h1Var.f247819a.get("packageName"); String str9 = (String) h1Var.f247819a.get("param"); Log.i("MicroMsg.MsgHandler", "doLaunch3RdApp, signature:[%s], packageName:[%s], param:[%s]", str7, str8, str9); if (Util.isNullOrNil(str7) || Util.isNullOrNil(str8)) { Log.e("MicroMsg.MsgHandler", "doLaunch3RdApp invalid_args"); msgHandler.q5(h1Var, "launch_3rdApp:fail_invalid_args", null); } else if (!j0.f(msgHandler.f167360d, str8)) { Log.e("MicroMsg.MsgHandler", "doLaunch3RdApp not_install"); if (Util.isAffectedByPackageVisibility(MMApplicationContext.getContext())) { Log.i("MicroMsg.MsgHandler", "doLaunch3RdApp isAffectedByPackageVisibility"); msgHandler.Q5(str8, str9, str3, str); } else { msgHandler.q5(h1Var, "launch_3rdApp:fail_not_install", null); } } else { Signature[] a15 = com.tencent.mm.pluginsdk.model.app.c.a(msgHandler.f167360d, str8); if (a15 == null || (signature = a15[0]) == null || (f15 = gh.g.f(signature.toByteArray())) == null || !f15.equalsIgnoreCase(str7)) { Log.e("MicroMsg.MsgHandler", "doLaunch3RdApp signature_mismatch"); msgHandler.q5(h1Var, "launch_3rdApp:fail_signature_mismatch", null); } else { msgHandler.Q5(str8, str9, str3, str); } } } else { msgHandler.q5(h1Var, "launch_3rdApp:fail_invalid_type", null); } return true; } public static boolean S4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); a0.a aVar = new a0.a(); aVar.f165889b = (String) ((HashMap) h1Var.f247819a).get("link"); aVar.f165888a = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); aVar.f165891d = (String) ((HashMap) h1Var.f247819a).get("imgUrl"); aVar.f165890c = (String) ((HashMap) h1Var.f247819a).get("desc"); String str = (String) ((HashMap) h1Var.f247819a).get("floatBallTitle"); if (!Util.isNullOrNil(str)) { Bundle bundle = new Bundle(); bundle.putString("key_title", str); try { msgHandler.f167378x.callback(72, bundle); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doUpdateAppMsgData remote ex, %s", e15.getMessage()); } } if (Util.isNullOrNil(aVar.f165889b)) { Log.i("MicroMsg.MsgHandler", "doUpdateAppMsgData link not allow to share %s", aVar.f165889b); msgHandler.q5(h1Var, "updateAppMessageShareData:fail, link is needed.", null); } else if (msgHandler.a7(jsapiPermissionWrapper, h1Var)) { Log.i("MicroMsg.MsgHandler", "doUpdateAppMsgData link not allow to share %s", aVar.f165889b); msgHandler.q5(h1Var, "updateAppMessageShareData:fail, link must be in JS secure domain list", null); } else { String str2 = (String) ((HashMap) h1Var.f247819a).get("url"); Log.i("MicroMsg.MsgHandler", "doUpdateAppMsgData url %s, imgUrl:%s", str2, aVar.f165891d); msgHandler.E.f165884a.put(str2, aVar); String r65 = msgHandler.r6(); if (!Util.isNullOrNil(r65)) { msgHandler.E.f165884a.put(r65, aVar); } msgHandler.q5(h1Var, "updateAppMessageShareData:ok", null); } return true; } public static String S6(String str) { StringBuffer stringBuffer = new StringBuffer(); int length = str.length(); int i15 = 0; while (i15 < length) { int i16 = 0; while (i16 < 7) { String str2 = W0[i16]; int i17 = 0; while (i17 < str2.length() && (r8 = i15 + i17) < length && str2.charAt(i17) == str.charAt(r8)) { i17++; } if (i17 == str2.length()) { break; } i16++; } char[] cArr = V0; if (i16 != 7) { stringBuffer.append(cArr[i16]); i15 += W0[i16].length(); } else { stringBuffer.append(str.charAt(i15)); i15++; } } return stringBuffer.toString(); } public static boolean T(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "reportSearchStatistics: %s", map.toString()); int e15 = p.e(map, "logId", 0); String f15 = p.f(map, "logString"); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "reportSearchStatistics reporting %d, logString %s", Integer.valueOf(e15), f15); ww2.d.INSTANCE.kvStat(e15, f15); return false; } public static boolean T0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doChooseVideo()"); msgHandler.G5(h1Var, 0); return true; } public static boolean T1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("base64DataString")); String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get("thumbUrl")); String nullAsNil3 = Util.nullAsNil((String) h1Var.f247819a.get("url")); String nullAsNil4 = Util.nullAsNil((String) h1Var.f247819a.get("activityId")); if (!Util.isNullOrNil(nullAsNil)) { ap3.a.a(new t(msgHandler, nullAsNil, h1Var, nullAsNil2, nullAsNil4)); return true; } else if (!Util.isNullOrNil(nullAsNil3)) { Log.i("MicroMsg.MsgHandler", "doAddToEmoticon use url:%s", nullAsNil3); q1 q1Var = new q1(msgHandler.f167360d.getCacheDir(), gh.g.f(nullAsNil3.getBytes())); if (q1Var.m()) { d60.z.e().postToWorker(new u(msgHandler, q1Var, nullAsNil2, nullAsNil4)); return true; } c.b bVar = new c.b(); bVar.f294616b = true; bVar.f294620f = q1Var.o(); bVar.f294639y = new Object[]{q1Var.o()}; ((com.tencent.mm.feature.emoji.api.m0) j.c(com.tencent.mm.feature.emoji.api.m0.class)).zv().j(nullAsNil3, null, bVar.a(), new v(msgHandler, nullAsNil3, nullAsNil2, nullAsNil4, h1Var)); return true; } else { Log.e("MicroMsg.MsgHandler", "doAddToEmoticon base64DataString is null and url is null"); msgHandler.q5(h1Var, "addToEmoticon:fail_base64DataString_and_url_is_null", null); return false; } } public static boolean T2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); HashMap hashMap = new HashMap(); hashMap.put("osVersion", Integer.valueOf(Build.VERSION.SDK_INT)); hashMap.put("cpuCores", Integer.valueOf(j6.a.d())); hashMap.put("cpuFreqHz", Integer.valueOf(j6.a.b())); hashMap.put("memory", Long.valueOf(j6.a.e(MMApplicationContext.getContext()))); hashMap.put("brand", android.os.Build.BRAND); hashMap.put("model", r.k()); msgHandler.q5(h1Var, "getSystemInfo:ok", hashMap); return true; } public static void T3(MsgHandler msgHandler, String str, String str2, String str3) { int i15; msgHandler.getClass(); String s702 = ((com.tencent.mm.feature.emoji.api.s0) j.c(com.tencent.mm.feature.emoji.api.s0.class)).s70(((e1) j.c(e1.class)).RN0(), "", str); IEmojiInfo F2 = ((q0) j.c(q0.class)).F2(str); if (F2 == null && u1.k(s702)) { if (ImgUtil.isGif(s702)) { i15 = 2; } else { i15 = 1; } IEmojiInfo PK = ((q0) j.c(q0.class)).PK(); PK.setMd5(str); PK.g2(65); PK.setType(i15); PK.q1((int) u1.l(s702)); PK.v0(1); PK.H(str2); if (!Util.isNullOrNil(str3)) { PK.c1(str3); } ((q0) j.c(q0.class)).PJ0(PK); F2 = PK; } if (F2 != null) { boolean RP = ((t0) j.c(t0.class)).RP(msgHandler.f167360d, F2, 18, u0.r()); Log.i("MicroMsg.MsgHandler", "doAddAction %b", Boolean.valueOf(RP)); if (RP) { msgHandler.q5(msgHandler.f167361e, "addToEmoticon:ok", null); } else { msgHandler.q5(msgHandler.f167361e, "addToEmoticon:fail", null); } } else { msgHandler.q5(msgHandler.f167361e, "addToEmoticon:fail", null); } } public static boolean T4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doOpenWCPaySpecificView JSOAUTH"); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); if (!(msgHandler.f167360d instanceof MMActivity)) { return true; } WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); intent.putExtra("appId", walletJsapiData.f173486d); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); intent.putExtra("url", walletJsapiData.f173497r); intent.putExtra("pay_channel", walletJsapiData.f173501v); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "wallet_index", ".ui.WalletSendC2CMsgUI", intent, 210, false); return true; } public static boolean U(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; ((FTSWebViewLogic) com.tencent.mm.plugin.webview.modeltools.m.ka()).j(h1Var.f247819a); return false; } public static boolean U0(MsgHandler msgHandler, h1 h1Var) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get(l3.COL_LOCALID); Object obj = h1Var.f247819a.get("isShowProgressTips"); if (obj != null) { try { z15 = Util.getInt(obj.toString(), 0) == 1; } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "Exception has occurred : %s", e15.getMessage()); } Log.i("MicroMsg.MsgHandler", "upload local video, appId = %s, localId = %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "appId or localId is null or nil."); msgHandler.q5(h1Var, "uploadVideo:fail_missing arguments", null); } else { msgHandler.h7(h1Var, str, str2, 5, 0, 0, "uploadVideo", z15); } return true; } z15 = true; Log.i("MicroMsg.MsgHandler", "upload local video, appId = %s, localId = %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str)) { } Log.e("MicroMsg.MsgHandler", "appId or localId is null or nil."); msgHandler.q5(h1Var, "uploadVideo:fail_missing arguments", null); return true; } public static boolean U1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("base64DataString")); String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get("url")); String nullAsNil3 = Util.nullAsNil((String) h1Var.f247819a.get("activityId")); if (!Util.isNullOrNil(nullAsNil)) { ap3.a.a(new w(msgHandler, nullAsNil, h1Var, nullAsNil3)); return true; } else if (!Util.isNullOrNil(nullAsNil2)) { Log.i("MicroMsg.MsgHandler", "doShareEmoticon use url:%s", nullAsNil2); q1 q1Var = new q1(msgHandler.f167360d.getCacheDir(), gh.g.f(nullAsNil2.getBytes())); if (q1Var.m()) { d60.z.e().postToWorker(new x(msgHandler, q1Var, nullAsNil3)); return true; } c.b bVar = new c.b(); bVar.f294616b = true; bVar.f294620f = q1Var.o(); bVar.f294639y = new Object[]{q1Var.o()}; ((com.tencent.mm.feature.emoji.api.m0) j.c(com.tencent.mm.feature.emoji.api.m0.class)).zv().j(nullAsNil2, null, bVar.a(), new y(msgHandler, nullAsNil2, nullAsNil3, h1Var)); return true; } else { Log.e("MicroMsg.MsgHandler", "doShareEmoticon base64DataString is null and url is null"); msgHandler.q5(h1Var, "shareEmoticon:fail_base64DataString_and_url_is_null", null); return false; } } public static boolean U2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); try { String str = (String) h1Var.f247819a.get("tid"); Log.i("MicroMsg.MsgHandler", "doServiceClick, tid = %s", str); Bundle bundle = new Bundle(); bundle.putString("service_click_tid", str); msgHandler.f167378x.callback(70, bundle); } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } msgHandler.f167375u = false; return false; } public static boolean U3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doJumpToMall"); String str = (String) h1Var.f247819a.get("appId"); o1.a(h1Var.f247862h, false, null, str); Intent intent = new Intent(); intent.putExtra("key_app_id", str); intent.putExtra("key_func_id", (String) h1Var.f247819a.get("funcId")); intent.putExtra("key_url", (String) h1Var.f247819a.get("url")); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); Log.i("MicroMsg.MsgHandler", " walletMallV2 switch is :%s", Boolean.TRUE); sv3.b.o(msgHandler.f167360d, "mall", ".ui.MallIndexUIv2", intent, 5, false); } return true; } public static boolean U4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doBatchViewCard JSOAUTH"); Intent intent = new Intent(); intent.putExtra("key_app_id", (String) h1Var.f247819a.get("appId")); intent.putExtra("card_list", (String) h1Var.f247819a.get("card_list")); intent.putExtra("key_template_id", (String) h1Var.f247819a.get("tempalate_id")); intent.putExtra("key_from_scene", 7); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "card", ".ui.CardViewEntranceUI", intent, 23, false); return true; } Log.e("MicroMsg.MsgHandler", "doBatchViewCard invalid context"); msgHandler.q5(h1Var, "batch_view_card:fail", null); return true; } public static boolean V(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); boolean d15 = p.d(map, "hasResult", false); String f15 = p.f(map, "query"); int e15 = p.e(map, "type", 0); int e16 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); jo3.k kVar = fTSWebViewLogic.f164238n; if (kVar.f242416f != e16 || (str = kVar.f242412b) == null || !str.equals(f15) || kVar.f242415e != e15) { Log.w("MicroMsg.WebSearch.FTSLogObj", "setHasResultNotSame: %s VS %s | %d VS %d | %d VS %d", kVar.f242412b, f15, Integer.valueOf(kVar.f242415e), Integer.valueOf(e15), Integer.valueOf(kVar.f242416f), Integer.valueOf(e16)); } else { kVar.f242413c = d15; } return false; } public static boolean V0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doJumpToInstallUrl"); String str = (String) h1Var.f247819a.get("url"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "jumpurl is null or nil"); msgHandler.f167375u = false; } else { Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str)); intent.addFlags(268435456); if (Util.isIntentAvailable(msgHandler.f167360d, intent, true)) { try { Context context = msgHandler.f167360d; k30.a aVar = new k30.a(); aVar.c(intent); j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doJumpToInstallUrl", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context.startActivity((Intent) aVar.a(0)); j30.a.e(context, "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doJumpToInstallUrl", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } } msgHandler.f167375u = false; } return false; } public static boolean V1(MsgHandler msgHandler, h1 h1Var) { ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); Bundle bundle = new Bundle(); bundle.putBoolean("k_need_signature", true); bundle.putInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 3); bundle.putBoolean("needVideo", false); bundle.putBoolean("is_check_dyncfg", false); bundle.putString("k_ticket", (String) h1Var.f247819a.get("request_ticket")); bundle.putInt("check_alive_type", 0); RequestStartFaceDetectEvent requestStartFaceDetectEvent = new RequestStartFaceDetectEvent(); RequestStartFaceDetectEvent.a aVar = requestStartFaceDetectEvent.f64286d; aVar.f64288a = msgHandler.f167360d; aVar.f64290c = 50; aVar.f64289b = bundle; requestStartFaceDetectEvent.publish(); Log.i("MicroMsg.MsgHandler", "hy: start face register rsa event result: %b", Boolean.valueOf(requestStartFaceDetectEvent.f64287e.f64291a)); if (!requestStartFaceDetectEvent.f64287e.f64291a) { ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(null); msgHandler.q5(h1Var, "requestWxFaceRegisterInternal:fail", kp3.a.a(requestStartFaceDetectEvent.f64287e.f64292b)); } return true; } public static boolean V2(MsgHandler msgHandler, h1 h1Var) { String o65 = msgHandler.o6(msgHandler.s6()); if (Util.isNullOrNil(o65)) { Log.e("MicroMsg.MsgHandler", "[doOpenRealnameAuth]appid is null, return"); msgHandler.q5(h1Var, "openRealnameAuth:fail appid is null", null); return false; } String str = (String) h1Var.f247819a.get("categoryId"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "[doOpenRealnameAuth]categoryId is null, return"); msgHandler.q5(h1Var, "openRealnameAuth:fail categoryId is null", null); return false; } Intent putExtra = new Intent().putExtra("intent_appid", o65).putExtra("intent_category_id", str); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "appbrand", ".ui.autofill.AppBrandIDCardUI", putExtra, 62); return true; } Log.e("MicroMsg.MsgHandler", "[doOpenRealnameAuth]context is err, return"); msgHandler.q5(h1Var, "openRealnameAuth:fail context is err", null); return false; } public static void V3(MsgHandler msgHandler, boolean z15, Bundle bundle, int i15) { msgHandler.getClass(); if (z15) { try { byte[] byteArray = bundle.getByteArray("key_webview_secret_msg_info"); if (byteArray != null) { qs5 qs5 = new qs5(); qs5.parseFrom(byteArray); qs5.f34597i = 3; qs5.f34598j = i15; q.INSTANCE.g(23341, Integer.valueOf(qs5.f34592d), qs5.f34593e, Integer.valueOf(qs5.f34597i), qs5.f34594f, Integer.valueOf(qs5.f34595g), qs5.f34596h, Integer.valueOf(qs5.f34598j)); } } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "reportSecretMsgLaunchAppResult exception", new Object[0]); } } } public static boolean V4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); try { String str = (String) h1Var.f247819a.get("userName"); String str2 = (String) h1Var.f247819a.get("nickName"); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "setPageOwner:missing_arguments", null); } else { msgHandler.f167378x.ad(str, str2); msgHandler.q5(h1Var, "setPageOwner:ok", null); } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "setPageOwner, Exception: %s", e15.getMessage()); } return false; } public static boolean W(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.m q102 = com.tencent.mm.plugin.webview.modeltools.m.q10(); Map<String, Object> map = h1Var.f247819a; com.tencent.mm.plugin.websearch.f fVar = (com.tencent.mm.plugin.websearch.f) q102; fVar.getClass(); Log.i("MicroMsg.WebSearch.FTSWebSearchLogic", "getSuggestionData %s", map); e0 e0Var = new e0(); String f15 = p.f(map, "query"); e0Var.f242330b = f15; try { e0Var.f242330b = URLDecoder.decode(f15, "UTF-8"); } catch (UnsupportedEncodingException unused) { } e0Var.f242332d = p.e(map, "type", 0); e0Var.f242334f = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); e0Var.f242329a = p.d(map, "isHomePage", false) ? 1 : 0; e0Var.f242345q = Util.nullAsInt(map.get("webview_instance_id"), -1); e0Var.f242340l.add(p.f(map, "prefixQuery")); int e15 = p.e(map, "requestType", 0); p.e(map, "subtype", 0); e0Var.f242347s = p.e(map, "isWeAppMore", 0); e0Var.f242350v = p.f(map, "sessionId"); String f16 = p.f(map, "extReqParams"); if (!Util.isNullOrNil(f16)) { try { JSONArray jSONArray = new JSONArray(f16); for (int i15 = 0; i15 < jSONArray.length(); i15++) { JSONObject jSONObject = jSONArray.getJSONObject(i15); e00 e002 = new e00(); e002.f19923d = jSONObject.optString("key", ""); e002.f19924e = (long) jSONObject.optInt("uintValue", 0); e002.f19925f = jSONObject.optString("textValue", ""); e0Var.f242343o.add(e002); } } catch (Exception unused2) { } } int[] iArr = null; if (e0Var.f242347s == 1) { px5 px5 = new px5(); e0Var.f242348t = px5; px5.f33558d = p.a(3); px5 px52 = e0Var.f242348t; px52.f33561g = uf0.d.f317828a; px52.f33559e = p.e(map, "subType", 0); e0Var.f242348t.f33560f = null; Object f17 = d60.z.s().i().f(w1.a.f175351i7, null); if (f17 != null && (f17 instanceof String)) { e0Var.f242348t.f33562h = (String) f17; } } Log.i("MicroMsg.WebSearch.FTSWebSearchLogic", "getSearchData, webviewID = %d", Integer.valueOf(e0Var.f242345q)); if (e15 == 0) { f.g gVar = fVar.f164292r; if (gVar.f164312a != null) { d60.z.d().p(gVar.f164312a.getType(), com.tencent.mm.plugin.websearch.f.this); d60.z.d().d(gVar.f164312a); gVar.f164312a = null; } if (gVar.f164312a == null) { gVar.f164312a = new jo3.o0(e0Var); d60.z.d().a(gVar.f164312a.getType(), com.tencent.mm.plugin.websearch.f.this); d60.z.d().f(gVar.f164312a); } } else if (e15 == 1) { String str = e0Var.f242330b; int i16 = e0Var.f242332d; int i17 = e0Var.f242345q; if (!Util.isNullOrNil(str)) { if (fVar.f164293s != null) { ((b62.q) j.c(b62.q.class)).Bg(fVar.f164293s); fVar.f164293s = null; } if (i16 == 8) { iArr = new int[]{131072}; } if (iArr != null) { c62.k kVar = new c62.k(); kVar.f47190b = 16; kVar.f47191c = str; kVar.f47195g = iArr; kVar.f47197i = 5; kVar.f47200l = e62.b.f205778d; kVar.f47198j = new HashSet<>(); kVar.f47201m = fVar.f164294t; c62.b cc5 = ((b62.q) j.c(b62.q.class)).cc(2, kVar); fVar.f164293s = cc5; cc5.f47122i = Integer.valueOf(i17); } } } else if (e15 == 2) { int i18 = e0Var.f242345q; o0 o0Var = (o0) j.c(o0.class); yl4 a15 = x0.a(); int size = a15.f43549d.size(); JSONObject jSONObject2 = new JSONObject(); try { JSONArray jSONArray2 = new JSONArray(); JSONObject jSONObject3 = new JSONObject(); JSONArray jSONArray3 = new JSONArray(); int i19 = 0; while (i19 < a15.f43549d.size() && i19 < size) { JSONObject jSONObject4 = new JSONObject(); jSONObject4.put("word", a15.f43549d.get(i19).f42284d); jSONArray3.put(jSONObject4); i19++; } jSONObject3.put("items", jSONArray3); jSONObject3.put("count", jSONArray3.length()); jSONObject3.put("type", 4); jSONArray2.put(jSONObject3); jSONObject2.put("data", jSONArray2); jSONObject2.put("ret", 0); } catch (JSONException unused3) { } o0Var.u20(i18, jSONObject2.toString()); } return false; } public static boolean W0(MsgHandler msgHandler, h1 h1Var, boolean z15) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("designerId"); int i15 = Util.getInt((String) h1Var.f247819a.get("designerUin"), 0); String str2 = (String) h1Var.f247819a.get("tagId"); String str3 = (String) h1Var.f247819a.get("tagDesc"); String str4 = (String) h1Var.f247819a.get("keyword"); int i16 = Util.getInt((String) h1Var.f247819a.get("tid"), 0); String nullAs = Util.nullAs((String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE), ""); String nullAs2 = Util.nullAs((String) h1Var.f247819a.get("desc"), ""); String nullAs3 = Util.nullAs((String) h1Var.f247819a.get("iconUrl"), ""); String nullAs4 = Util.nullAs((String) h1Var.f247819a.get("secondUrl"), ""); int i17 = Util.getInt((String) h1Var.f247819a.get("pageType"), 0); long j15 = Util.getLong((String) h1Var.f247819a.get("searchID"), 0); Intent intent = new Intent(); intent.putExtra("uin", i15); intent.putExtra("headurl", nullAs4); intent.putExtra("set_iconURL", nullAs3); intent.putExtra("set_desc", nullAs2); intent.putExtra("pageType", i17); intent.putExtra("set_title", nullAs); intent.putExtra("set_id", i16); Log.i("MicroMsg.MsgHandler", "openDesignerEmojiView event: designerID:%s tagID:%s tagDesc:%s keyword:%s", str, str2, str3, str4); if (!Util.isNullOrNil(str4)) { intent.putExtra("keyword", str4); intent.putExtra("searchID", j15); sv3.b.j(msgHandler.f167360d, "emoji", ".ui.v2.EmojiStoreV2SingleProductUI", intent, null); msgHandler.q5(h1Var, "openDesignerEmojiView:ok" + str4, null); if (z15) { q.INSTANCE.g(13055, 2, "", "", "", Integer.valueOf(((com.tencent.mm.feature.emoji.api.c1) j.c(com.tencent.mm.feature.emoji.api.c1.class)).s0()), Long.valueOf(j15)); } } else if (!Util.isNullOrNil(str)) { intent.putExtra("id", str); intent.putExtra("searchID", j15); sv3.b.j(msgHandler.f167360d, "emoji", ".ui.v2.EmojiStoreV2SingleProductUI", intent, null); msgHandler.q5(h1Var, "openDesignerEmojiView:ok" + str, null); } else if (!Util.isNullOrNil(str2)) { intent.putExtra("tag_id", str2); intent.putExtra("tag_desc", str3); sv3.b.j(msgHandler.f167360d, "emoji", ".ui.v2.EmojiStoreV2SingleProductUI", intent, null); msgHandler.q5(h1Var, "openDesignerEmojiView:ok" + str2, null); } else { sv3.b.j(msgHandler.f167360d, "emoji", ".ui.v2.EmojiStoreV2SingleProductUI", intent, null); msgHandler.q5(h1Var, "openDesignerEmojiView:ok", null); } return true; } public static boolean W1(MsgHandler msgHandler, h1 h1Var) { ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); Bundle bundle = new Bundle(); bundle.putBoolean("k_need_signature", true); bundle.putString("k_user_name", o3.f270764c.a("login_user_name", "")); bundle.putInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 4); bundle.putBoolean("needVideo", false); bundle.putBoolean("is_check_dyncfg", false); bundle.putString("k_ticket", (String) h1Var.f247819a.get("request_ticket")); bundle.putInt("check_alive_type", 0); RequestStartFaceDetectEvent requestStartFaceDetectEvent = new RequestStartFaceDetectEvent(); RequestStartFaceDetectEvent.a aVar = requestStartFaceDetectEvent.f64286d; aVar.f64288a = msgHandler.f167360d; aVar.f64290c = 51; aVar.f64289b = bundle; requestStartFaceDetectEvent.publish(); Log.i("MicroMsg.MsgHandler", "hy: start face verify rsa event result: %b", Boolean.valueOf(requestStartFaceDetectEvent.f64287e.f64291a)); if (!requestStartFaceDetectEvent.f64287e.f64291a) { ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(null); msgHandler.q5(h1Var, "requestWxFaceVerifyInternal:fail", kp3.a.a(requestStartFaceDetectEvent.f64287e.f64292b)); } return true; } public static boolean W2(MsgHandler msgHandler, h1 h1Var) { WXMediaMessage w55 = msgHandler.w5(h1Var, false); msgHandler.f167362f = w55; if (w55 == null) { Log.e("MicroMsg.MsgHandler", "doSendSingleAppMessage fail, appmsg is null"); msgHandler.q5(h1Var, "sendSingleAppMessage:fail", null); } else { HashMap hashMap = new HashMap(); String str = (String) h1Var.f247819a.get("img_url"); hashMap.put("img_url", str); hashMap.put("desc", (String) h1Var.f247819a.get("desc")); hashMap.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)); hashMap.put("url", (String) h1Var.f247819a.get("link")); Intent intent = new Intent(); intent.putExtra("Select_Conv_Type", 39); intent.putExtra("select_is_ret", true); intent.putExtra("Select_block_List", u0.r()); intent.putExtra("Select_block_List", "filehelper," + u0.r()); intent.putExtra("scene_from", 10); intent.putExtra("webview_params", hashMap); intent.putExtra("Retr_Msg_Type", 2); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { sv3.b.v((MMActivity) context, ".ui.transmit.SelectConversationUI", intent, 61, msgHandler); e4.a(str); } else { Log.e("MicroMsg.MsgHandler", "doSendSingleAppMessage context is not activity"); return false; } } return true; } public static boolean W3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("packageName"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "doWriteCommData fail, packageName is null"); msgHandler.q5(h1Var, "write_comm_data:fail", null); } else { String str2 = (String) h1Var.f247819a.get("data"); Context context = msgHandler.f167360d; int i15 = 0; boolean commit = context.getSharedPreferences(MMApplicationContext.getPackageName() + "_comm_preferences", 0).edit().putString(str, str2).commit(); Object[] objArr = new Object[3]; objArr[0] = Boolean.valueOf(commit); objArr[1] = str; if (str2 != null) { i15 = str2.length(); } objArr[2] = Integer.valueOf(i15); Log.i("MicroMsg.MsgHandler", "doWriteCommData, ret = %b, packageName = %s, data length = %d", objArr); if (commit) { msgHandler.q5(h1Var, "write_comm_data:ok", null); } else { msgHandler.q5(h1Var, "write_comm_data:fail", null); } } return true; } public static boolean W4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); try { String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get("signature"); o1.a(h1Var.f247862h, false, null, str); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "get_wechat_verify_ticket:fail ticket", null); } else { d60.z.d().a(1097, new l3(msgHandler, h1Var)); d60.z.d().f(new com.tencent.mm.plugin.webview.model.x(str, str2)); } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "getWechatVerifyTicket, Exception: %s", e15.getMessage()); } return false; } public static boolean X(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "openEmotionPage %s", map); int e15 = p.e(map, "type", 0); int e16 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); String f15 = p.f(map, "searchId"); String f16 = p.f(map, "activityId"); int e17 = p.e(map, "isGenSticker", 0); int e18 = p.e(map, "fromSearchType", 0); Intent intent = new Intent(); intent.setFlags(268435456); intent.putExtra("extra_scence", e16); intent.putExtra("extra_type", e15); intent.putExtra("searchID", f15); intent.putExtra("docID", p.f(map, "docID")); intent.putExtra("activityId", f16); intent.putExtra("search_type", e18); intent.putExtra("extra_gen_sticker", e17); if (e15 != 1) { if (e15 == 2) { intent.putExtra("extra_emoji_name", p.f(map, "express")); intent.putExtra("extra_md5", p.f(map, "md5")); intent.putExtra("extra_aeskey", p.f(map, "aesKey")); intent.putExtra("extra_encrypt_url", p.f(map, "encryptUrl")); intent.putExtra("extra_thumb_url", p.f(map, "thumb")); intent.putExtra("id", p.f(map, "designerId")); intent.putExtra("extra_product_id", p.f(map, "productID")); intent.putExtra("productUrl", p.f(map, "productUrl")); intent.putExtra("extra_product_name", p.f(map, "productName")); intent.putExtra("weapp_user_name", p.f(map, "weappUserName")); intent.putExtra("biz_user_name", p.f(map, "bizUin")); intent.putExtra("weapp_version", p.e(map, "weappVersion", 0)); intent.putExtra("source_type", p.e(map, "sourceType", 0)); } else if (e15 == 3) { intent.putExtra("extra_emoji_name", p.f(map, "express")); intent.putExtra("extra_md5", p.f(map, "md5")); intent.putExtra("extra_aeskey", p.f(map, "aesKey")); intent.putExtra("extra_encrypt_url", p.f(map, "encryptUrl")); intent.putExtra("extra_thumb_url", p.f(map, "thumb")); intent.putExtra("id", p.f(map, "designerId")); intent.putExtra("name", p.f(map, "designerName")); intent.putExtra("headurl", p.f(map, "designerThumb")); intent.putExtra("weapp_user_name", p.f(map, "weappUserName")); intent.putExtra("weapp_version", p.e(map, "weappVersion", 0)); intent.putExtra("source_type", p.e(map, "sourceType", 0)); intent.putExtra("biz_user_name", p.f(map, "bizUin")); } else if (e15 != 4) { str = ""; } else { intent.putExtra("extra_emoji_name", p.f(map, "express")); intent.putExtra("extra_encrypt_url", p.f(map, "encryptUrl")); intent.putExtra("extra_thumb_url", p.f(map, "thumb")); intent.putExtra("extra_article_name", p.f(map, "sourceTitle")); intent.putExtra("extra_article_url", p.f(map, "articleSource")); intent.putExtra("disableAddSticker", p.e(map, "disableAddSticker", 0) > 0); intent.putExtra("needSavePhotosAlbum", p.e(map, "needSavePhotosAlbum", 0) > 0); intent.putExtra("weapp_user_name", p.f(map, "weappUserName")); intent.putExtra("weapp_version", p.e(map, "weappVersion", 0)); intent.putExtra("source_type", p.e(map, "sourceType", 0)); intent.putExtra("biz_user_name", p.f(map, "bizUin")); } str = ".ui.fts.FTSEmojiDetailPageUI"; } else { intent.putExtra("extra_id", p.f(map, "productID")); intent.putExtra("preceding_scence", 18); intent.putExtra("download_entrance_scene", 27); intent.putExtra("searchID", f15); str = ".ui.EmojiStoreDetailUI"; } if (Util.isNullOrNil(str)) { return false; } sv3.b.j(MMApplicationContext.getContext(), "emoji", str, intent, null); return false; } public static boolean X0(MsgHandler msgHandler, h1 h1Var, boolean z15) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "openDesignerProfile"); String str = (String) h1Var.f247819a.get("designerId"); String str2 = (String) h1Var.f247819a.get("searchID"); int i15 = Util.getInt(h1Var.f247819a.get("operationScene"), 12); int unsignedInt = Util.getUnsignedInt(h1Var.f247819a.get("designerUin"), 0); String str3 = (String) h1Var.f247819a.get("oldRedirectUrl"); String str4 = (String) h1Var.f247819a.get("designerName"); String str5 = (String) h1Var.f247819a.get("designerHeadUrl"); if (!Util.isNullOrNil(str) || unsignedInt != 0) { Intent intent = new Intent(); if (unsignedInt == 0) { intent.putExtra("id", str); } else { intent.putExtra("uin", unsignedInt); } intent.putExtra("extra_scence", i15); intent.putExtra("searchID", str2); intent.putExtra("rediret_url", str3); intent.putExtra("name", str4); intent.putExtra("headurl", str5); sv3.b.j(msgHandler.f167360d, "emoji", ".ui.v2.EmojiStoreV2DesignerUI", intent, null); msgHandler.q5(h1Var, "openDesignerProfile", null); if (z15) { q.INSTANCE.g(13055, 3, "", str, "", Integer.valueOf(((com.tencent.mm.feature.emoji.api.c1) j.c(com.tencent.mm.feature.emoji.api.c1.class)).s0()), str2); } return true; } Log.w("MicroMsg.MsgHandler", "openDesignerProfile failed designer id and designerUin is null."); msgHandler.q5(h1Var, "openDesignerProfile", null); return false; } public static boolean X1(MsgHandler msgHandler, h1 h1Var, int i15) { String str; String str2; String str3; String str4; String str5; String str6; String str7; int i16; String str8; boolean z15; msgHandler.getClass(); if (h1Var.f247819a.containsKey("canvasId")) { str = h1Var.f247819a.get("canvasId").toString(); } else { str = ""; } int safeParseInt = h1Var.f247819a.containsKey("preLoad") ? Util.safeParseInt(h1Var.f247819a.get("preLoad").toString()) : 0; int safeParseInt2 = h1Var.f247819a.containsKey("noStore") ? Util.safeParseInt(h1Var.f247819a.get("noStore").toString()) : 0; int safeParseInt3 = h1Var.f247819a.containsKey("openFirstSightVoice") ? Util.safeParseInt(h1Var.f247819a.get("openFirstSightVoice").toString()) : 0; int safeParseInt4 = h1Var.f247819a.containsKey("fromOuterIndex") ? Util.safeParseInt(h1Var.f247819a.get("fromOuterIndex").toString()) : 0; boolean z16 = (!h1Var.f247819a.containsKey("gesturePoints") || !h1Var.f247819a.containsKey("samplePoints") || !h1Var.f247819a.containsKey("targetDistance")) ? false : !((bz.l0) j.c(bz.l0.class)).DU(Util.nullAsNil(h1Var.f247819a.get("gesturePoints").toString()), Util.nullAsNil(h1Var.f247819a.get("samplePoints").toString()), Util.safeParseFloat(h1Var.f247819a.get("targetDistance").toString())); if (h1Var.f247819a.containsKey("extraData")) { str2 = h1Var.f247819a.get("extraData").toString(); } else { str2 = ""; } if (h1Var.f247819a.containsKey("adInfoXml")) { str3 = h1Var.f247819a.get("adInfoXml").toString(); } else { str3 = ""; } if (h1Var.f247819a.containsKey("sessionId")) { str4 = h1Var.f247819a.get("sessionId").toString(); } else { str4 = ""; } if (h1Var.f247819a.containsKey("adBuffer")) { str5 = h1Var.f247819a.get("adBuffer").toString(); } else { str5 = ""; } if (h1Var.f247819a.containsKey("canvasExt")) { str6 = h1Var.f247819a.get("canvasExt").toString(); } else { str6 = ""; } if (h1Var.f247819a.containsKey("twistCardId")) { str7 = h1Var.f247819a.get("twistCardId").toString(); } else { str7 = ""; } if (h1Var.f247819a.containsKey("source")) { i16 = Util.safeParseInt(h1Var.f247819a.get("source").toString()); } else { Log.e("MicroMsg.MsgHandler", "doOpenCanvas, no source param, use default"); i16 = 13; } if (h1Var.f247819a.containsKey("canvasDynamicInfo")) { str8 = h1Var.f247819a.get("canvasDynamicInfo").toString(); } else { str8 = ""; } Log.i("MicroMsg.MsgHandler", "doOpenCanvas, canvasId=" + str + ", getCanvasSource=" + i15 + ", preLoad=" + safeParseInt + ", noStore=" + safeParseInt2 + ", extra=" + str2 + ", sessionId=" + str4 + ", adBuffer=" + str5 + ", canvasExt=" + str6 + ", source=" + i16 + ", canvasDynamicInfo=" + str8 + ", adInfoXml=" + str3); HashMap hashMap = new HashMap(); if (Util.isNullOrNil(str) || "0".equals(str)) { hashMap.put("ret", -1); hashMap.put("ret_msg", "invalid page id = " + str); msgHandler.q5(h1Var, "doOpenCanvas:fail", hashMap); return false; } else if (z16) { hashMap.put("ret", -2); hashMap.put("ret_msg", "gesture open canvas failed, id = " + str); msgHandler.q5(h1Var, "doOpenCanvas:fail", hashMap); return false; } else { OpenCanvasEvent openCanvasEvent = new OpenCanvasEvent(); OpenCanvasEvent.a aVar = openCanvasEvent.f63808d; aVar.f63810a = str; aVar.f63811b = str6; aVar.f63812c = safeParseInt; aVar.f63813d = safeParseInt2; aVar.f63815f = i15; aVar.f63814e = i16; aVar.f63816g = str3; aVar.f63817h = str8; openCanvasEvent.publish(); if (safeParseInt != 1) { String str9 = openCanvasEvent.f63809e.f63819a; Intent intent = new Intent(); if (str9 == null) { str9 = ""; } intent.putExtra("sns_landing_pages_xml", str9); if (i15 == 1) { intent.putExtra("sns_landing_pages_canvasid", str); intent.putExtra("sns_landig_pages_from_source", 15); intent.putExtra("sns_landing_pages_search_extra", str2); intent.putExtra("sns_landing_pages_sessionId", str4); intent.putExtra("sns_landing_pages_ad_buffer", str5); intent.putExtra("sns_landing_pages_canvas_ext", str6); } else { intent.putExtra("sns_landing_pages_pageid", Util.safeParseLong(str)); intent.putExtra("sns_landig_pages_from_source", i16); intent.putExtra("sns_landing_pages_extra", str2); } intent.putExtra("sns_landing_pages_need_enter_and_exit_animation", false); z15 = true; intent.putExtra("sns_landing_pages_is_from_jspi", true); intent.putExtra("sns_landing_pages_no_store", safeParseInt2); intent.putExtra("sns_landing_pages_ad_info", str3); intent.putExtra("sns_landing_is_native_sight_ad", safeParseInt3 == 1); intent.putExtra("sns_landing_page_canvas_dynamicinfo", str8); if (!TextUtils.isEmpty(str7)) { intent.putExtra("sns_landing_page_is_gesture_twist_card_id", str7); } intent.putExtra("sns_landing_pages_from_outer_index", safeParseInt4); sv3.b.j(msgHandler.f167360d, "sns", ".ui.SnsAdNativeLandingPagesPreviewUI", intent, null); q.INSTANCE.t(1676, 13); } else { z15 = true; q.INSTANCE.t(1676, 14); } hashMap.put("ret", 0); msgHandler.q5(h1Var, "doOpenCanvas:succ", hashMap); return z15; } } public static boolean X2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; HashMap hashMap = new HashMap(); int e15 = p.e(h1Var.f247819a, "actionType", 0); if (e15 == 1) { String f15 = p.f(h1Var.f247819a, "jumpUrl"); String f16 = p.f(h1Var.f247819a, "publishId"); Intent intent = new Intent(); intent.putExtra("rawUrl", f15); intent.putExtra("KPublisherId", f16); sv3.b.j(msgHandler.f167360d, "webview", ".ui.tools.WebViewUI", intent, null); Log.i("MicroMsg.MsgHandler", "doOpenWebSearchOutLinkItemClick actionType %d publishId %s url %s", Integer.valueOf(e15), f16, f15); hashMap.put("ret", 0); } else { hashMap.put("ret", -1); } msgHandler.q5(h1Var, "0", hashMap); return true; } public static void X3(MsgHandler msgHandler, m mVar, h1 h1Var, String str, Map map, boolean z15, boolean z16) { String str2; msgHandler.f167375u = false; Log.i("MicroMsg.MsgHandler", "callback ret:%s, make isBusy=false", str); if (h1Var == null) { str2 = null; } else { try { str2 = h1Var.f247857c; } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "onHandleEnd, ex = " + e15.getMessage()); return; } } mVar.fl0(str2, str, h1.b(map), z15); } public static boolean X4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; c.b w25; int z65 = msgHandler.z6(); int A6 = msgHandler.A6(); String q65 = msgHandler.q6(); Log.i("MicroMsg.MsgHandler", "Key Scene(%d)", Integer.valueOf(A6)); if (A6 == 27) { String str2 = (String) h1Var.f247819a.get("brandUserName"); msgHandler.f167369p = str2; Log.i("MicroMsg.MsgHandler", "BrandUserName from shake(%s)", str2); } else if (!(z65 == 8 || z65 == -1)) { String str3 = (String) h1Var.f247819a.get("brandUserName"); msgHandler.f167368o = str3; Log.i("MicroMsg.MsgHandler", "BrandUserName from H5(%s)", str3); if (!Util.isNullOrNil(q65) && !Util.isNullOrNil(msgHandler.f167368o)) { Log.i("MicroMsg.MsgHandler", "Chat name(%s)", q65); ih.c b15 = bg0.l.b(q65); if (!(b15 == null || (w25 = b15.w2(false)) == null || w25.e() == null || !w25.e().a() || q65.equals(msgHandler.f167368o))) { msgHandler.q5(h1Var, "openWXDeviceLib:fail_UsernameError", null); return true; } } } String D6 = msgHandler.D6(h1Var); Log.i("MicroMsg.MsgHandler", "srcUsername(%s)", D6); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "openWXDeviceLib:fail_UsernameError", null); } else { q qVar = q.INSTANCE; StringBuilder sb5 = new StringBuilder(); String str4 = ""; sb5.append(str4); sb5.append(D6); qVar.g(11533, sb5.toString(), "openWXDeviceLib"); if (h1Var.f247819a.containsKey("connType")) { str4 = (String) h1Var.f247819a.get("connType"); } boolean equalsIgnoreCase = str4.equalsIgnoreCase("lan"); String str5 = "on"; if (equalsIgnoreCase) { if (msgHandler.f167372r == null) { msgHandler.f167372r = new HashMap<>(); } try { WebViewExDeviceLanMgr.d().e(msgHandler.f167378x, D6); b2.a(WebViewExDeviceLanMgr.d()); if (!NetStatusUtil.isWifi(msgHandler.f167360d)) { str5 = "off"; } HashMap hashMap = new HashMap(); hashMap.put("minVersion", 1); hashMap.put("maxVersion", 1); hashMap.put("lanState", str5); msgHandler.q5(h1Var, "openWXDeviceLib:ok", hashMap); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "openWXDeviceLib failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "openWXDeviceLib:fail_exception", null); } } else { if (msgHandler.f167371q == null) { msgHandler.f167371q = new HashMap<>(); } try { WebViewExDeviceMgr.d().e(msgHandler.f167378x, D6); b2.a(WebViewExDeviceMgr.d()); BluetoothAdapter defaultAdapter = BluetoothAdapter.getDefaultAdapter(); String str6 = "unknow"; if (defaultAdapter != null) { switch (defaultAdapter.getState()) { case 10: str5 = "off"; break; case 11: str5 = "resetting"; break; case 12: break; default: str5 = str6; break; } str6 = str5; } MMApplicationContext.getContext(); boolean hasSystemFeature = MMApplicationContext.getContext().getPackageManager().hasSystemFeature("android.hardware.bluetooth_le"); Log.i("MicroMsg.webview.ExDeviceBluetoothUtil", "isBLESupported, ret = %b", Boolean.valueOf(hasSystemFeature)); HashMap hashMap2 = new HashMap(); hashMap2.put("minVersion", 1); hashMap2.put("maxVersion", 1); hashMap2.put("bluetoothState", str6); if (hasSystemFeature) { str = "yes"; } else { str = "no"; } hashMap2.put("isSupportBLE", str); if (z65 == 1) { hashMap2.put("OS", Platform.ANDROID); } msgHandler.q5(h1Var, "openWXDeviceLib:ok", hashMap2); } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "openWXDeviceLib failed : %s", e16.getMessage()); msgHandler.q5(h1Var, "openWXDeviceLib:fail_exception", null); } } } return true; } public static boolean Y(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "setSearchInputWord %s", map); String f15 = p.f(map, "word"); boolean d15 = p.d(map, "isInputChange", false); String f16 = p.f(map, "custom"); String f17 = p.f(map, "tagList"); boolean d16 = p.d(map, XWalkPlugin.PRIVATE_CACHE_DIR_NAME, false); ((o0) j.c(o0.class)).ci(Util.nullAsInt(map.get("webview_instance_id"), -1), f15, f16, d15, f17, d16); return false; } public static boolean Y0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "openEmoticonTopicList"); int i15 = Util.getInt((String) h1Var.f247819a.get("tid"), 0); String str = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str2 = (String) h1Var.f247819a.get("desc"); String str3 = (String) h1Var.f247819a.get("iconUrl"); int i16 = Util.getInt((String) h1Var.f247819a.get("pageScene"), 61); String str4 = (String) h1Var.f247819a.get("setKey"); int i17 = Util.getInt(h1Var.f247819a.get("emotionScene"), 12); Intent intent = new Intent(); intent.putExtra("topic_id", i15); intent.putExtra("topic_name", str); intent.putExtra("topic_desc", str2); intent.putExtra("topic_icon_url", str3); intent.putExtra("topic_ad_url", (String) h1Var.f247819a.get("secondUrl")); intent.putExtra("entrance_scene", i17); if (str4 != null) { intent.putExtra("extra_ip_set_key", str4); intent.putExtra("EXTRA_IP_SET_NAME", str); intent.putExtra("EXTRA_IP_SET_DESC", str2); intent.putExtra("EXTRA_IP_SET_URL", str3); intent.putExtra("download_entrance_scene", i16); sv3.b.j(msgHandler.f167360d, "emoji", ".ui.EmojiDesignerIPInfoUI", intent, null); } else { sv3.b.j(msgHandler.f167360d, "emoji", ".ui.EmojiStoreTopicUI", intent, null); } msgHandler.q5(h1Var, "openEmoticonTopicList", null); return true; } public static boolean Y1(MsgHandler msgHandler, h1 h1Var) { String str; String str2; String str3 = ""; msgHandler.f167375u = false; int safeParseInt = Util.safeParseInt(h1Var.f247819a.get("voteResultIndex").toString()); try { JSONArray jSONArray = new JSONArray(); Object obj = h1Var.f247819a.get("leftVoteInfo"); Object obj2 = h1Var.f247819a.get("rightVoteInfo"); if (obj == null) { str = str3; } else { str = obj.toString(); } if (obj2 == null) { str2 = str3; } else { str2 = obj2.toString(); } Log.i("MicroMsg.MsgHandler", "doOpVoteAdData, leftInfo=" + str + ", rightInfo=" + str2); if (!TextUtils.isEmpty(str)) { jSONArray.put(new JSONObject(str)); } if (!TextUtils.isEmpty(str2)) { jSONArray.put(new JSONObject(str2)); } str3 = jSONArray.toString(); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doOpVoteAdData, exp:" + e15.toString()); } try { Log.i("MicroMsg.MsgHandler", "doOpVoteAdData, voteIndex=" + safeParseInt + ", voteResultInfo=" + str3); Bundle bundle = new Bundle(); bundle.putInt("sns_landing_pages_ad_vote_index", safeParseInt); bundle.putString("sns_landing_pages_ad_vote_result", str3); msgHandler.f167378x.callback(150, bundle); } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "doOpVoteAdData, callback exp:" + e16.toString()); } return false; } public static boolean Y2(MsgHandler msgHandler, h1 h1Var) { Map<String, Object> map; Map<String, Object> map2; JSONObject jSONObject; msgHandler.getClass(); String str = (String) ((HashMap) h1Var.f247819a).get("opcode"); String str2 = (String) ((HashMap) h1Var.f247819a).get("business"); Log.i("MicroMsg.MsgHandler", "business %s,opcode %s", str2, str); if (!Util.isNullOrNil(str, str2)) { if (!str2.equals("regLogin")) { if (com.tencent.mm.model.gdpr.a.a(str2) != null) { if ("setIsAgree".equals(str)) { boolean z15 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("isAgree"), 0) == 1; Bundle bundle = new Bundle(1); bundle.putBoolean("OnMPGdprPolicyAgreement_KIsAgree", z15); try { msgHandler.f167378x.callback(200, bundle); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "wcPrivacyPolicyResult, [mp_gdpr], callback ex = %s", e15); } } msgHandler.q5(h1Var, "wcPrivacyPolicyResult:ok", null); } else if (str2.equals("search")) { str.getClass(); if (str.equals("closeSearch")) { ((u) j.c(u.class)).kG(); } else if (str.equals("openSearch")) { ((u) j.c(u.class)).MM0(); } try { map = null; try { msgHandler.f167378x.d(null); } catch (Exception unused) { } } catch (Exception unused2) { map = null; } new WebViewCloseWindowEvent().publish(); msgHandler.q5(h1Var, "wcPrivacyPolicyResult:ok", map); } else if (str2.equals("walletIndexGDPR")) { if (str.equals("setIsAgree")) { try { Bundle bundle2 = new Bundle(); int i15 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("isAgree"), 0); if (i15 == 1) { bundle2.putString("go_next", "agree_privacy"); } WxPayGdprResultEvent wxPayGdprResultEvent = new WxPayGdprResultEvent(); wxPayGdprResultEvent.f65277d.f65278a = "agree_privacy"; wxPayGdprResultEvent.publish(); Log.i("MicroMsg.MsgHandler", "walletIndexGDPR agreement %s", Integer.valueOf(i15)); msgHandler.f167378x.Va0(); msgHandler.f167378x.d(bundle2); new WebViewCloseWindowEvent().publish(); msgHandler.q5(h1Var, "set walletIndexGDPR wc privacy policy result:ok", null); } catch (Exception e16) { Log.w("MicroMsg.MsgHandler", "setwalletIndexGDPR WcPrivacyPolicyResult, ex = " + e16.getMessage()); } } } else if (str2.equals(FirebaseAnalytics.b.LOCATION) && str.equals("setIsAgree")) { try { Bundle bundle3 = new Bundle(); if (Util.getInt((String) ((HashMap) h1Var.f247819a).get("isAgree"), 0) == 1) { bundle3.putString("go_next", "gdpr_auth_location"); } msgHandler.f167378x.Va0(); msgHandler.f167378x.d(bundle3); new WebViewCloseWindowEvent().publish(); msgHandler.q5(h1Var, "hint location permission use scene result:ok", null); } catch (Exception e17) { Log.w("MicroMsg.MsgHandler", "setLocationPermissionUseScene Result, ex = " + e17.getMessage()); } } } else if (str.equals("setIsAgree")) { try { Bundle bundle4 = new Bundle(); if (Util.getInt((String) ((HashMap) h1Var.f247819a).get("isAgree"), 0) == 1) { bundle4.putString("go_next", "agree_privacy"); r.f327076a = true; Log.i("MicroMsg.DeviceInfo", "allowGetSensitiveDataFromSys"); new OnPrivacyPolicyAgreedEvent().publish(); } msgHandler.f167378x.Va0(); msgHandler.f167378x.d(bundle4); new WebViewCloseWindowEvent().publish(); msgHandler.q5(h1Var, "set wc privacy policy result:ok", null); } catch (Exception e18) { Log.w("MicroMsg.MsgHandler", "setWcPrivacyPolicyResult, ex = " + e18.getMessage()); } } else { String str3 = ""; if (str.equals("setBirthday")) { String str4 = (String) ((HashMap) h1Var.f247819a).get("birthday"); String str5 = (String) ((HashMap) h1Var.f247819a).get("mobile"); Log.i("MicroMsg.MsgHandler", "mobile %s,birthday %s", str5, str4); if (Util.isNullOrNil(str5) && d60.z.a()) { d60.z.h(); str5 = (String) d60.z.s().i().e(6, null); } if (!Util.isNullOrNil(str5, str4)) { HashMap hashMap = new HashMap(); hashMap.put("birthday", str4); hashMap.put("last_update_birthday_time", Long.valueOf(System.currentTimeMillis() / 1000)); p4 p4Var = p4.f270779b; p4Var.getClass(); try { if (hashMap.isEmpty()) { Log.i("MicroMsg.RegisterAccountInfo", "kv map is null or empty!"); } else { if (p4Var.f270780a.contains(str5)) { String string = p4Var.f270780a.getString(str5, str3); if (!Util.isNullOrNil(string)) { jSONObject = new JSONObject(new String(Base64.decode(string, 0))); } else { jSONObject = new JSONObject(); } } else { jSONObject = new JSONObject(); } for (String str6 : hashMap.keySet()) { jSONObject.put(str6, hashMap.get(str6)); } Log.i("MicroMsg.RegisterAccountInfo", "put json str %s", jSONObject.toString()); p4Var.f270780a.edit().putString(str5, Base64.encodeToString(jSONObject.toString().getBytes(), 0)).commit(); } } catch (Exception e19) { Log.e("MicroMsg.RegisterAccountInfo", "save account info about %s failed, error: %s", str5, e19.getMessage()); } } msgHandler.q5(h1Var, "setBirthday OK", null); } else if (str.equals("getBirthday")) { HashMap hashMap2 = new HashMap(); String str7 = (String) ((HashMap) h1Var.f247819a).get("mobile"); Log.i("MicroMsg.MsgHandler", "getBirthday of %s", str7); long j15 = 0; if (Util.isNullOrNil(str7) && d60.z.a()) { d60.z.h(); str7 = (String) d60.z.s().i().e(6, null); } if (!Util.isNullOrNil(str7)) { str3 = p4.f270779b.a(str7, "birthday"); j15 = Util.safeParseLong(p4.f270779b.a(str7, "last_update_birthday_time")); } Log.i("MicroMsg.MsgHandler", "updateTime %s", Long.valueOf(j15)); hashMap2.put("birthday", str3); hashMap2.put("updatetime", Long.valueOf(j15)); msgHandler.q5(h1Var, "getBirthday OK", hashMap2); } else if (str.equals("birthdayComfirmOK")) { try { Bundle bundle5 = new Bundle(); bundle5.putString("go_next", "birthdayComfirmOK"); msgHandler.f167378x.Va0(); msgHandler.f167378x.d(bundle5); new WebViewCloseWindowEvent().publish(); msgHandler.q5(h1Var, "birthdayConfirmOK", null); } catch (Exception e25) { Log.w("MicroMsg.MsgHandler", "setWcPrivacyPolicyResult, ex = " + e25.getMessage()); } } else if (str.equals("continue")) { try { Bundle bundle6 = new Bundle(); bundle6.putString("go_next", "gdpr_confirm_continue"); msgHandler.f167378x.Va0(); msgHandler.f167378x.d(bundle6); new WebViewCloseWindowEvent().publish(); msgHandler.q5(h1Var, "h5 confirm continue OK", null); } catch (Exception e26) { Log.w("MicroMsg.MsgHandler", "setWcPrivacyPolicyResult, ex = " + e26.getMessage()); } } else if (str.equals("setPolicyListIsAgree")) { int e27 = p.e(h1Var.f247819a, "isAgree", 0); String f15 = p.f(h1Var.f247819a, "customInfo"); String f16 = p.f(h1Var.f247819a, "policyTicket"); String f17 = p.f(h1Var.f247819a, "policyList"); yk0.b bVar = new yk0.b(b.a.JsApiAgree, e27, f15, f16, f17); ((yk0.a) MvvmEventCenter.getEvent(yk0.a.class)).publish(bVar); for (lm.i iVar : ((b.a) lm.b.f(yk0.d.class)).all()) { if (lm.b.d(lm.b.f253957c, iVar)) { ((yk0.d) ((lm.f) iVar.get())).onChanged(bVar); } } Log.i("MicroMsg.MsgHandler", "isAgree:%s customInfo:%s ticket:%s policyList:%s", Integer.valueOf(e27), f15, f16, f17); try { map2 = null; try { msgHandler.f167378x.d(null); } catch (Exception unused3) { } } catch (Exception unused4) { map2 = null; } msgHandler.q5(h1Var, "setPolicyListIsAgree:ok", map2); } else if (str.equals("onPrivacyPolicyAgree")) { if (Util.getInt((String) ((HashMap) h1Var.f247819a).get("isAgree"), 0) == 1) { r.f327076a = true; Log.i("MicroMsg.DeviceInfo", "allowGetSensitiveDataFromSys"); new OnPrivacyPolicyAgreedEvent().publish(); } msgHandler.q5(h1Var, "set wc privacy policy result:ok", null); } } return true; } return true; } public static boolean Y3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doOpenProductView"); String str = (String) h1Var.f247819a.get("productInfo"); String str2 = (String) h1Var.f247819a.get("url"); int i15 = 0; try { i15 = Integer.valueOf(new JSONObject(str).getInt("product_type")); } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } Intent intent = new Intent(); intent.putExtra("key_product_info", str); intent.putExtra("key_source_url", str2); msgHandler.P6(i15, 3, 0, null, intent); return true; } public static boolean Y4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; msgHandler.getClass(); if (h1Var.f247819a.containsKey("connType")) { str = (String) h1Var.f247819a.get("connType"); } else { str = ""; } if (str.equalsIgnoreCase("lan")) { try { String D6 = msgHandler.D6(h1Var); q qVar = q.INSTANCE; qVar.g(11533, "" + D6, "closeWXDeviceLib"); WebViewExDeviceLanMgr.d().b(msgHandler.f167360d); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "closeWXDeviceLib failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "closeWXDeviceLib:fail_exception", null); } } else { try { String D62 = msgHandler.D6(h1Var); q qVar2 = q.INSTANCE; qVar2.g(11533, "" + D62, "closeWXDeviceLib"); WebViewExDeviceMgr.d().b(msgHandler.f167360d); } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "closeWXDeviceLib failed : %s", e16.getMessage()); msgHandler.q5(h1Var, "closeWXDeviceLib:fail_exception", null); } } msgHandler.q5(h1Var, "closeWXDeviceLib:ok", null); return true; } public static boolean Z(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; ((FTSWebViewLogic) ka5).getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "doSearchWebQuery %s", map.toString()); d60.z.d().f(new jo3.f0(p.f(map, "requestId"), p.f(map, "commReq"), p.e(map, "webview_instance_id", -1))); return false; } public static boolean Z0(MsgHandler msgHandler, h1 h1Var, boolean z15) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "openEmotionDetailView"); String str = (String) h1Var.f247819a.get("ProductId"); String str2 = (String) h1Var.f247819a.get("searchID"); int i15 = Util.getInt(h1Var.f247819a.get("emotionScene"), 12); if (Util.isNullOrNil(str)) { Log.w("MicroMsg.MsgHandler", "openEmotionDetailView failed product id is null."); msgHandler.q5(h1Var, "openEmotionDetailView", null); return false; } Intent intent = new Intent(); intent.putExtra("extra_id", str); intent.putExtra("preceding_scence", 12); intent.putExtra("download_entrance_scene", i15); intent.putExtra("searchID", str2); if (!msgHandler.B) { sv3.b.j(msgHandler.f167360d, "emoji", ".ui.EmojiStoreDetailUI", intent, null); msgHandler.B = true; } else { Log.i("MicroMsg.MsgHandler", "had start emoji stroe detail ui."); } msgHandler.q5(h1Var, "openEmotionDetailView", null); if (z15) { q.INSTANCE.g(13055, 0, str, "", "", Integer.valueOf(((com.tencent.mm.feature.emoji.api.c1) j.c(com.tencent.mm.feature.emoji.api.c1.class)).s0()), str2); } return true; } public static boolean Z1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doGetLatestAddress JSOAUTH"); try { str = msgHandler.f167378x.getCurrentUrl(); } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "exception in get currentUrl %s", e15.getMessage()); str = ""; } if (str == null) { msgHandler.q5(msgHandler.f167361e, "get_recently_used_address:fail", null); } else { RcptRecentAddrEvent rcptRecentAddrEvent = new RcptRecentAddrEvent(); rcptRecentAddrEvent.f64044d.f64046a = (String) msgHandler.f167361e.f247819a.get("appId"); rcptRecentAddrEvent.f64044d.f64047b = str; rcptRecentAddrEvent.f64045e.f64048a = -119; rcptRecentAddrEvent.callback = new n0(msgHandler, rcptRecentAddrEvent, "get_recently_used_address:"); rcptRecentAddrEvent.asyncPublish(Looper.getMainLooper()); } return true; } public static boolean Z2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("brandIcon"); String str2 = (String) h1Var.f247819a.get("brandName"); String str3 = (String) h1Var.f247819a.get("desc"); String str4 = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str5 = (String) h1Var.f247819a.get("cover"); boolean z15 = Util.getInt((String) h1Var.f247819a.get("forbidForward"), 0) == 1; boolean z16 = Util.getInt((String) h1Var.f247819a.get("disableShowFinderLiveTopBar"), 0) == 0; a0.b bVar = new a0.b(); bVar.f165894c = Util.getInt((String) h1Var.f247819a.get("itemShowType"), -1); bVar.f165892a = (String) h1Var.f247819a.get("userName"); bVar.f165893b = (String) h1Var.f247819a.get("brandName"); bVar.f165895d = Util.getInt((String) h1Var.f247819a.get("isPaySubscribe"), 0); String str6 = (String) h1Var.f247819a.get("url"); boolean z17 = Util.getInt((String) h1Var.f247819a.get("isMenuShowBrandInfo"), 0) == 1; boolean z18 = Util.getInt((String) h1Var.f247819a.get("showSourceInfo"), 0) == 1; bVar.f165900i = z18; bVar.f165899h = (String) h1Var.f247819a.get(TPReportKeys.Common.COMMON_VID); bVar.f165898g = Util.getInt((String) h1Var.f247819a.get("duration"), 0); bVar.f165896e = Util.getInt((String) h1Var.f247819a.get(V2TXJSAdapterConstants.PUSHER_KEY_RESOLUTION_WIDTH), 0); bVar.f165897f = Util.getInt((String) h1Var.f247819a.get(V2TXJSAdapterConstants.PUSHER_KEY_RESOLUTION_HEIGHT), 0); bVar.f165901j = Util.getBoolean((String) h1Var.f247819a.get("isDisableMenuHeader"), false); bVar.f165902k = Util.getBoolean((String) h1Var.f247819a.get("canReadArticle"), false); bVar.f165903l = (String) h1Var.f247819a.get("biz"); bVar.f165904m = Util.getLong((String) h1Var.f247819a.get("mid"), 0); bVar.f165905n = Util.getLong((String) h1Var.f247819a.get("idx"), 0); bVar.f165906o = Util.getInt((String) h1Var.f247819a.get("hasFinderElement"), 0); msgHandler.E.f165887d.put(h2.a(str6), bVar); Log.i("MicroMsg.MsgHandler", "Abe-Debug msg handler doCurrentMpInfo, %s", str6); Log.i("MicroMsg.MsgHandler", "doCurrentMpInfo brandName:%s, title:%s, brandIcon:%s, userName:%s, itemShowType:%d, isPaySubscribe:%d, forbidForward: %b, showMenuBrandInfo: %b, vid=%s, duration=%d, showSourceInfo: %b, hasFinderElement:%d", str2, str4, str, bVar.f165892a, Integer.valueOf(bVar.f165894c), Integer.valueOf(bVar.f165895d), Boolean.valueOf(z15), Boolean.valueOf(z17), bVar.f165899h, Integer.valueOf(bVar.f165898g), Boolean.valueOf(z18), Integer.valueOf(bVar.f165906o)); try { Bundle bundle = new Bundle(); bundle.putString("key_bag_icon", str); bundle.putString("key_brand_name", str2); bundle.putString("key_desc", str3); bundle.putString("key_url", str6); bundle.putString("key_brand_user_name", bVar.f165892a); bundle.putString("key_title", str4); bundle.putString("key_cover", str5); bundle.putBoolean("key_show_menu_onfo", z17); bundle.putBoolean("key_forbidForward", z15); bundle.putBoolean("key_show_live_top_bar", z16); bundle.putInt("key_item_show_type", bVar.f165894c); bundle.putBoolean("key_disable_menu_header", bVar.f165901j); bundle.putBoolean("key_disable_can_read_articel", bVar.f165902k); bundle.putString("key_biz_id", bVar.f165903l); bundle.putLong("key_idx", bVar.f165905n); bundle.putLong("key_mid", bVar.f165904m); bundle.putString("key_mp_vid", bVar.f165899h); msgHandler.f167378x.callback(71, bundle); msgHandler.q5(h1Var, "doCurrentMpInfo:ok", null); return true; } catch (Exception unused) { msgHandler.q5(h1Var, "doCurrentMpInfo:fail", null); return true; } } public static boolean Z3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doOpenProductViewWithPid"); Intent intent = new Intent(); intent.putExtra("key_product_id", (String) h1Var.f247819a.get("pid")); intent.putExtra("key_source_url", (String) h1Var.f247819a.get("url")); msgHandler.P6(Integer.valueOf(Util.getInt((String) h1Var.f247819a.get("type"), 0)), 8, Util.getInt((String) h1Var.f247819a.get(XWalkReaderBasePlugin.PARAM_KEY_VIEW_TYPE), 0), (String) h1Var.f247819a.get("ext_info"), intent); return true; } /* JADX DEBUG: Multi-variable search result rejected for r3v4, resolved type: int */ /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Type inference failed for: r3v5 */ /* JADX WARN: Type inference failed for: r3v6 */ /* JADX WARN: Type inference failed for: r3v7 */ /* JADX WARN: Type inference failed for: r3v8 */ public static boolean Z4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; int i15; Exception e15; msgHandler.getClass(); if (h1Var.f247819a.containsKey("connType")) { str = (String) h1Var.f247819a.get("connType"); } else { str = ""; } if (str.equalsIgnoreCase("lan")) { if (!WebViewExDeviceLanMgr.d().f166783b) { Log.e("MicroMsg.MsgHandler", "startScanWXDevice not init"); msgHandler.q5(h1Var, "startScanWXDevice:fail_notInit", null); } else { try { String D6 = msgHandler.D6(h1Var); Log.i("MicroMsg.MsgHandler", "srcUsername(%s)", D6); q.INSTANCE.g(11533, "" + D6, "startScanWXDevice"); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "startScanWXDevice:fail_UsernameError", null); } else { ExDeviceStartScanLanDeviceEvent exDeviceStartScanLanDeviceEvent = new ExDeviceStartScanLanDeviceEvent(); exDeviceStartScanLanDeviceEvent.f62474d.f62475a = true; exDeviceStartScanLanDeviceEvent.publish(); WebViewExDeviceLanMgr.d().f166784c = true; msgHandler.q5(h1Var, "startScanWXDevice:ok", null); } } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "startScanWXDevice failed : %s", e16.getMessage()); msgHandler.q5(h1Var, "startScanWXDevice:fail_exception", null); } } return true; } if (ck.e.c(23) && !LocationUtil.isGpsEnable()) { String str2 = Build.VERSION.RELEASE; if (!str2.equalsIgnoreCase("6.0") && !str2.equalsIgnoreCase("6.0.0")) { Log.e("MicroMsg.MsgHandler", "ScannerInThisAndroidVersionRequireGPSServiceOn"); msgHandler.q5(h1Var, "startScanWXDevice:fail_ThisAndroidVersionRequireGPSServiceOn", null); } } if (!WebViewExDeviceMgr.d().f164835b) { Log.e("MicroMsg.MsgHandler", "startScanWXDevice not init"); msgHandler.q5(h1Var, "startScanWXDevice:fail_notInit", null); } else { try { String D62 = msgHandler.D6(h1Var); String str3 = (String) h1Var.f247819a.get("btVersion"); Log.i("MicroMsg.MsgHandler", "BtVersion(%s), srcUsername(%s)", str3, D62); q qVar = q.INSTANCE; Object[] objArr = new Object[2]; objArr[0] = "" + D62; try { objArr[1] = "startScanWXDevice"; qVar.g(11533, objArr); if (Util.isNullOrNil(D62)) { msgHandler.q5(h1Var, "startScanWXDevice:fail_UsernameError", null); } else { ExDeviceScanDeviceEvent exDeviceScanDeviceEvent = new ExDeviceScanDeviceEvent(); ExDeviceScanDeviceEvent.a aVar = exDeviceScanDeviceEvent.f62396d; try { aVar.f62399b = true; aVar.f62398a = D62; if (Util.nullAsNil(str3).equals("ble")) { exDeviceScanDeviceEvent.f62396d.f62400c = 0; } else if (Util.nullAsNil(str3).equals("bc")) { try { exDeviceScanDeviceEvent.f62396d.f62400c = 1; } catch (Exception e17) { e15 = e17; i15 = 1; } } WebViewExDeviceMgr.d().f164837d = exDeviceScanDeviceEvent.f62396d.f62400c; exDeviceScanDeviceEvent.publish(); if (exDeviceScanDeviceEvent.f62397e.f62401a) { WebViewExDeviceMgr.d().f164838e = true; msgHandler.q5(h1Var, "startScanWXDevice:ok", null); } else { msgHandler.q5(h1Var, "startScanWXDevice:fail", null); } } catch (Exception e18) { e15 = e18; i15 = 1; Object[] objArr2 = new Object[i15]; objArr2[0] = e15.getMessage(); Log.e("MicroMsg.MsgHandler", "startScanWXDevice failed : %s", objArr2); msgHandler.q5(h1Var, "startScanWXDevice:fail_exception", null); return i15; } } } catch (Exception e19) { e15 = e19; i15 = 1; Object[] objArr22 = new Object[i15]; objArr22[0] = e15.getMessage(); Log.e("MicroMsg.MsgHandler", "startScanWXDevice failed : %s", objArr22); msgHandler.q5(h1Var, "startScanWXDevice:fail_exception", null); return i15; } } catch (Exception e25) { e15 = e25; i15 = 1; Object[] objArr222 = new Object[i15]; objArr222[0] = e15.getMessage(); Log.e("MicroMsg.MsgHandler", "startScanWXDevice failed : %s", objArr222); msgHandler.q5(h1Var, "startScanWXDevice:fail_exception", null); return i15; } } return true; } public static boolean a(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doGoVideoPlayerUI"); String str = (String) h1Var.f247819a.get("shareThumbUrl"); int i15 = Util.getInt((String) h1Var.f247819a.get("shareBtnHidden"), 0); int i16 = Util.getInt((String) h1Var.f247819a.get("needReportData"), 0); Intent intent = new Intent(); intent.putExtra("KFromTimeLine", true); intent.putExtra("KStremVideoUrl", (String) h1Var.f247819a.get("streamingUrl")); intent.putExtra("StreamWording", (String) h1Var.f247819a.get("btnTitle")); intent.putExtra("StremWebUrl", (String) h1Var.f247819a.get("jumpUrl")); intent.putExtra("KThumUrl", str); intent.putExtra("KMediaId", "fakeid_" + str.hashCode()); intent.putExtra("KMediaVideoTime", (int) Util.getDouble((String) h1Var.f247819a.get("streamingVideoTime"), 0.0d)); intent.putExtra("KMediaTitle", (String) h1Var.f247819a.get("shareTitle")); intent.putExtra("ShareBtnHidden", i15); intent.putExtra("ReportArgs", (String) h1Var.f247819a.get("reportArgs")); intent.putExtra("NeedReportData", i16); if (((ie1.h) j.c(ie1.h.class)).Xj0(h.c.f232438v1, 1) > 0) { sv3.b.j(msgHandler.f167360d, "sns", ".ui.SnsAdStreamVideoPlayUI", intent, null); Log.i("MicroMsg.MsgHandler", "use new stream video play UI"); } else { sv3.b.j(msgHandler.f167360d, "sns", ".ui.VideoAdPlayerUI", intent, null); } msgHandler.q5(h1Var, "playStreamingVideo:ok", null); return true; } public static boolean a0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; Log.i("MicroMsg.MsgHandler", "doOpenWeAppPage %s", h1Var.f247819a); String f15 = p.f(h1Var.f247819a, "userName"); String f16 = p.f(h1Var.f247819a, "relativeURL"); if (f16.contains("render_data")) { try { JSONObject jSONObject = new JSONObject(Uri.parse(f16).getQueryParameter("widgetData")); jSONObject.remove("render_data"); f16 = f16.replaceAll("(widgetData=.*&)|(widgetData=.*$)", "&") + "&widgetData=" + jSONObject.toString(); } catch (JSONException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } } int e16 = p.e(h1Var.f247819a, "appVersion", 0); String f17 = p.f(h1Var.f247819a, "searchId"); String f18 = p.f(h1Var.f247819a, "docId"); int e17 = p.e(h1Var.f247819a, "position", 1); int e18 = p.e(h1Var.f247819a, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 1000); int e19 = p.e(h1Var.f247819a, "debugMode", 0); String f19 = p.f(h1Var.f247819a, "cookie"); String f25 = p.f(h1Var.f247819a, "appId"); int e25 = p.e(h1Var.f247819a, "startWeAppScene", 0); JSONObject jSONObject2 = new JSONObject(); try { jSONObject2.put("cookies", f19); } catch (Exception unused) { } if (e19 < 0) { e19 = 0; } if (((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).f164282e != null) { e19 = 1; } StartAppBrandUIFromOuterEvent startAppBrandUIFromOuterEvent = new StartAppBrandUIFromOuterEvent(); StartAppBrandUIFromOuterEvent.a aVar = startAppBrandUIFromOuterEvent.f64736d; aVar.f64743f = msgHandler.f167360d; aVar.f64738a = f15; aVar.f64739b = f16; aVar.f64746i = e16; aVar.f64759v = "sos"; aVar.f64760w = jSONObject2.toString(); if (Util.isNullOrNil(f25)) { startAppBrandUIFromOuterEvent.f64736d.f64758u = f15; } else { startAppBrandUIFromOuterEvent.f64736d.f64758u = f25; } StartAppBrandUIFromOuterEvent.a aVar2 = startAppBrandUIFromOuterEvent.f64736d; aVar2.f64740c = e19; if (e25 > 0) { aVar2.f64741d = e25; } else if (e18 == 201 || e18 == 14 || e18 == 22) { aVar2.f64741d = 1006; } else if (e18 == 3) { aVar2.f64741d = 1005; } else if (e18 == 16) { aVar2.f64741d = XWebFeature.INTERFACE_SET_WEB_CONTENTS_SIZE; } else if (e18 == 20 || e18 == 34 || e18 == 67 || e18 == 17 || e18 == 100) { aVar2.f64741d = 1053; } else if (e18 == 42 || e18 == 52) { aVar2.f64741d = 1106; } else { aVar2.f64741d = 1000; } String f26 = p.f(h1Var.f247819a, "statSessionId"); String f27 = p.f(h1Var.f247819a, "statKeywordId"); String f28 = p.f(h1Var.f247819a, "subScene"); startAppBrandUIFromOuterEvent.f64736d.f64742e = f26 + ":" + f27 + ":" + f17 + ":" + f18 + ":" + e17 + ":" + f28; startAppBrandUIFromOuterEvent.publish(); c.b bVar = new c.b(); bVar.f345559a = new rp5(); bVar.f345560b = new sp5(); bVar.f345561c = "/cgi-bin/mmux-bin/weappsearchadclick"; bVar.f345562d = 1873; yf0.c a15 = bVar.a(); rp5 rp5 = (rp5) a15.f345548a.f345573a; rp5.f35588d = p.f(h1Var.f247819a, "statSessionId"); rp5.f35589e = p.f(h1Var.f247819a, "statKeywordId"); rp5.f35590f = p.f(h1Var.f247819a, "searchId"); rp5.f35591g = p.f(h1Var.f247819a, "docId"); rp5.f35592h = p.e(h1Var.f247819a, "position", 1); rp5.f35593i = p.f(h1Var.f247819a, "userName"); rp5.f35594j = "" + p.e(h1Var.f247819a, "appVersion", 0); rp5.f35595n = p.f(h1Var.f247819a, "adBuffer"); rp5.f35596o = e18; rp5.f35597p = p.f(h1Var.f247819a, "clickExtInfo"); lh0.v vVar = new lh0.v(); vVar.a("20StatSessionId", rp5.f35588d + ","); vVar.a("21KeywordId", rp5.f35589e + ","); vVar.a("22SearchId", rp5.f35590f + ","); vVar.a("23DocId", rp5.f35591g + ","); vVar.a("24Pos", rp5.f35592h + ","); vVar.a("25AppUserName", rp5.f35593i + ","); vVar.a("26AppVersion", rp5.f35594j + ","); vVar.a("27AdBuffer", rp5.f35595n + ","); vVar.a("28AdClickBuffer", rp5.f35597p + ","); vVar.a("29scene", e18 + ","); Log.i("MicroMsg.MsgHandler", "doClickReportScene oreh" + vVar.c()); l0.e(a15, new s0(msgHandler, vVar), false); msgHandler.q5(h1Var, "openWeAppPage:ok", null); return true; } public static boolean a1(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; EmojiStoreWebViewLogic XN0 = com.tencent.mm.plugin.webview.modeltools.m.XN0(); Map<String, Object> map = h1Var.f247819a; XN0.getClass(); String Uq = ((com.tencent.mm.feature.emoji.api.c1) j.c(com.tencent.mm.feature.emoji.api.c1.class)).Uq(); if (Util.isNullOrNil(Uq)) { Log.e("MicroMsg.emoji.EmojiStoreWebViewLogic", "load emojiStore Template Path error"); return false; } int a15 = EmojiStoreWebViewLogic.a(map, "type", 0); String b15 = EmojiStoreWebViewLogic.b(map, "pageName"); String b16 = EmojiStoreWebViewLogic.b(map, "keyword"); int a16 = EmojiStoreWebViewLogic.a(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); Intent intent = new Intent(); intent.putExtra("hardcode_jspermission", JsapiPermissionWrapper.f173510h); intent.putExtra("hardcode_general_ctrl", GeneralControlWrapper.f173507e); intent.putExtra("neverGetA8Key", true); intent.putExtra("rawUrl", "file://" + Uq + "/" + b15 + "?type=" + a15 + "&keyword=" + b16 + "&scene=" + a16 + "&lang=" + LocaleUtil.getCurrentLanguage(MMApplicationContext.getContext()) + "&clientType=1&version=" + ((com.tencent.mm.feature.emoji.api.c1) j.c(com.tencent.mm.feature.emoji.api.c1.class)).s0()); intent.putExtra("keyword", b16); intent.putExtra("type", a15); intent.putExtra("sence", a16); sv3.b.j(MMApplicationContext.getContext(), "webview", ".ui.tools.emojistore.EmojiStoreSearchWebViewUI", intent, null); q.INSTANCE.g(13055, 1, "", "", Integer.valueOf(a15), Integer.valueOf(((com.tencent.mm.feature.emoji.api.c1) j.c(com.tencent.mm.feature.emoji.api.c1.class)).s0()), 0L); PreEmotionSearchEvent preEmotionSearchEvent = new PreEmotionSearchEvent(); PreEmotionSearchEvent.a aVar = preEmotionSearchEvent.f63931d; aVar.f63933b = a15; aVar.f63932a = b16; aVar.f63934c = ""; preEmotionSearchEvent.publish(); return true; } public static boolean a2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; try { String nullAsNil = Util.nullAsNil(h1Var.f247819a.get("jumpUrl").toString()); Log.i("MicroMsg.MsgHandler", "doOpAdJump, jumpUrl=" + nullAsNil); Bundle bundle = new Bundle(); bundle.putString("sns_landing_pages_ad_jumpurl", nullAsNil); msgHandler.f167378x.callback(151, bundle); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doOpVoteAdData, callback exp:" + e15.toString()); } return false; } public static boolean a3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doFaceDetectForPay"); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); int i15 = 0; if (h1Var.f247819a.containsKey(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE)) { i15 = Util.getInt(h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE).toString(), 0); } String obj = h1Var.f247819a.containsKey("package") ? h1Var.f247819a.get("package").toString() : null; String obj2 = h1Var.f247819a.containsKey("package_sign") ? h1Var.f247819a.get("package_sign").toString() : null; String obj3 = h1Var.f247819a.containsKey("other_verify_title") ? h1Var.f247819a.get("other_verify_title").toString() : null; String obj4 = h1Var.f247819a.containsKey("other_verify_title_front") ? h1Var.f247819a.get("other_verify_title_front").toString() : null; String obj5 = h1Var.f247819a.containsKey("need_frontpage") ? h1Var.f247819a.get("need_frontpage").toString() : null; String obj6 = h1Var.f247819a.containsKey("face_verify_title") ? h1Var.f247819a.get("face_verify_title").toString() : null; q.INSTANCE.idkeyStat(917, 34, 1, false); RequestFaceVerifyForPayEvent requestFaceVerifyForPayEvent = new RequestFaceVerifyForPayEvent(); RequestFaceVerifyForPayEvent.a aVar = requestFaceVerifyForPayEvent.f64259d; aVar.f64261a = i15; aVar.f64262b = obj; aVar.f64263c = obj2; aVar.f64264d = obj3; aVar.f64265e = obj4; aVar.f64266f = obj5; aVar.f64268h = 63; aVar.f64267g = obj6; Context context = msgHandler.f167360d; if (context instanceof Activity) { aVar.f64269i = (Activity) context; } requestFaceVerifyForPayEvent.publish(); if (requestFaceVerifyForPayEvent.f64260e.f64270a) { return true; } ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(null); msgHandler.q5(h1Var, "faceVerifyForPay:fail", kp3.a.a(requestFaceVerifyForPayEvent.f64260e.f64271b)); return true; } public static boolean a4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); msgHandler.f7((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE)); return msgHandler.U5((String) h1Var.f247819a.get("username"), jsapiPermissionWrapper); } public static boolean a5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; msgHandler.getClass(); if (h1Var.f247819a.containsKey("connType")) { str = (String) h1Var.f247819a.get("connType"); } else { str = ""; } if (str.equalsIgnoreCase("lan")) { if (!WebViewExDeviceLanMgr.d().f166783b) { Log.e("MicroMsg.MsgHandler", "stopScanWXDevice not init"); msgHandler.q5(h1Var, "stopScanWXDevice:fail_notInit", null); } else { try { String D6 = msgHandler.D6(h1Var); q qVar = q.INSTANCE; qVar.g(11533, "" + D6, "stopScanWXDevice"); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "stopScanWXDevice:fail_UsernameError", null); } else { ExDeviceStartScanLanDeviceEvent exDeviceStartScanLanDeviceEvent = new ExDeviceStartScanLanDeviceEvent(); exDeviceStartScanLanDeviceEvent.f62474d.f62475a = false; exDeviceStartScanLanDeviceEvent.publish(); WebViewExDeviceLanMgr.d().f166784c = false; msgHandler.q5(h1Var, "stopScanWXDevice:ok", null); } } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); Log.e("MicroMsg.MsgHandler", "stopScanWXDevice failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "stopScanWXDevice:fail_exception", null); } } } else if (!WebViewExDeviceMgr.d().f164835b) { Log.e("MicroMsg.MsgHandler", "stopScanWXDevice not init"); msgHandler.q5(h1Var, "stopScanWXDevice:fail_notInit", null); } else { try { String D62 = msgHandler.D6(h1Var); q qVar2 = q.INSTANCE; qVar2.g(11533, "" + D62, "stopScanWXDevice"); if (Util.isNullOrNil(D62)) { msgHandler.q5(h1Var, "stopScanWXDevice:fail_UsernameError", null); } else { ExDeviceScanDeviceEvent exDeviceScanDeviceEvent = new ExDeviceScanDeviceEvent(); ExDeviceScanDeviceEvent.a aVar = exDeviceScanDeviceEvent.f62396d; aVar.f62399b = false; aVar.f62398a = D62; aVar.f62400c = WebViewExDeviceMgr.d().f164837d; exDeviceScanDeviceEvent.publish(); if (exDeviceScanDeviceEvent.f62397e.f62401a) { WebViewExDeviceMgr.d().f164838e = false; msgHandler.q5(h1Var, "stopScanWXDevice:ok", null); } else { Log.e("MicroMsg.MsgHandler", "stopScanWXDevice fail"); msgHandler.q5(h1Var, "stopScanWXDevice:fail", null); } } } catch (Exception e16) { Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "", new Object[0]); Log.e("MicroMsg.MsgHandler", "stopScanWXDevice failed : %s", e16.getMessage()); msgHandler.q5(h1Var, "stopScanWXDevice:fail_exception", null); } } return true; } public static boolean b(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "hy: doGetIbgPrepayRequest"); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); if (msgHandler.f167360d instanceof MMActivity) { WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); walletJsapiData.A = 2; if (!((u00.f) j.c(u00.f.class)).bh0((MMActivity) msgHandler.f167360d, walletJsapiData, 27, msgHandler)) { msgHandler.q5(h1Var, "get_h5_prepay_request:fail", null); } else { long j15 = Util.getLong((String) h1Var.f247819a.get("message_id"), 0); int i15 = Util.getInt((String) h1Var.f247819a.get("message_index"), 0); q.INSTANCE.g(10593, walletJsapiData.f173498s, walletJsapiData.f173486d, Long.valueOf(j15), Integer.valueOf(i15), Integer.valueOf(walletJsapiData.f173499t), walletJsapiData.f173497r); msgHandler.K = msgHandler.o5(h1Var); } } return true; } public static boolean b0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); int e15 = p.e(h1Var.f247819a, "logId", 0); String f15 = p.f(h1Var.f247819a, "logString"); Log.i("MicroMsg.MsgHandler", "doSearchRailtime oreh id:%d, value:%s, params:%s", Integer.valueOf(e15), f15, h1Var.f247819a); ((z00.s) j.c(z00.s.class)).An(e15, f15); msgHandler.q5(h1Var, "reportWeAppSearchRealtime:ok", null); return true; } public static boolean b1(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; com.tencent.mm.plugin.webview.modeltools.m.XN0().c(h1Var.f247819a); return false; } public static boolean b2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; try { String jSONObject = ConvertUtils.map2Json(h1Var.f247819a).toString(); Log.i("MicroMsg.MsgHandler", "doOpAdH5Func, params=" + jSONObject); Bundle bundle = new Bundle(); bundle.putString("callbackId", h1Var.f247857c); bundle.putString("sns_landing_pages_h5_params", jSONObject); msgHandler.f167378x.callback(152, bundle); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doOpAdH5Func, callback exp:" + e15.toString()); } return false; } public static boolean b3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Intent intent = new Intent(); intent.putExtra("appId", (String) h1Var.f247819a.get("appid")); intent.putExtra("view_task", true); intent.addFlags(67108864); ((ab1.h) j.c(ab1.h.class)).vM(msgHandler.f167360d, intent, new x0(msgHandler, h1Var)); return true; } public static boolean b4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); Log.i("MicroMsg.MsgHandler", "dogetBrandWCPayBindCardRequest JSOAUTH"); if (!(msgHandler.f167360d instanceof MMActivity)) { return true; } WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); walletJsapiData.f173500u = 4; ((u00.f) j.c(u00.f.class)).v9((MMActivity) msgHandler.f167360d, walletJsapiData, 7, msgHandler); return true; } public static boolean b5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; int i15; Exception e15; msgHandler.getClass(); if (h1Var.f247819a.containsKey("connType")) { str = (String) h1Var.f247819a.get("connType"); } else { str = ""; } if (str.equalsIgnoreCase("lan")) { if (!WebViewExDeviceLanMgr.d().f166783b) { Log.e("MicroMsg.MsgHandler", "connectWXDevice not init"); msgHandler.q5(h1Var, "connectWXDevice:fail_notInit", null); } else { String str2 = (String) h1Var.f247819a.get("deviceId"); Log.i("MicroMsg.MsgHandler", "doConnectWXDevice, deviceId : %s", str2); if (Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "deviceId is null"); msgHandler.q5(h1Var, "connectWXDevice:fail_noDeviceId", null); } else { String D6 = msgHandler.D6(h1Var); q.INSTANCE.g(11533, "" + D6, "connectWXDevice"); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "connectWXDevice:fail_UsernameError", null); } else { HashMap<String, String> hashMap = msgHandler.f167372r; if (hashMap != null && !hashMap.containsKey(D6)) { msgHandler.f167372r.put(D6, str2); } try { ExDeviceConnectLanDeviceEvent exDeviceConnectLanDeviceEvent = new ExDeviceConnectLanDeviceEvent(); ExDeviceConnectLanDeviceEvent.a aVar = exDeviceConnectLanDeviceEvent.f62295d; try { aVar.f62299c = true; aVar.f62298b = D6; aVar.f62297a = str2; exDeviceConnectLanDeviceEvent.publish(); if (exDeviceConnectLanDeviceEvent.f62296e.f62300a) { msgHandler.q5(h1Var, "connectWXDevice:ok", null); } else { msgHandler.q5(h1Var, "connectWXDevice:fail", null); } } catch (Exception e16) { e15 = e16; i15 = 1; Object[] objArr = new Object[i15]; objArr[0] = e15.getMessage(); Log.e("MicroMsg.MsgHandler", "connectWXDevice failed : %s", objArr); msgHandler.q5(h1Var, "connectWXDevice:fail_exception", null); return true; } } catch (Exception e17) { e15 = e17; i15 = 1; Object[] objArr2 = new Object[i15]; objArr2[0] = e15.getMessage(); Log.e("MicroMsg.MsgHandler", "connectWXDevice failed : %s", objArr2); msgHandler.q5(h1Var, "connectWXDevice:fail_exception", null); return true; } } } } } else if (!WebViewExDeviceMgr.d().f164835b) { Log.e("MicroMsg.MsgHandler", "connectWXDevice not init"); msgHandler.q5(h1Var, "connectWXDevice:fail_notInit", null); } else { String str3 = (String) h1Var.f247819a.get("deviceId"); Log.i("MicroMsg.MsgHandler", "doConnectWXDevice, deviceId : %s", str3); if (Util.isNullOrNil(str3)) { Log.e("MicroMsg.MsgHandler", "deviceId is null"); msgHandler.q5(h1Var, "connectWXDevice:fail_noDeviceId", null); } else { String D62 = msgHandler.D6(h1Var); q.INSTANCE.g(11533, "" + D62, "connectWXDevice"); if (Util.isNullOrNil(D62)) { msgHandler.q5(h1Var, "connectWXDevice:fail_UsernameError", null); } else { HashMap<String, String> hashMap2 = msgHandler.f167371q; if (hashMap2 != null && !hashMap2.containsValue(str3)) { msgHandler.f167371q.put(D62, str3); } try { ExDeviceConnectDeviceEvent exDeviceConnectDeviceEvent = new ExDeviceConnectDeviceEvent(); ExDeviceConnectDeviceEvent.a aVar2 = exDeviceConnectDeviceEvent.f62289d; aVar2.f62293c = true; aVar2.f62291a = D62; aVar2.f62292b = str3; exDeviceConnectDeviceEvent.publish(); if (exDeviceConnectDeviceEvent.f62290e.f62294a) { msgHandler.q5(h1Var, "connectWXDevice:ok", null); } else { msgHandler.q5(h1Var, "connectWXDevice:fail", null); } } catch (Exception e18) { Log.e("MicroMsg.MsgHandler", "connectWXDevice failed : %s", e18.getMessage()); msgHandler.q5(h1Var, "connectWXDevice:fail_exception", null); return true; } } } } return true; } public static boolean c(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "hy: doGetIbgTransactionRequest"); if (msgHandler.f167360d instanceof MMActivity) { WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); int i15 = Util.getInt((String) h1Var.f247819a.get("closeWebAfterPayDetailBack"), 0); msgHandler.J = i15; Log.i("MicroMsg.MsgHandler", "close window: %s", Integer.valueOf(i15)); if (walletJsapiData.f173494o == 2) { msgHandler.Y.alive(); int i16 = walletJsapiData.f173493n; if (i16 == 1) { Log.i("MicroMsg.MsgHandler", "businessScene: %d,data.reqKey:%s", Integer.valueOf(walletJsapiData.f173494o), walletJsapiData.f173492j); WalletGetPaidOrderDetailEvent walletGetPaidOrderDetailEvent = new WalletGetPaidOrderDetailEvent(); WalletGetPaidOrderDetailEvent.a aVar = walletGetPaidOrderDetailEvent.f65092d; aVar.f65093a = walletJsapiData.f173486d; aVar.f65094b = walletJsapiData.f173490h; aVar.f65095c = walletJsapiData.f173489g; aVar.f65096d = walletJsapiData.f173491i; aVar.f65097e = walletJsapiData.f173492j; aVar.f65098f = walletJsapiData.f173493n; aVar.f65099g = walletJsapiData.f173488f; aVar.f65100h = walletJsapiData.f173495p; walletGetPaidOrderDetailEvent.publish(); } else if (i16 == 2 && !((u00.f) j.c(u00.f.class)).ds((MMActivity) msgHandler.f167360d, walletJsapiData)) { msgHandler.q5(h1Var, "get_ibg_prepay_request:fail", null); } } else if (!((u00.f) j.c(u00.f.class)).X60((MMActivity) msgHandler.f167360d, walletJsapiData, 25, msgHandler)) { msgHandler.q5(h1Var, "get_ibg_prepay_request:fail", null); } long j15 = Util.getLong((String) h1Var.f247819a.get("message_id"), 0); int i17 = Util.getInt((String) h1Var.f247819a.get("message_index"), 0); q.INSTANCE.g(10593, walletJsapiData.f173498s, walletJsapiData.f173486d, Long.valueOf(j15), Integer.valueOf(i17), Integer.valueOf(walletJsapiData.f173499t), walletJsapiData.f173497r); } return true; } public static boolean c0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); int e15 = p.e(map, "action", 0); if (e15 == 1) { if (x0.f242556a == null) { x0.a(); } x0.f242556a.f43549d.clear(); SharedPreferences sharedPreferences = MMApplicationContext.getContext().getSharedPreferences("fts_history_search_sp", 0); try { String encodeToString = Base64.encodeToString(x0.f242556a.toByteArray(), 0); sharedPreferences.edit().putString("key_pb_history_list" + u0.r(), encodeToString).apply(); Log.i("MicroMsg.WebSearch.WebSearchHistoryLogic", "addHistory pbListString %s", encodeToString); } catch (IOException unused) { } } else if (e15 == 2) { int e16 = p.e(map, "type", 0); int e17 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); if (System.currentTimeMillis() - fTSWebViewLogic.f164233f > 1000) { fTSWebViewLogic.f164233f = System.currentTimeMillis(); if (!p.h(0)) { Log.e("MicroMsg.WebSearch.FTSWebViewLogic", "fts h5 template not avail"); } else { boolean DL0 = ((z00.p) j.c(z00.p.class)).DL0(e17, e16); String e18 = jo3.w0.e("searchID"); Log.i("MicroMsg.WebSearch.WebSearchReportLogic", "kvReportGlobalTabClick type:%s, scene:%s, searchId:%s, isTabGuide:%s,sessionId:%s, redDotMsgId:%s", Integer.valueOf(e16), Integer.valueOf(e17), e18, Boolean.FALSE, "", ""); ww2.d.INSTANCE.g(12845, Integer.valueOf(e16), 0, Integer.valueOf(e17), e18, 0, "", ""); Intent a15 = jo3.z0.a(); a15.putExtra("ftsneedkeyboard", !DL0); a15.putExtra("ftsbizscene", e17); a15.putExtra("ftsType", e16); a15.putExtra("rawUrl", jo3.z0.e(jo3.z0.b(e17, true, e16), 0)); a15.putExtra("key_load_js_without_delay", true); a15.putExtra("key_change_search_icon", true); a15.putExtra("key_from_whole_search", false); a15.putExtra("key_search_icon_and_hint_fix_default", true); sv3.b.y(MMApplicationContext.getContext(), a15, null); } } } else if (e15 == 3) { ((o0) j.c(o0.class)).Xi(p.e(map, "webview_instance_id", -1), map); } return false; } public static boolean c1(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; EmojiStoreWebViewLogic XN0 = com.tencent.mm.plugin.webview.modeltools.m.XN0(); Map<String, Object> map = h1Var.f247819a; XN0.getClass(); String b15 = EmojiStoreWebViewLogic.b(map, "urlString"); Intent intent = new Intent(); intent.putExtra("rawUrl", b15); sv3.b.j(MMApplicationContext.getContext(), "webview", ".ui.tools.WebViewUI", intent, null); return false; } public static boolean c2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Intent intent = new Intent(); intent.putExtra("list_type", 15); intent.putExtra("already_select_contact", (String) h1Var.f247819a.get("selected_user_name")); intent.putExtra("titile", hy3.h.a(msgHandler.f167360d).getString(R.string.f366946fx)); intent.putExtra("list_attr", com.tencent.mm.ui.contact.t1.g(16384, 1, 4, 1048576, 268435456)); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { sv3.b.v((MMActivity) context, ".ui.contact.SelectContactUI", intent, 54, msgHandler); return true; } Log.e("MicroMsg.MsgHandler", "doSelectContact invalid context"); msgHandler.q5(h1Var, "selectContact:fail", null); return true; } public static boolean c3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); long j15 = Util.getLong((String) h1Var.f247819a.get("download_id"), -1); Log.i("MicroMsg.MsgHandler", "doCancelDownloadTask, downloadId = " + j15); if (j15 <= 0) { Log.e("MicroMsg.MsgHandler", "doCancelDownloadTask fail, invalid downloadId = " + j15); msgHandler.q5(h1Var, "cancel_download_task:fail", null); return true; } FileDownloadTaskInfo p15 = ((com.tencent.mm.plugin.downloader.model.l) ((kq.y) j.c(kq.y.class)).fI0()).p(j15); int t15 = ((com.tencent.mm.plugin.downloader.model.l) ((kq.y) j.c(kq.y.class)).fI0()).t(j15); Log.i("MicroMsg.MsgHandler", "doCancelDownloadTask, ret = " + t15); String a15 = j1.f165615a.a(j15); if (a15 != null) { ((c0) j.c(c0.class)).B10(a15); } if (t15 <= 0) { msgHandler.q5(h1Var, "cancel_download_task:fail", null); return true; } if (!(p15 == null || p15.f103382e == null || p15.f103390p != 2)) { ((com.tencent.mm.plugin.downloader.model.l) ((kq.y) j.c(kq.y.class)).fI0()).f(p15.f103382e); } msgHandler.q5(h1Var, "cancel_download_task:ok", null); return true; } public static boolean c4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { if (!msgHandler.f167374t || com.tencent.mm.plugin.webview.modeltools.m.WN0().f165946n) { boolean lo02 = ((xw.d) j.c(xw.d.class)).lo0(msgHandler.f167360d, "android.permission.ACCESS_FINE_LOCATION"); Log.i("MicroMsg.MsgHandler", "location perm: %s", Boolean.valueOf(lo02)); if (!lo02) { WebViewStubTempUI.T7(msgHandler.f167360d, msgHandler.f167378x, new String[]{"android.permission.ACCESS_FINE_LOCATION"}, 75, msgHandler.A); } else { msgHandler.M5(); } } else { msgHandler.q5(h1Var, "geo_location:fail_background", null); Log.i("MicroMsg.MsgHandler", "doGeoLocation fail inBackGround"); } return true; } public static boolean c5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; msgHandler.getClass(); if (h1Var.f247819a.containsKey("connType")) { str = (String) h1Var.f247819a.get("connType"); } else { str = ""; } if (str.equalsIgnoreCase("lan")) { if (!WebViewExDeviceLanMgr.d().f166783b) { Log.e("MicroMsg.MsgHandler", "disconnectWXDevice not init"); msgHandler.q5(h1Var, "disconnectWXDevice:fail_notInit", null); } else { String str2 = (String) h1Var.f247819a.get("deviceId"); Log.i("MicroMsg.MsgHandler", "doDisconnectWXDevice, deviceId : %s", str2); if (Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "deviceId is null"); msgHandler.q5(h1Var, "disconnectWXDevice:fail_noDeviceId", null); } else { String D6 = msgHandler.D6(h1Var); q qVar = q.INSTANCE; qVar.g(11533, "" + D6, "disconnectWXDevice"); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "disconnectWXDevice:fail_UsernameError", null); } else { try { ExDeviceConnectLanDeviceEvent exDeviceConnectLanDeviceEvent = new ExDeviceConnectLanDeviceEvent(); ExDeviceConnectLanDeviceEvent.a aVar = exDeviceConnectLanDeviceEvent.f62295d; aVar.f62299c = false; aVar.f62298b = D6; aVar.f62297a = str2; exDeviceConnectLanDeviceEvent.publish(); if (exDeviceConnectLanDeviceEvent.f62296e.f62300a) { msgHandler.q5(h1Var, "disconnectWXDevice:ok", null); HashMap<String, String> hashMap = msgHandler.f167372r; if (hashMap != null && hashMap.containsKey(D6)) { msgHandler.f167372r.remove(D6); } } else { msgHandler.q5(h1Var, "disconnectWXDevice:fail", null); } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "disconnectWXDevice failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "disconnectWXDevice:fail_exception", null); } } } } } else if (!WebViewExDeviceMgr.d().f164835b) { Log.e("MicroMsg.MsgHandler", "disconnectWXDevice not init"); msgHandler.q5(h1Var, "disconnectWXDevice:fail_notInit", null); } else { String str3 = (String) h1Var.f247819a.get("deviceId"); Log.i("MicroMsg.MsgHandler", "doDisconnectWXDevice, deviceId : %s", str3); if (Util.isNullOrNil(str3)) { Log.e("MicroMsg.MsgHandler", "deviceId is null"); msgHandler.q5(h1Var, "disconnectWXDevice:fail_noDeviceId", null); } else { String D62 = msgHandler.D6(h1Var); q qVar2 = q.INSTANCE; qVar2.g(11533, "" + D62, "disconnectWXDevice"); if (Util.isNullOrNil(D62)) { msgHandler.q5(h1Var, "disconnectWXDevice:fail_UsernameError", null); } else { try { ExDeviceConnectDeviceEvent exDeviceConnectDeviceEvent = new ExDeviceConnectDeviceEvent(); ExDeviceConnectDeviceEvent.a aVar2 = exDeviceConnectDeviceEvent.f62289d; aVar2.f62293c = false; aVar2.f62291a = D62; aVar2.f62292b = str3; exDeviceConnectDeviceEvent.publish(); if (exDeviceConnectDeviceEvent.f62290e.f62294a) { msgHandler.q5(h1Var, "disconnectWXDevice:ok", null); HashMap<String, String> hashMap2 = msgHandler.f167371q; if (hashMap2 != null && hashMap2.containsKey(D62)) { msgHandler.f167371q.remove(D62); } } else { msgHandler.q5(h1Var, "disconnectWXDevice:fail", null); } } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "disconnectWXDevice failed : %s", e16.getMessage()); msgHandler.q5(h1Var, "disconnectWXDevice:fail_exception", null); return true; } } } } return true; } public static boolean d(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doJumpToWXWallet"); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); if (msgHandler.f167360d instanceof MMActivity) { Intent intent = new Intent(); intent.putExtra("key_wallet_region", 1); Log.i("MicroMsg.MsgHandler", " walletMallV2 switch is :%s", Boolean.TRUE); sv3.b.k(msgHandler.f167360d, "mall", ".ui.MallIndexUIv2", intent, false); msgHandler.q5(h1Var, "jump_to_wx_wallet:ok", null); } return true; } public static boolean d0(MsgHandler msgHandler) { msgHandler.getClass(); try { msgHandler.f167378x.xH(3004, null); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "RemoteException : %s", e15.getMessage()); } msgHandler.f167375u = false; return false; } public static boolean d1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) ((HashMap) h1Var.f247819a).get("operationType"); String str2 = (String) ((HashMap) h1Var.f247819a).get("dataUrl"); boolean z15 = false; o1.a(h1Var.f247862h, false, null, ""); if (Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { msgHandler.q5(h1Var, "operateMusicPlayer:fail", null); } else if (str.equalsIgnoreCase(AssetExtension.SCENE_PLAY)) { String str3 = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str4 = (String) ((HashMap) h1Var.f247819a).get("singer"); String str5 = (String) ((HashMap) h1Var.f247819a).get("epname"); String str6 = (String) ((HashMap) h1Var.f247819a).get("coverImgUrl"); String str7 = (String) ((HashMap) h1Var.f247819a).get("lowbandUrl"); String str8 = (String) ((HashMap) h1Var.f247819a).get("webUrl"); String str9 = (String) ((HashMap) h1Var.f247819a).get("lyric"); Log.i("MicroMsg.MsgHandler", "title : %s, singer : %s, epName : %s, coverImgUrl : %s, dataUrl : %s, lowbandUrl : %s, webUrl : %s, appid : %s", str3, str4, str5, str6, str2, str7, str8, ""); if (Util.isNullOrNil(str3) || Util.isNullOrNil(str4) || Util.isNullOrNil(str5) || Util.isNullOrNil(str6) || Util.isNullOrNil(str7) || Util.isNullOrNil(str2) || Util.isNullOrNil(str8)) { msgHandler.q5(h1Var, "operateMusicPlayer:fail", null); } else { d.k(); d.j(bh0.o.a(7, str6, str3, str4, str8, str7, str2, "" + str2.hashCode(), z80.b.E(), bc2.a.a() + str6.hashCode(), str5, "")); msgHandler.q5(h1Var, "operateMusicPlayer:ok", null); } } else if (str.equalsIgnoreCase("resume")) { if (bh0.j.a(str2) && d.e() && !d.c()) { d.h(); z15 = true; } if (z15) { msgHandler.q5(h1Var, "operateMusicPlayer:ok", null); } else { msgHandler.q5(h1Var, "operateMusicPlayer:fail", null); } } else if (str.equalsIgnoreCase("pause")) { if (bh0.j.a(str2) && d.c()) { d.g(); z15 = true; } if (z15) { MMHandlerThread.postToMainThread(new bh0.g()); msgHandler.q5(h1Var, "operateMusicPlayer:ok", null); } else { msgHandler.q5(h1Var, "operateMusicPlayer:fail", null); } } else if (str.equalsIgnoreCase("seek")) { int i15 = Util.getInt(Util.notNullToString(((HashMap) h1Var.f247819a).get("position")), -1) * 1000; if (bh0.j.a(str2)) { z15 = d.i(i15); } if (z15) { msgHandler.q5(h1Var, "operateMusicPlayer:ok", null); } else { msgHandler.q5(h1Var, "operateMusicPlayer:fail", null); } } else if (str.equalsIgnoreCase("stop")) { if (bh0.j.a(str2) && d.e()) { d.k(); z15 = true; } if (z15) { msgHandler.q5(h1Var, "operateMusicPlayer:ok", null); } else { msgHandler.q5(h1Var, "operateMusicPlayer:fail", null); } } else { msgHandler.q5(h1Var, "operateMusicPlayer:fail", null); } return true; } public static boolean d2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) ((HashMap) h1Var.f247819a).get("phoneNumber"); if (!TextUtils.isEmpty(str)) { String string = hy3.h.a(msgHandler.f167360d).getString(R.string.bd7); String string2 = hy3.h.a(msgHandler.f167360d).getString(R.string.f367394sg); ProgressDialog progressDialog = msgHandler.f167363g; if (progressDialog != null) { progressDialog.dismiss(); msgHandler.f167363g = null; } i14.j.A(msgHandler.f167360d, str, "", string, string2, new v2(msgHandler, str, h1Var), new c3(msgHandler, h1Var)).setOnDismissListener(new n3(msgHandler, h1Var)); return true; } msgHandler.q5(h1Var, "makePhoneCall:fail", null); return true; } public static boolean d3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("pkgIdList"); if (!Util.isNullOrNil(str)) { try { JSONArray jSONArray = new JSONArray(str); if (jSONArray.length() > 0) { ArrayList arrayList = new ArrayList(); for (int i15 = 0; i15 < jSONArray.length(); i15++) { arrayList.add(jSONArray.optString(i15)); } if (!Util.isNullOrNil(arrayList)) { WepkgNotifyEvent wepkgNotifyEvent = new WepkgNotifyEvent(); WepkgNotifyEvent.a aVar = wepkgNotifyEvent.f65265d; aVar.f65266a = 8; aVar.f65272g = 0; aVar.f65273h = arrayList; wepkgNotifyEvent.publish(); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } } } catch (JSONException unused) { Log.e("MicroMsg.MsgHandler", "data is not json"); } } msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } public static boolean d4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { if (msgHandler.f167360d instanceof MMActivity) { Intent intent = new Intent(); intent.putExtra("toUserName", (String) ((HashMap) h1Var.f247819a).get("tousername")); intent.putExtra("extInfo", (String) ((HashMap) h1Var.f247819a).get("extmsg")); intent.putExtra("fromURL", (String) ((HashMap) h1Var.f247819a).get("url")); intent.putExtra("source", 2); cu3.z zVar = ap3.a.f7840a; MMActivity mMActivity = (MMActivity) msgHandler.f167360d; ((com.tencent.mm.app.w1) zVar).getClass(); if (mMActivity == null) { return true; } intent.setClassName(mMActivity, "com.tencent.mm.ui.CheckCanSubscribeBizUI"); mMActivity.mmStartActivityForResult(msgHandler, intent, 8); return true; } msgHandler.q5(h1Var, "jump_to_biz_profile:fail", null); return true; } /* JADX WARNING: Removed duplicated region for block: B:31:0x0131 A[Catch:{ Exception -> 0x013b }] */ /* JADX WARNING: Removed duplicated region for block: B:32:0x0132 A[Catch:{ Exception -> 0x013b }] */ /* JADX WARNING: Removed duplicated region for block: B:41:0x0182 */ public static boolean d5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { Map<String, Object> map; RemoteException e15; String str; Exception e16; int D1; StringBuilder sb5; msgHandler.getClass(); String str2 = ""; String str3 = (String) h1Var.f247819a.get("ad_info"); String r15 = u0.r(); String str4 = null; try { Bundle v65 = msgHandler.f167378x.v6(18, null); if (v65 != null) { String string = v65.getString("prePublishId"); String string2 = v65.getString("preChatName"); String string3 = v65.getString("preUsername"); String string4 = v65.getString("KAppId"); int i15 = v65.getInt("getA8KeyScene"); try { int i16 = v65.getInt("preChatTYPE", 0); String str5 = str2 + string + "," + string2 + "," + string3 + "," + i15 + ","; if (i16 == 0) { i16 = nf0.x0.b(string3, string2); } if (string != null) { try { if (string.startsWith("msg_") && !Util.isNullOrNil(string2)) { try { f4 ZB = ((g4) ((k0) d60.z.q(k0.class)).WU()).ZB(string2, Util.safeParseLong(string.substring(4))); D1 = ((mp.b) j.c(mp.b.class)).D1(ZB.i()); sb5 = new StringBuilder(); sb5.append(str5); sb5.append(ZB.getType()); str4 = ","; } catch (Exception e17) { e16 = e17; str4 = ","; Log.printErrStackTrace("MicroMsg.MsgHandler", e16, str2, new Object[0]); str2 = str5; ((d63.g) j.c(d63.g.class)).pw0(13297, str3 + str4 + str2, (int) Util.nowSecond()); if (Util.safeParseInt(Util.nullAs((String) h1Var.f247819a.get("need_record_page_operation"), "0")) != 0) { } msgHandler.q5(h1Var, "adDataReport:ok", null); return true; } try { sb5.append(str4); sb5.append(D1); sb5.append(str4); sb5.append(i16); sb5.append(str4); sb5.append(com.tencent.mm.plugin.webview.model.l2.g()); sb5.append(str4); str = sb5.toString(); String str6 = str + r15; StringBuilder sb6 = new StringBuilder(); sb6.append(str6); sb6.append(str4); sb6.append(r.f(false)); sb6.append(str4); if (string4 != null) { string4 = str2; } sb6.append(string4); str2 = sb6.toString(); } catch (Exception e18) { e16 = e18; Log.printErrStackTrace("MicroMsg.MsgHandler", e16, str2, new Object[0]); str2 = str5; ((d63.g) j.c(d63.g.class)).pw0(13297, str3 + str4 + str2, (int) Util.nowSecond()); if (Util.safeParseInt(Util.nullAs((String) h1Var.f247819a.get("need_record_page_operation"), "0")) != 0) { } msgHandler.q5(h1Var, "adDataReport:ok", null); return true; } } } catch (Exception e19) { e16 = e19; str4 = ","; Log.printErrStackTrace("MicroMsg.MsgHandler", e16, str2, new Object[0]); str2 = str5; ((d63.g) j.c(d63.g.class)).pw0(13297, str3 + str4 + str2, (int) Util.nowSecond()); if (Util.safeParseInt(Util.nullAs((String) h1Var.f247819a.get("need_record_page_operation"), "0")) != 0) { } msgHandler.q5(h1Var, "adDataReport:ok", null); return true; } } str4 = ","; str = str5 + ",," + i16 + str4 + com.tencent.mm.plugin.webview.model.l2.g() + str4; String str62 = str + r15; StringBuilder sb62 = new StringBuilder(); sb62.append(str62); sb62.append(str4); sb62.append(r.f(false)); sb62.append(str4); if (string4 != null) { } sb62.append(string4); str2 = sb62.toString(); } catch (RemoteException e25) { e15 = e25; map = null; Log.printErrStackTrace("MicroMsg.MsgHandler", e15, str2, new Object[0]); msgHandler.q5(h1Var, "adDataReport:fail", map); return true; } } else { str4 = ","; } ((d63.g) j.c(d63.g.class)).pw0(13297, str3 + str4 + str2, (int) Util.nowSecond()); if (Util.safeParseInt(Util.nullAs((String) h1Var.f247819a.get("need_record_page_operation"), "0")) != 0) { Bundle bundle = new Bundle(); bundle.putString("traceid", str3); bundle.putString("username", r15); try { msgHandler.f167378x.v6(ConstValue.APP_SET_LOCAL_STG_SUFFIX, bundle); } catch (RemoteException e26) { Log.e("MicroMsg.MsgHandler", "invokeAsResult ex: %s", e26.getMessage()); } } msgHandler.q5(h1Var, "adDataReport:ok", null); } catch (RemoteException e27) { e15 = e27; map = null; Log.printErrStackTrace("MicroMsg.MsgHandler", e15, str2, new Object[0]); msgHandler.q5(h1Var, "adDataReport:fail", map); return true; } return true; } public static boolean e(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!msgHandler.N6("nfcIsConnect", 4001, new Bundle())) { return true; } msgHandler.q5(h1Var, "nfcIsConnect:connect", null); return true; } public static boolean e0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); int i15 = Util.getInt((String) h1Var.f247819a.get(FileReaderHelper.OPEN_FILE_FROM_CMD), 0); GameJsApiCommandEvent gameJsApiCommandEvent = new GameJsApiCommandEvent(); GameJsApiCommandEvent.a aVar = gameJsApiCommandEvent.f63058d; aVar.f63060a = i15; aVar.f63061b = (String) h1Var.f247819a.get("param"); gameJsApiCommandEvent.publish(); HashMap hashMap = new HashMap(); hashMap.put("result", gameJsApiCommandEvent.f63059e.f63062a); msgHandler.q5(h1Var, "getGameMessages:ok", hashMap); return true; } public static boolean e1(MsgHandler msgHandler, h1 h1Var) { int i15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("dataUrl"); String str2 = (String) h1Var.f247819a.get("appId"); o1.a(h1Var.f247862h, false, null, str2); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "getMusicPlayerState:fail_dataUrl_null", null); } else { Log.i("MicroMsg.MsgHandler", "dataUrl : %s, appid : %s", str, str2); n b15 = d.b(); if (b15 == null || !b15.f12711n.equals(str)) { msgHandler.q5(h1Var, "getMusicPlayerState:failed_dataUrl_diff", null); } else { bh0.k a15 = d.a(); int i16 = -1; if (a15 != null) { i16 = a15.f12697a; i15 = a15.f12698b; } else { i15 = -1; } if (a15 == null || i16 < 0 || i15 < 0) { msgHandler.q5(h1Var, "getMusicPlayerState:fail", null); } else { int i17 = a15.f12699c; int i18 = a15.f12700d; HashMap hashMap = new HashMap(); hashMap.put("duration", Integer.valueOf(i16 / 1000)); hashMap.put("currentPosition", Integer.valueOf(i15 / 1000)); hashMap.put("status", Integer.valueOf(i17)); hashMap.put("downloadPercent", Integer.valueOf(i18)); msgHandler.q5(h1Var, "getMusicPlayerState:ok", hashMap); } } } return true; } public static boolean e2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); intent.putExtra("appId", Util.nullAs((String) h1Var.f247819a.get("appid"), "")); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); intent.putExtra("url", walletJsapiData.f173497r); intent.putExtra("reset_pwd_token", walletJsapiData.B); intent.putExtra("pay_channel", walletJsapiData.f173501v); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "wallet", ".pwd.ui.WalletResetPwdAdapterUI", intent, 55); return true; } public static boolean e3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); ((com.tencent.mm.plugin.appbrand.service.t0) j.c(com.tencent.mm.plugin.appbrand.service.t0.class)).BR((String) h1Var.f247819a.get("uuid"), (String) h1Var.f247819a.get("req_data")); try { msgHandler.f167378x.v6(100000, Bundle.EMPTY); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doPrivateOpenWeappFunctionalPage, AC_FINISH_ON_RESUME e = %s", e15); } return false; } public static boolean e4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { int i15; msgHandler.getClass(); try { float f15 = Util.getFloat((String) h1Var.f247819a.get("latitude"), 0.0f); float f16 = Util.getFloat((String) h1Var.f247819a.get("longitude"), 0.0f); String S6 = S6((String) h1Var.f247819a.get("name")); String S62 = S6((String) h1Var.f247819a.get("address")); String S63 = S6((String) h1Var.f247819a.get("infoUrl")); try { i15 = Util.getInt((String) h1Var.f247819a.get("scale"), 0); } catch (Exception unused) { i15 = 0; } Intent intent = new Intent(); if (Util.getInt((String) msgHandler.f167361e.f247819a.get("webview_scene"), 0) == 25) { intent.putExtra("map_view_type", 9); intent.putExtra("kPoi_url", S63); } else { intent.putExtra("map_view_type", 10); } intent.putExtra("kwebmap_slat", (double) f15); intent.putExtra("kwebmap_lng", (double) f16); if (i15 > 0) { intent.putExtra("kwebmap_scale", i15); } intent.putExtra("kPoiName", S6); intent.putExtra("Kwebmap_locaion", S62); sv3.b.j(msgHandler.f167360d, FirebaseAnalytics.b.LOCATION, ".ui.RedirectUI", intent, null); msgHandler.q5(msgHandler.f167361e, "open_location:ok", null); return true; } catch (Exception unused2) { msgHandler.q5(msgHandler.f167361e, "open_location:invalid_coordinate", null); return true; } } public static boolean e5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); if (WebViewExDeviceMgr.d().f164835b || WebViewExDeviceLanMgr.d().f166783b) { String str = (String) h1Var.f247819a.get("deviceId"); String str2 = (String) h1Var.f247819a.get("type"); Log.i("MicroMsg.MsgHandler", "doGetWXDeviceTicket, deviceId : %s, type : %s", str, str2); if (Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "deviceId or type is null"); msgHandler.q5(h1Var, "getWXDeviceTicket:fail_wrongParams", null); } else { try { String D6 = msgHandler.D6(h1Var); q qVar = q.INSTANCE; qVar.g(11533, "" + D6, "getWXDeviceTicket"); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "getWXDeviceTicket:fail_UsernameError", null); } else { ExDeviceGetTicketEvent exDeviceGetTicketEvent = new ExDeviceGetTicketEvent(); exDeviceGetTicketEvent.f62336d.f62340c = Util.getInt(str2, 0); ExDeviceGetTicketEvent.a aVar = exDeviceGetTicketEvent.f62336d; aVar.f62338a = D6; aVar.f62339b = str; aVar.f62341d = h1Var.f247857c; exDeviceGetTicketEvent.callback = new q2(msgHandler, exDeviceGetTicketEvent, h1Var); exDeviceGetTicketEvent.asyncPublish(Looper.getMainLooper()); } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "getWXDeviceTicket failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "getWXDeviceTicket:fail_exception", null); } } } else { Log.e("MicroMsg.MsgHandler", "getWXDeviceTicket not init"); msgHandler.q5(h1Var, "getWXDeviceTicket:fail_notInit", null); } return true; } public static boolean f(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!msgHandler.N6("nfcConnect", 4002, new Bundle())) { return true; } msgHandler.q5(h1Var, "nfcConnect:connect", null); return true; } public static boolean f0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doGetWebPayCheckoutCounterRequst start"); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); intent.putExtra("appId", walletJsapiData.f173486d); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); intent.putExtra("url", walletJsapiData.f173497r); intent.putExtra("pay_channel", walletJsapiData.f173501v); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "wallet", ".pay.ui.WalletLoanRepaymentUI", intent, 28, false); return true; } public static boolean f1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("clearCookie"); Log.i("MicroMsg.MsgHandler", "clearflag = %s", str); boolean z15 = !Util.isNullOrNil(str) && str.equalsIgnoreCase("true"); if (msgHandler.f167378x != null) { Bundle bundle = new Bundle(); bundle.putBoolean("clear_webview_cache_clear_cookie", z15); try { msgHandler.f167378x.v6(TXLiteAVCode.WARNING_IGNORE_UPSTREAM_FOR_AUDIENCE, bundle); msgHandler.q5(h1Var, "clearWebviewCache:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "clear webview cache fail : %s", e15.getMessage()); msgHandler.q5(h1Var, "clearWebviewCache:fail", null); } } else { msgHandler.q5(h1Var, "clearWebviewCache:fail", null); } return true; } public static boolean f2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); Log.i("MicroMsg.MsgHandler", "doChooseInvoiceTitle"); Intent intent = new Intent(); intent.putExtra("req_scene", 0); intent.putExtra("launch_from_webview", true); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "address", ".ui.InvoiceListUI", intent, 56, false); } return true; } public static boolean f3(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); try { str = msgHandler.f167378x.getCurrentUrl(); } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "doPrivateCommonApi exception in get currentUrl" + e15.getMessage()); str = ""; } boolean z15 = true; boolean z16 = false; Log.i("MicroMsg.MsgHandler", "doPrivateCommonApi currentUrl %s", str); MMFragmentActivity mMFragmentActivity = null; String str2 = null; if (msgHandler.H6(str) || str.equals("liteapp://")) { d4 d4Var = new d4(msgHandler); lh4.m.g(h1Var, "msg"); Object obj = h1Var.f247819a.get("opcode"); String str3 = obj instanceof String ? (String) obj : null; if (str3 == null) { str3 = ""; } if (Util.isNullOrNil(str3)) { d4Var.f167637a.q5(h1Var, "privateCommonApi:fail, opcode is empty", null); } else { if (lh4.m.b(str3, "selectContact")) { Log.i("MicroMsg.PrivateCommonApiHandler", "doPrivateSelectContact"); Context context = d4Var.f167637a.f167360d; Intent intent = new Intent(); intent.putExtra("list_type", 15); intent.putExtra("titile", hy3.h.a(context).getString(R.string.f366946fx)); intent.putExtra("list_attr", com.tencent.mm.ui.contact.t1.g(2, 16384, 1, 4)); if (context instanceof MMActivity) { sv3.b.v((MMActivity) context, ".ui.contact.SelectContactUI", intent, 65, d4Var.f167637a); } else { Log.e("MicroMsg.PrivateCommonApiHandler", "doSelectContact invalid context"); d4Var.f167637a.q5(h1Var, "selectContact:fail", null); } } else if (lh4.m.b(str3, "changeQQLoginType")) { Log.i("MicroMsg.PrivateCommonApiHandler", "doPrivateChangeQQLoginType"); Object obj2 = h1Var.f247819a.get("pwdMd5"); String str4 = obj2 instanceof String ? (String) obj2 : null; if (str4 == null) { d4Var.f167637a.q5(h1Var, "changeQQLoginType:fail", xg4.r0.f(new wg4.l("err_msg", "fail"), new wg4.l("errContent", "password empty"))); } else { Object obj3 = h1Var.f247819a.get("loginName"); if (obj3 instanceof String) { str2 = (String) obj3; } if (str2 == null) { str2 = ""; } LifecycleScope lifecycleScope = d60.z.b().f198580f.f198555e; if (lifecycleScope != null) { gk4.h.d(lifecycleScope, null, null, new a4(str4, d4Var, h1Var, str2, null), 3, null); } } } else if (lh4.m.b(str3, "forgetPassword")) { Log.i("MicroMsg.PrivateCommonApiHandler", "doPrivateForgetPassword"); LifecycleScope lifecycleScope2 = d60.z.b().f198580f.f198555e; if (lifecycleScope2 != null) { gk4.h.d(lifecycleScope2, null, null, new b4(d4Var, h1Var, null), 3, null); } } else if (lh4.m.b(str3, "setWXAlias")) { Log.i("MicroMsg.PrivateCommonApiHandler", "doPrivateSetWxAlias"); String c15 = u0.c(); if (c15 == null || c15.length() == 0) { z16 = true; } if (!z16) { d4Var.f167637a.q5(h1Var, "fail", xg4.q0.b(new wg4.l("err_msg", "fail"))); } else { MsgHandler msgHandler2 = d4Var.f167637a; Context context2 = msgHandler2.f167360d; if (context2 == null) { msgHandler2.q5(h1Var, "fail", xg4.q0.b(new wg4.l("err_msg", "fail"))); } else { Intent intent2 = new Intent(); intent2.setClassName(context2, "com.tencent.mm.plugin.setting.ui.setting.SettingsModifyAliasUI"); Context context3 = d4Var.f167637a.f167360d; if (context3 instanceof MMFragmentActivity) { mMFragmentActivity = (MMFragmentActivity) context3; } if (mMFragmentActivity != null) { sv3.b.w(mMFragmentActivity, "com.tencent.mm.plugin.setting.ui.setting.SettingsModifyAliasUI", intent2, 2, new c4(h1Var, d4Var)); } } } } else { d4Var.f167637a.q5(h1Var, "privateCommonApi:fail, opcode is invalid", null); } return z15; } z15 = false; return z15; } msgHandler.q5(h1Var, "privateCommonApi:fail access_denied", null); return false; } public static boolean f4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); try { String str = (String) msgHandler.f167361e.f247819a.get("link"); o1.a(msgHandler.f167361e.f247862h, msgHandler.u6(com.tencent.mm.plugin.appbrand.jsapi.share.n.NAME), str, null); if (str == null || str.length() == 0) { Log.e("MicroMsg.MsgHandler", "naerCheckIn fail, link is null"); msgHandler.q5(msgHandler.f167361e, "timeline_check_in:fail", null); return true; } msgHandler.d7((String) msgHandler.f167361e.f247819a.get("desc")); Log.i("MicroMsg.MsgHandler", "naerCheckIn, img_url = " + ((String) msgHandler.f167361e.f247819a.get("img_url")) + ", title = " + ((String) msgHandler.f167361e.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)) + ", desc = " + ((String) msgHandler.f167361e.f247819a.get("desc"))); String str2 = (String) msgHandler.f167361e.f247819a.get("img_width"); String str3 = (String) msgHandler.f167361e.f247819a.get("img_height"); String str4 = (String) msgHandler.f167361e.f247819a.get("link"); String C6 = msgHandler.C6(str4); Log.i("MicroMsg.MsgHandler", "naerCheckIn, rawUrl:[%s], shareUrl:[%s]", str4, C6); String str5 = (String) msgHandler.f167361e.f247819a.get("type"); msgHandler.f167361e.f247819a.get("desc"); String str6 = (String) msgHandler.f167361e.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str7 = (String) msgHandler.f167361e.f247819a.get("img_url"); int i15 = -1; try { i15 = Integer.valueOf(str2).intValue(); Integer.valueOf(str3); } catch (Exception unused) { } Intent intent = new Intent(); intent.putExtra("Ksnsupload_width", i15); intent.putExtra("Ksnsupload_height", i15); intent.putExtra("Ksnsupload_link", C6); intent.putExtra("Ksnsupload_title", str6); intent.putExtra("Ksnsupload_imgurl", str7); intent.putExtra("Ksnsupload_type", 1); if (!Util.isNullOrNil(str5) && str5.equals("music")) { intent.putExtra("ksnsis_music", true); } if (!Util.isNullOrNil(str5) && str5.equals("video")) { intent.putExtra("ksnsis_video", true); } float f15 = Util.getFloat((String) h1Var.f247819a.get("latitude"), 0.0f); float f16 = Util.getFloat((String) h1Var.f247819a.get("longitude"), 0.0f); intent.putExtra("kpoi_id", (String) msgHandler.f167361e.f247819a.get("poiId")); intent.putExtra("kpoi_name", (String) msgHandler.f167361e.f247819a.get("poiName")); intent.putExtra("Kpoi_address", (String) msgHandler.f167361e.f247819a.get("poiAddress")); intent.putExtra("k_lat", f15); intent.putExtra("k_lng", f16); sv3.b.j(msgHandler.f167360d, "sns", ".ui.SnsUploadUI", intent, null); msgHandler.f167375u = false; return false; } catch (Exception unused2) { return true; } } public static boolean f5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; msgHandler.getClass(); if (h1Var.f247819a.containsKey("connType")) { str = (String) h1Var.f247819a.get("connType"); } else { str = ""; } if (str.equalsIgnoreCase("lan")) { if (!WebViewExDeviceLanMgr.d().f166783b) { Log.e("MicroMsg.MsgHandler", "getWXDeviceInfos not init"); msgHandler.q5(h1Var, "getWXDeviceInfos:fail_notInit", null); } else { try { String D6 = msgHandler.D6(h1Var); q qVar = q.INSTANCE; qVar.g(11533, "" + D6, "getWXDeviceInfos"); Log.i("MicroMsg.MsgHandler", "doGetWXDeviceInfos, %s", D6); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "getWXDeviceInfos:fail_UsernameError", null); } else { ExDeviceGetLanDeviceInfosEvent exDeviceGetLanDeviceInfosEvent = new ExDeviceGetLanDeviceInfosEvent(); ExDeviceGetLanDeviceInfosEvent.a aVar = exDeviceGetLanDeviceInfosEvent.f62321d; aVar.f62324b = D6; aVar.f62323a = msgHandler.f167360d; exDeviceGetLanDeviceInfosEvent.publish(); ExDeviceGetLanDeviceInfosEvent.b bVar = exDeviceGetLanDeviceInfosEvent.f62322e; if (!bVar.f62325a || bVar.f62326b == null) { msgHandler.q5(h1Var, "getWXDeviceInfos:fail", null); } else { HashMap hashMap = new HashMap(); hashMap.put("jsapi_callback_json_special_key", "deviceInfos"); hashMap.put("deviceInfos", exDeviceGetLanDeviceInfosEvent.f62322e.f62326b.toString()); msgHandler.q5(h1Var, "getWXDeviceInfos:ok", hashMap); } } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "getWXDeviceInfos failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "getWXDeviceInfos:fail_exception", null); } } } else if (!WebViewExDeviceMgr.d().f164835b) { Log.e("MicroMsg.MsgHandler", "getWXDeviceInfos not init"); msgHandler.q5(h1Var, "getWXDeviceInfos:fail_notInit", null); } else { try { String D62 = msgHandler.D6(h1Var); q qVar2 = q.INSTANCE; qVar2.g(11533, "" + D62, "getWXDeviceInfos"); Log.i("MicroMsg.MsgHandler", "doGetWXDeviceInfos, %s", D62); if (Util.isNullOrNil(D62)) { msgHandler.q5(h1Var, "getWXDeviceInfos:fail_UsernameError", null); } else { ExDeviceGetDeviceInfosEvent exDeviceGetDeviceInfosEvent = new ExDeviceGetDeviceInfosEvent(); ExDeviceGetDeviceInfosEvent.a aVar2 = exDeviceGetDeviceInfosEvent.f62315d; aVar2.f62318b = D62; aVar2.f62317a = msgHandler.f167360d; exDeviceGetDeviceInfosEvent.publish(); ExDeviceGetDeviceInfosEvent.b bVar2 = exDeviceGetDeviceInfosEvent.f62316e; if (!bVar2.f62319a || bVar2.f62320b == null) { msgHandler.q5(h1Var, "getWXDeviceInfos:fail", null); } else { HashMap hashMap2 = new HashMap(); hashMap2.put("jsapi_callback_json_special_key", "deviceInfos"); hashMap2.put("deviceInfos", exDeviceGetDeviceInfosEvent.f62316e.f62320b.toString()); msgHandler.q5(h1Var, "getWXDeviceInfos:ok", hashMap2); } } } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "getWXDeviceInfos failed : %s", e16.getMessage()); msgHandler.q5(h1Var, "getWXDeviceInfos:fail_exception", null); return true; } } return true; } public static boolean g(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!msgHandler.N6("nfcTransceive", 4002, new Bundle())) { return true; } Bundle bundle = new Bundle(); bundle.putString("apdu", (String) h1Var.f247819a.get("apdu")); Bundle M6 = msgHandler.M6("nfcTransceive", WearableStatusCodes.DATA_ITEM_TOO_LARGE, bundle); if (M6 != null) { HashMap hashMap = new HashMap(); hashMap.put("result", M6.getString("result")); Log.i("MicroMsg.MsgHandler", "[NFC] nfcTransceive result : " + M6.getString("result")); msgHandler.q5(h1Var, "nfcTransceive:ok", hashMap); return true; } Log.w("MicroMsg.MsgHandler", "[NFC] nfcGetId callback fail!"); msgHandler.q5(h1Var, "nfcTransceive:fail", null); return true; } public static boolean g0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "setSnsObjectDescList"); String f15 = p.f(map, "data"); boolean d15 = p.d(map, "append", false); FTSWebViewLogic.e eVar = new FTSWebViewLogic.e(null); eVar.f164257d = f15; eVar.f164258e = d15; ThreadPool.post(eVar, "append_music_list_task"); return false; } public static boolean g2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; Bundle bundle = new Bundle(); if (((HashMap) h1Var.f247819a).containsKey(FFmpegMetadataRetriever.METADATA_KEY_TITLE)) { bundle.putString(FFmpegMetadataRetriever.METADATA_KEY_TITLE, (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)); } if (((HashMap) h1Var.f247819a).containsKey("desc")) { bundle.putString("desc", (String) ((HashMap) h1Var.f247819a).get("desc")); } if (((HashMap) h1Var.f247819a).containsKey("items")) { bundle.putString("items", (String) ((HashMap) h1Var.f247819a).get("items")); } try { msgHandler.f167378x.callback(133, bundle); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } HashMap hashMap = new HashMap(); hashMap.put("actionSheetId", Integer.valueOf(bundle.getInt("actionSheetId"))); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); return true; } public static boolean g3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); int i15 = Util.getInt((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 0); int i16 = Util.getInt((String) h1Var.f247819a.get("check_alive_type"), 1); float f15 = Util.getFloat((String) h1Var.f247819a.get("light_threshold"), 4.0f); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); Bundle bundle = new Bundle(); bundle.putInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 6); bundle.putInt("k_from_scene", i15); bundle.putString("key_function_name", h1Var.f247863i); bundle.putInt("key_business_type", 1); bundle.putInt("check_alive_type", i16); bundle.putString("k_ticket", (String) h1Var.f247819a.get("user_ticket")); bundle.putFloat("mLight_threshold", f15); bundle.putString("appId", (String) h1Var.f247819a.get("appId")); bundle.putString("request_verify_pre_info", (String) h1Var.f247819a.get("jsonStr")); RequestInternalFaceVerifyEvent requestInternalFaceVerifyEvent = new RequestInternalFaceVerifyEvent(); RequestInternalFaceVerifyEvent.a aVar = requestInternalFaceVerifyEvent.f64272d; aVar.f64274a = msgHandler.f167360d; aVar.f64276c = 64; aVar.f64275b = bundle; requestInternalFaceVerifyEvent.publish(); Log.i("MicroMsg.MsgHandler", "start face detect event result: %b", Boolean.valueOf(requestInternalFaceVerifyEvent.f64273e.f64277a)); if (!requestInternalFaceVerifyEvent.f64273e.f64277a) { ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(null); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", kp3.a.a(requestInternalFaceVerifyEvent.f64273e.f64278b)); } return true; } public static boolean g4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); Log.i("MicroMsg.MsgHandler", "doOpenWXCredit JSOAUTH"); if (!(msgHandler.f167360d instanceof MMActivity)) { return true; } WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); walletJsapiData.f173500u = 6; ((u00.f) j.c(u00.f.class)).v9((MMActivity) msgHandler.f167360d, walletJsapiData, 9, msgHandler); return true; } public static boolean g5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; int i15; Exception e15; msgHandler.getClass(); if (h1Var.f247819a.containsKey("connType")) { str = (String) h1Var.f247819a.get("connType"); } else { str = ""; } if (str.equalsIgnoreCase("lan")) { if (!WebViewExDeviceLanMgr.d().f166783b) { Log.e("MicroMsg.MsgHandler", "sendDataToWXDevice not init"); msgHandler.q5(h1Var, "sendDataToWXDevice:fail_notInit", null); return true; } String str2 = (String) h1Var.f247819a.get("deviceId"); String str3 = (String) h1Var.f247819a.get("base64Data"); Log.i("MicroMsg.MsgHandler", "doSendDataToWXDevice, deviceId : %s, has data : %s", str2, Boolean.valueOf(!Util.isNullOrNil(str3))); if (Util.isNullOrNil(str2) || str3 == null) { Log.e("MicroMsg.MsgHandler", "deviceId or data is null"); msgHandler.q5(h1Var, "sendDataToWXDevice:fail_wrongParams", null); return true; } try { String D6 = msgHandler.D6(h1Var); q qVar = q.INSTANCE; Object[] objArr = new Object[2]; objArr[0] = "" + D6; try { objArr[1] = "sendDataToWXDevice"; qVar.g(11533, objArr); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "sendDataToWXDevice:fail_UsernameError", null); return true; } ExDeviceSendDataToLanDeviceEvent exDeviceSendDataToLanDeviceEvent = new ExDeviceSendDataToLanDeviceEvent(); ExDeviceSendDataToLanDeviceEvent.a aVar = exDeviceSendDataToLanDeviceEvent.f62412d; aVar.f62414a = D6; aVar.f62416c = str3; aVar.f62415b = str2; exDeviceSendDataToLanDeviceEvent.publish(); if (exDeviceSendDataToLanDeviceEvent.f62413e.f62417a) { msgHandler.q5(h1Var, "sendDataToWXDevice:ok", null); return true; } msgHandler.q5(h1Var, "sendDataToWXDevice:fail", null); return true; } catch (Exception e16) { e15 = e16; i15 = 1; Object[] objArr2 = new Object[i15]; objArr2[0] = e15.getMessage(); Log.e("MicroMsg.MsgHandler", "sendDataToWXDevice failed : %s", objArr2); msgHandler.q5(h1Var, "sendDataToWXDevice:fail_exception", null); return true; } } catch (Exception e17) { e15 = e17; i15 = 1; Object[] objArr22 = new Object[i15]; objArr22[0] = e15.getMessage(); Log.e("MicroMsg.MsgHandler", "sendDataToWXDevice failed : %s", objArr22); msgHandler.q5(h1Var, "sendDataToWXDevice:fail_exception", null); return true; } } else if (!WebViewExDeviceMgr.d().f164835b) { Log.e("MicroMsg.MsgHandler", "sendDataToWXDevice not init"); msgHandler.q5(h1Var, "sendDataToWXDevice:fail_notInit", null); return true; } else { String str4 = (String) h1Var.f247819a.get("deviceId"); String str5 = (String) h1Var.f247819a.get("base64Data"); Log.i("MicroMsg.MsgHandler", "doSendDataToWXDevice, deviceId : %s, has data : %s", str4, Boolean.valueOf(!Util.isNullOrNil(str5))); if (Util.isNullOrNil(str4) || str5 == null) { Log.e("MicroMsg.MsgHandler", "deviceId or data is null"); msgHandler.q5(h1Var, "sendDataToWXDevice:fail_wrongParams", null); return true; } try { String D62 = msgHandler.D6(h1Var); q.INSTANCE.g(11533, "" + D62, "sendDataToWXDevice"); if (Util.isNullOrNil(D62)) { msgHandler.q5(h1Var, "sendDataToWXDevice:fail_UsernameError", null); return true; } ExDeviceSendDataToDeviceEvent exDeviceSendDataToDeviceEvent = new ExDeviceSendDataToDeviceEvent(); ExDeviceSendDataToDeviceEvent.a aVar2 = exDeviceSendDataToDeviceEvent.f62406d; aVar2.f62408a = D62; aVar2.f62410c = Base64.decode(str5, 0); exDeviceSendDataToDeviceEvent.f62406d.f62409b = str4; exDeviceSendDataToDeviceEvent.publish(); if (exDeviceSendDataToDeviceEvent.f62407e.f62411a) { msgHandler.q5(h1Var, "sendDataToWXDevice:ok", null); return true; } msgHandler.q5(h1Var, "sendDataToWXDevice:fail", null); return true; } catch (Exception e18) { Log.e("MicroMsg.MsgHandler", "sendDataToWXDevice failed : %s", e18.getMessage()); msgHandler.q5(h1Var, "sendDataToWXDevice:fail_exception", null); return true; } } } public static boolean h(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (msgHandler.N6("nfcBatchTransceive", 4002, new Bundle())) { Bundle bundle = new Bundle(); bundle.putString("apdus", (String) h1Var.f247819a.get("apdus")); bundle.putBoolean("breakIfFail", Util.getInt((String) h1Var.f247819a.get("breakIfFail"), 1) == 1); Bundle M6 = msgHandler.M6("nfcBatchTransceive", WearableStatusCodes.INVALID_TARGET_NODE, bundle); if (M6 != null) { HashMap hashMap = new HashMap(); hashMap.put("result", M6.getString("result")); Log.i("MicroMsg.MsgHandler", "[NFC] nfcBatchTransceive result : " + M6.getString("result")); msgHandler.q5(h1Var, "nfcBatchTransceive:ok", hashMap); } else { Log.w("MicroMsg.MsgHandler", "[NFC] nfcGetId callback fail!"); msgHandler.q5(h1Var, "nfcBatchTransceive:fail", null); } } return true; } /* JADX WARNING: Code restructure failed: missing block: B:7:0x005b, code lost: if (r2 == false) goto L_0x00c4; */ public static boolean h0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { List<n> list; msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "clickSnsMusicPlayButton %s", map.toString()); boolean d15 = p.d(map, "isLoop", false); boolean d16 = p.d(map, "needStartMusicUI", false); String f15 = p.f(map, "snsid"); int nullAsInt = Util.nullAsInt(((HashMap) map).get("webview_instance_id"), -1); if (d.c()) { n b15 = d.b(); if (b15.f12704d == 9 && b15.f12705e.equals(f15)) { d.k(); } } if (d16 && (list = fTSWebViewLogic.f164239o) != null) { MMHandlerThread.postToMainThread(new bh0.b(list, true)); } TimeLineObject fJ0 = ((d63.v) j.c(d63.v.class)).fJ0(p.f(map, "objectXmlDesc")); d60.z.h(); n AC0 = ((jv.b) j.c(jv.b.class)).AC0(d60.z.s().f198643d, fJ0, 9); AC0.A = d15; MMHandlerThread.postToMainThread(new bh0.h(AC0)); if (d16) { Intent intent = new Intent(); intent.putExtra("key_scene", 4); intent.setFlags(268435456); sv3.b.j(MMApplicationContext.getContext(), "music", ".ui.MusicMainUI", intent, null); } fTSWebViewLogic.f164231d.add(Integer.valueOf(nullAsInt)); return false; } /* JADX WARNING: Removed duplicated region for block: B:31:0x00c4 A[Catch:{ all -> 0x0102 }] */ /* JADX WARNING: Removed duplicated region for block: B:39:0x00ff */ /* JADX WARNING: Removed duplicated region for block: B:47:0x011c A[Catch:{ all -> 0x0123 }] */ /* JADX WARNING: Removed duplicated region for block: B:53:0x016b */ /* JADX WARNING: Removed duplicated region for block: B:54:0x0171 */ public static boolean h1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; String str2; int i15; int i16; int i17; Bundle v65; Throwable th5; Bundle v66; msgHandler.getClass(); if (h1Var.f247819a.get("pay_packageName") == null) { str = ""; } else { str = (String) h1Var.f247819a.get("pay_packageName"); } String nullAs = Util.nullAs(str, ""); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); Log.i("MicroMsg.MsgHandler", "doPay %s", nullAs); if (msgHandler.f167360d instanceof MMActivity) { WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); walletJsapiData.A = 1; walletJsapiData.f173499t = 3; if (!h1Var.f247819a.containsKey("cookie") || Util.isNullOrNil((String) h1Var.f247819a.get("cookie"))) { try { Bundle v67 = msgHandler.f167378x.v6(301, Bundle.EMPTY); if (v67 != null && !Util.isNullOrNil(v67.getString("key_h5pay_cookie"))) { walletJsapiData.f173496q = v67.getString("key_h5pay_cookie"); } } catch (Throwable th6) { Log.printErrStackTrace("MicroMsg.MsgHandler", th6, "AC_GET_H5_PAY_COOKIE", new Object[0]); } } else { walletJsapiData.f173496q = (String) h1Var.f247819a.get("cookie"); } try { Bundle v68 = msgHandler.f167378x.v6(300, Bundle.EMPTY); if (v68 == null) { str2 = null; walletJsapiData.H = str2; try { v66 = msgHandler.f167378x.v6(303, Bundle.EMPTY); if (v66 == null) { String string = v66.getString("msgUsername"); String string2 = v66.getString("geta8key_username"); int i18 = v66.getInt("geta8key_scene"); i15 = ((w00.e) j.c(w00.e.class)).Gn0(string); if (i18 == 2 || i18 == 38) { i16 = ((w00.e) j.c(w00.e.class)).Zp(string); } else { try { i16 = ((w00.e) j.c(w00.e.class)).Hj(string2); } catch (Throwable th7) { th5 = th7; Log.printErrStackTrace("MicroMsg.MsgHandler", th5, "AC_GET_PAY_CHAT_TYPE", new Object[0]); i16 = 0; walletJsapiData.I = i16; walletJsapiData.J = i15; v65 = msgHandler.f167378x.v6(304, Bundle.EMPTY); if (v65 != null) { } i17 = 0; walletJsapiData.f173502w = i17; Log.i("MicroMsg.MsgHandler", "doPay, pay channel: %s, scene: %s, adUxInfo: %s, chatType: %d, codeScene: %d", Integer.valueOf(walletJsapiData.f173501v), Integer.valueOf(walletJsapiData.f173499t), str2, Integer.valueOf(walletJsapiData.I), Integer.valueOf(walletJsapiData.f173502w)); if (!((u00.f) j.c(u00.f.class)).bh0((MMActivity) msgHandler.f167360d, walletJsapiData, 4, msgHandler)) { } return true; } } } else { i16 = 0; i15 = 0; } } catch (Throwable th8) { th5 = th8; i15 = 0; Log.printErrStackTrace("MicroMsg.MsgHandler", th5, "AC_GET_PAY_CHAT_TYPE", new Object[0]); i16 = 0; walletJsapiData.I = i16; walletJsapiData.J = i15; v65 = msgHandler.f167378x.v6(304, Bundle.EMPTY); if (v65 != null) { } i17 = 0; walletJsapiData.f173502w = i17; Log.i("MicroMsg.MsgHandler", "doPay, pay channel: %s, scene: %s, adUxInfo: %s, chatType: %d, codeScene: %d", Integer.valueOf(walletJsapiData.f173501v), Integer.valueOf(walletJsapiData.f173499t), str2, Integer.valueOf(walletJsapiData.I), Integer.valueOf(walletJsapiData.f173502w)); if (!((u00.f) j.c(u00.f.class)).bh0((MMActivity) msgHandler.f167360d, walletJsapiData, 4, msgHandler)) { } return true; } walletJsapiData.I = i16; walletJsapiData.J = i15; try { v65 = msgHandler.f167378x.v6(304, Bundle.EMPTY); if (v65 != null) { i17 = v65.getInt("code_scene"); walletJsapiData.f173502w = i17; Log.i("MicroMsg.MsgHandler", "doPay, pay channel: %s, scene: %s, adUxInfo: %s, chatType: %d, codeScene: %d", Integer.valueOf(walletJsapiData.f173501v), Integer.valueOf(walletJsapiData.f173499t), str2, Integer.valueOf(walletJsapiData.I), Integer.valueOf(walletJsapiData.f173502w)); if (!((u00.f) j.c(u00.f.class)).bh0((MMActivity) msgHandler.f167360d, walletJsapiData, 4, msgHandler)) { msgHandler.q5(h1Var, "get_brand_wcpay_request:fail", null); } else { q.INSTANCE.g(10593, walletJsapiData.f173498s, walletJsapiData.f173486d, Long.valueOf(Util.getLong((String) h1Var.f247819a.get("message_id"), 0)), Integer.valueOf(Util.getInt((String) h1Var.f247819a.get("message_index"), 0)), Integer.valueOf(walletJsapiData.f173499t), walletJsapiData.f173497r); msgHandler.K = msgHandler.o5(h1Var); } } } catch (Throwable th9) { Log.printErrStackTrace("MicroMsg.MsgHandler", th9, "AC_GET_PAY_CODE_SCENE", new Object[0]); } i17 = 0; walletJsapiData.f173502w = i17; Log.i("MicroMsg.MsgHandler", "doPay, pay channel: %s, scene: %s, adUxInfo: %s, chatType: %d, codeScene: %d", Integer.valueOf(walletJsapiData.f173501v), Integer.valueOf(walletJsapiData.f173499t), str2, Integer.valueOf(walletJsapiData.I), Integer.valueOf(walletJsapiData.f173502w)); if (!((u00.f) j.c(u00.f.class)).bh0((MMActivity) msgHandler.f167360d, walletJsapiData, 4, msgHandler)) { } } else { str2 = v68.getString(w.j.f187151q); walletJsapiData.H = str2; v66 = msgHandler.f167378x.v6(303, Bundle.EMPTY); if (v66 == null) { } walletJsapiData.I = i16; walletJsapiData.J = i15; v65 = msgHandler.f167378x.v6(304, Bundle.EMPTY); if (v65 != null) { } i17 = 0; walletJsapiData.f173502w = i17; Log.i("MicroMsg.MsgHandler", "doPay, pay channel: %s, scene: %s, adUxInfo: %s, chatType: %d, codeScene: %d", Integer.valueOf(walletJsapiData.f173501v), Integer.valueOf(walletJsapiData.f173499t), str2, Integer.valueOf(walletJsapiData.I), Integer.valueOf(walletJsapiData.f173502w)); if (!((u00.f) j.c(u00.f.class)).bh0((MMActivity) msgHandler.f167360d, walletJsapiData, 4, msgHandler)) { } } } catch (Throwable th10) { Log.printErrStackTrace("MicroMsg.MsgHandler", th10, "AC_GET_AD_UX_INFO_FOR_JSAPI_PAY", new Object[0]); } } return true; } public static boolean h2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; if (h1Var.f247819a.containsKey("actionSheetId")) { int safeParseInt = Util.safeParseInt((String) h1Var.f247819a.get("actionSheetId")); Bundle bundle = new Bundle(); bundle.putInt("actionSheetId", safeParseInt); try { msgHandler.f167378x.callback(134, bundle); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } } msgHandler.q5(h1Var, "", null); return true; } public static boolean h3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); HashMap hashMap = new HashMap(); if (!((r21.d) d60.z.q(r21.d.class)).yc(5)) { hashMap.put("err_desc", "abtest closed"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); return false; } else if (!h1Var.f247858d.has("url")) { hashMap.put("err_desc", "invalid url"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); return false; } else if (!h1Var.f247858d.has("item_show_type")) { hashMap.put("err_desc", "invalid item_show_type"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); return false; } else if (!h1Var.f247858d.has(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE)) { hashMap.put("err_desc", "invalid scene"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); return false; } else if (!h1Var.f247858d.has("openType")) { hashMap.put("err_desc", "invalid openType"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); return false; } else { try { h1Var.f247858d.getInt("item_show_type"); Bundle bundle = new Bundle(); bundle.putString("url", h1Var.f247858d.getString("url")); bundle.putInt("item_show_type", h1Var.f247858d.getInt("item_show_type")); bundle.putInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, h1Var.f247858d.getInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE)); bundle.putInt("subscene", h1Var.f247858d.optInt("subscene", 10000)); bundle.putInt("openType", h1Var.f247858d.getInt("openType")); bundle.putString("biz_video_channel_session_id", h1Var.f247858d.optString("channelSessionId")); Bundle v65 = msgHandler.f167378x.v6(200, bundle); if (v65.getBoolean("success")) { msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); } else { hashMap.put("err_desc", Util.nullAs(v65.getString("desc"), "")); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); } return true; } catch (JSONException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "doOpenWebViewUseFastload", new Object[0]); hashMap.put("err_desc", e15.toString()); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); return false; } catch (RemoteException e16) { Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "doOpenWebViewUseFastload", new Object[0]); hashMap.put("err_desc", e16.toString()); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", hashMap); return false; } } } public static boolean h4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { Bundle bundle = msgHandler.f167367n; if (bundle == null) { Log.e("MicroMsg.MsgHandler", "doSendServiceAppMsg fail, jsapiArgs is null"); msgHandler.q5(h1Var, "send_service_app_msg:fail", null); } else if (!bundle.getBoolean("isFromService", false)) { Log.e("MicroMsg.MsgHandler", "doSendServiceAppMsg fail, not from service"); msgHandler.q5(h1Var, "send_service_app_msg:fail", null); } else { String string = msgHandler.f167367n.getString("jsapi_args_appid"); String string2 = msgHandler.f167367n.getString("sendAppMsgToUserName"); o1.a(h1Var.f247862h, false, null, string); WXMediaMessage w55 = msgHandler.w5(h1Var, false); msgHandler.f167362f = w55; if (w55 == null) { Log.e("MicroMsg.MsgHandler", "doSendServiceAppMsg fail, appmsg is null"); msgHandler.q5(h1Var, "send_service_app_msg:fail", null); } else { com.tencent.mm.pluginsdk.model.app.j appInfo = ((ln.l) j.c(ln.l.class)).getAppInfo(string); if (Util.isNullOrNil(string2)) { Log.e("MicroMsg.MsgHandler", "toUser is null"); msgHandler.q5(h1Var, "send_service_app_msg:fail", null); } else { String str = (String) h1Var.f247819a.get("img_url"); q.INSTANCE.g(10923, 13, appInfo.field_appId, 1, string2); if (Util.isNullOrNil(str)) { msgHandler.Y5(appInfo, "", string2, str, null, null, null, null); Context context = msgHandler.f167360d; i14.j.T(context, hy3.h.a(context).getString(R.string.f367601y7)); msgHandler.q5(h1Var, "send_service_app_msg:ok", null); msgHandler.v5(h1Var); } else { Context context2 = msgHandler.f167360d; ((yt.h) j.c(yt.h.class)).JA(str, new l0(msgHandler, i14.j.Q(context2, "", hy3.h.a(context2).getString(R.string.f367605yb), true, true, new k0(msgHandler, str, h1Var)), appInfo, string2, str, h1Var)); } } } } return true; } public static boolean h5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); if (!WebViewExDeviceMgr.d().f164835b) { Log.e("MicroMsg.MsgHandler", "setSendDataDirection not init"); msgHandler.q5(h1Var, "setSendDataDirection:fail_notInit", null); } else { try { String str = (String) h1Var.f247819a.get("deviceId"); String str2 = (String) h1Var.f247819a.get(TencentLocation.EXTRA_DIRECTION); Log.i("MicroMsg.MsgHandler", "setSendDataDirection, deviceId = %s, direction = %s", str, str2); if (!Util.isNullOrNil(str)) { if (!Util.isNullOrNil(str2)) { int i15 = Util.getInt(str2, 0); String D6 = msgHandler.D6(h1Var); q qVar = q.INSTANCE; qVar.g(11533, "" + D6, "setSendDataDirection"); if (Util.isNullOrNil(D6)) { msgHandler.q5(h1Var, "setSendDataDirection:fail_UsernameError", null); } else { ExDeviceSetSendDataDirectionEvent exDeviceSetSendDataDirectionEvent = new ExDeviceSetSendDataDirectionEvent(); ExDeviceSetSendDataDirectionEvent.a aVar = exDeviceSetSendDataDirectionEvent.f62438d; aVar.f62440a = str; aVar.f62441b = i15; aVar.f62442c = false; exDeviceSetSendDataDirectionEvent.publish(); if (exDeviceSetSendDataDirectionEvent.f62439e.f62443a) { msgHandler.q5(h1Var, "setSendDataDirection:ok", null); } else { msgHandler.q5(h1Var, "setSendDataDirection:fail", null); } } } } Log.e("MicroMsg.MsgHandler", "wrong args"); msgHandler.q5(h1Var, "setSendDataDirection:fail_wrongParams", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "setSendDataDirection failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "setSendDataDirection:fail_exception", null); } } return true; } public static boolean i(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Bundle bundle = new Bundle(); if (!msgHandler.N6("nfcGetId", 4002, bundle)) { return true; } Bundle M6 = msgHandler.M6("nfcGetId", WearableStatusCodes.ASSET_UNAVAILABLE, bundle); if (M6 != null) { HashMap hashMap = new HashMap(); hashMap.put("id", M6.getString("id")); Log.i("MicroMsg.MsgHandler", "[NFC] nfcGetId result : " + M6.getString("id")); msgHandler.q5(h1Var, "nfcGetId:ok", hashMap); return true; } Log.w("MicroMsg.MsgHandler", "[NFC] nfcGetId callback fail!"); msgHandler.q5(h1Var, "nfcGetId:fail", null); return true; } public static boolean i0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doAddCustomMenuItems start"); boolean z15 = false; if (h1Var.f247819a.containsKey("hideMenu")) { int i15 = Util.getInt((String) h1Var.f247819a.get("hideMenu"), 0); Log.e("MicroMsg.MsgHandler", "doAddCustomMenuItems hideMenu=" + i15); if (i15 == 1) { z15 = true; } if (msgHandler.F6(z15)) { msgHandler.q5(h1Var, "doAddCustomMenuItems:ok", null); } else { msgHandler.q5(h1Var, "doAddCustomMenuItems:fail", null); } } else { msgHandler.F6(false); String str = (String) h1Var.f247819a.get("itemList"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "doAddCustomMenuItems fail: key or title must not be null"); msgHandler.q5(h1Var, "doAddCustomMenuItems:params error", null); } else { try { JSONArray jSONArray = new JSONArray(str); ArrayList<String> arrayList = new ArrayList<>(); ArrayList<String> arrayList2 = new ArrayList<>(); int length = jSONArray.length(); for (int i16 = 0; i16 < length; i16++) { JSONObject optJSONObject = jSONArray.optJSONObject(i16); if (optJSONObject != null) { String optString = optJSONObject.optString("key"); String optString2 = optJSONObject.optString(FFmpegMetadataRetriever.METADATA_KEY_TITLE); if (Util.isNullOrNil(optString) || Util.isNullOrNil(FFmpegMetadataRetriever.METADATA_KEY_TITLE)) { Log.e("MicroMsg.MsgHandler", "key or title is null,ignore item: " + i16); } else { arrayList.add(optString); arrayList2.add(optString2); } } } if (arrayList.size() > 0) { Bundle bundle = new Bundle(); bundle.putStringArrayList("keys", arrayList); bundle.putStringArrayList("titles", arrayList2); try { msgHandler.f167378x.IH(bundle); msgHandler.q5(h1Var, "doAddCustomMenuItems:ok", null); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); Log.e("MicroMsg.MsgHandler", "doAddCustomMenuItems:fail"); msgHandler.q5(h1Var, "doAddCustomMenuItems:fail", null); } } } catch (JSONException unused) { Log.e("MicroMsg.MsgHandler", "doAddCustomMenuItems eroor, parse itemList to jsonarray error"); msgHandler.q5(h1Var, "doAddCustomMenuItems:params parse error", null); } } } return true; } public static boolean i1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "hy: start soter auth"); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); Bundle b15 = h1.b(h1Var.f247819a); Intent intent = new Intent(); intent.setClassName(msgHandler.f167360d, "com.tencent.mm.plugin.soter.ui.SoterAuthenticationUIWC"); intent.putExtras(b15); intent.putExtra("key_soter_fp_mp_scene", 0); String o65 = msgHandler.o6(msgHandler.s6()); if (o65 == null) { o65 = (String) h1Var.f247819a.get("appId"); } intent.putExtra("key_app_id", o65); ((MMActivity) msgHandler.f167360d).startActivityForResult(intent, 38); return true; } public static boolean i2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; try { Bundle bundle = new Bundle(); bundle.putString(FFmpegMetadataRetriever.METADATA_KEY_TITLE, p.f(h1Var.f247819a, FFmpegMetadataRetriever.METADATA_KEY_TITLE)); bundle.putString("icon", p.f(h1Var.f247819a, "icon")); bundle.putInt("duration", p.e(h1Var.f247819a, "duration", 500)); bundle.putInt("mask", p.e(h1Var.f247819a, "mask", 0)); msgHandler.f167378x.callback(148, bundle); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } msgHandler.q5(h1Var, "showSearchToast:succ", null); return true; } public static boolean i3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) ((HashMap) h1Var.f247819a).get("action"); Log.i("MicroMsg.MsgHandler", "doHandleHaoKanAction action=%s", str); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "handleHaokanAction:fail action is empty", null); } else { String str2 = (String) ((HashMap) h1Var.f247819a).get("server_data"); String str3 = (String) ((HashMap) h1Var.f247819a).get("client_data"); if ("submitMsgToTL".equals(str)) { HaoKanActionEvent haoKanActionEvent = new HaoKanActionEvent(); HaoKanActionEvent.a aVar = haoKanActionEvent.f63265d; aVar.f63266a = str2; aVar.f63267b = str3; haoKanActionEvent.publish(); msgHandler.q5(h1Var, "handleHaokanAction:ok", null); return true; } else if ("update_recommend_status".equals(str)) { String str4 = (String) ((HashMap) h1Var.f247819a).get("url"); o.a aVar2 = msgHandler.F.f334829a.get(str4); if (aVar2 == null) { aVar2 = new o.a(); } aVar2.f334830a = Util.getInt((String) ((HashMap) h1Var.f247819a).get("permission"), 0); aVar2.f334831b = Util.getInt((String) ((HashMap) h1Var.f247819a).get("recommend"), -1); aVar2.f334832c = Util.nullAs((String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE), aVar2.f334832c); wq3.o oVar = msgHandler.F; oVar.f334829a.put(h2.a(str4), aVar2); Log.i("MicroMsg.MsgHandler", "doHandleHaoKanAction Permission=%d,Recommend=%d", Integer.valueOf(aVar2.f334830a), Integer.valueOf(aVar2.f334831b)); msgHandler.q5(h1Var, "handleHaokanAction:ok", null); try { msgHandler.f167378x.v6(203, null); return true; } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "doHandleHaoKanAction e=%s", e15.getMessage()); return true; } } else if ("writeComment".equals(str)) { Bundle bundle = new Bundle(); bundle.putString("style", (String) ((HashMap) h1Var.f247819a).get("style")); bundle.putString("action", str); try { msgHandler.f167378x.v6(202, bundle); } catch (RemoteException e16) { Log.e("MicroMsg.MsgHandler", "doHandleHaoKanAction e=%s", e16.getMessage()); } msgHandler.q5(h1Var, "handleHaokanAction:ok", null); return true; } else if ("closeComment".equals(str)) { Bundle bundle2 = new Bundle(); bundle2.putString("action", str); try { msgHandler.f167378x.v6(202, bundle2); } catch (RemoteException e17) { Log.e("MicroMsg.MsgHandler", "doHandleHaoKanAction e=%s", e17.getMessage()); } msgHandler.q5(h1Var, "handleHaokanAction:ok", null); return true; } else if ("jumpToWow".equals(str)) { if (!((wg3.i) j.c(wg3.i.class)).DA0()) { msgHandler.q5(h1Var, "handleHaokanAction:fail_entrance_not_open", null); return true; } ((wg3.i) j.c(wg3.i.class)).Qx0(msgHandler.f167360d, TingProto.TingReportContext.CURRLISTENIDFINDERFEED_FIELD_NUMBER, new Bundle(), (String) ((HashMap) h1Var.f247819a).get("extParams"), h1Var); msgHandler.q5(h1Var, "handleHaokanAction:ok", null); return true; } else if (a5.NAME.equals(str)) { if (!((wg3.i) j.c(wg3.i.class)).DA0()) { msgHandler.q5(h1Var, "handleHaokanAction:fail_entrance_not_open", null); return true; } ((wg3.i) j.c(wg3.i.class)).Q5(msgHandler.f167360d); msgHandler.q5(h1Var, "handleHaokanAction:ok", null); return true; } else if ("openRecommend".equals(str)) { if (!((wg3.i) j.c(wg3.i.class)).DA0()) { msgHandler.q5(h1Var, "handleHaokanAction:fail_entrance_not_open", null); return true; } String str5 = (String) ((HashMap) h1Var.f247819a).get("extParams"); int i15 = 100; try { i15 = Integer.parseInt(((HashMap) h1Var.f247819a).get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE).toString()); } catch (Exception unused) { } Log.i("MicroMsg.MsgHandler", "scene :%s", Integer.valueOf(i15)); ((wg3.i) j.c(wg3.i.class)).Qx0(msgHandler.f167360d, i15, new Bundle(), str5, h1Var); msgHandler.q5(h1Var, "handleHaokanction:ok", null); return true; } else if ("shareToGoodLook".equals(str)) { try { msgHandler.f167378x.v6(205, null); } catch (RemoteException e18) { Log.e("MicroMsg.MsgHandler", "shareToGoodLook e=%s", e18.getMessage()); } msgHandler.q5(h1Var, "handleHaokanction:ok", null); return true; } else if ("turnOnHaoKanSwitch".equals(str)) { ((e00.m) j.c(e00.m.class)).TY(); msgHandler.q5(h1Var, "handleHaokanAction:ok", null); return true; } else { if ("submitMsgToPhotosTL".equals(str)) { String str6 = (String) ((HashMap) h1Var.f247819a).get("data"); if (Util.isNullOrNil(str6)) { msgHandler.q5(h1Var, "handleHaokanAction:fail data is empty.", null); return true; } ((gw.f) j.c(gw.f.class)).getService().jq(str6, new b1(msgHandler, h1Var)); } msgHandler.q5(h1Var, "handleHaokanAction:fail, action not support", null); } } return false; } public static boolean i4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; msgHandler.getClass(); String str2 = ""; try { str = msgHandler.f167378x.getCurrentUrl(); } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "JSOAUTH exception in get currentUrl" + e15.getMessage()); str = str2; } Log.i("MicroMsg.MsgHandler", "currentUrl %s", str); if (msgHandler.H6(str) || str.equals("liteapp://")) { HashMap hashMap = new HashMap(); try { Log.i("MicroMsg.MsgHandler", rp0.a.NAME); str2 = Base64.encodeToString(msgHandler.l7(), 0); } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "device info get error %s", e16.getMessage()); Log.printErrStackTrace("MicroMsg.MsgHandler", e16, str2, new Object[0]); } hashMap.put("securityInfo", str2); msgHandler.q5(h1Var, "mmsf0001:ok", hashMap); } else { msgHandler.q5(h1Var, "system:access_denied", null); } return true; } public static boolean i5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("gameId"); if (Util.isNullOrNil(str)) { str = (String) h1Var.f247819a.get("appId"); } Log.i("MicroMsg.MsgHandler", "openGameDetail, appid = %s", str); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "openGameDetail:fail", null); } else { GameCenterOperationEvent gameCenterOperationEvent = new GameCenterOperationEvent(); GameCenterOperationEvent.a aVar = gameCenterOperationEvent.f63034d; aVar.f63037c = str; aVar.f63040f = 5; aVar.f63035a = 2; aVar.f63036b = msgHandler.f167360d; gameCenterOperationEvent.publish(); msgHandler.q5(h1Var, "openGameDetail:ok", null); } return true; } public static boolean j(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Bundle bundle = new Bundle(); if (!msgHandler.N6("nfcGetInfo", 4002, bundle)) { return true; } Bundle M6 = msgHandler.M6("nfcGetInfo", WearableStatusCodes.WIFI_CREDENTIAL_SYNC_NO_CREDENTIAL_FETCHED, bundle); if (M6 != null) { HashMap hashMap = new HashMap(); hashMap.put("info", M6.getString("info")); msgHandler.q5(h1Var, "nfcGetInfo:ok", hashMap); return true; } Log.w("MicroMsg.MsgHandler", "[NFC] nfcGetInfo callback fail!"); msgHandler.q5(h1Var, "nfcGetInfo:fail", null); return true; } public static boolean j0(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); String str2 = (String) h1Var.f247819a.get("useridlist"); String str3 = (String) h1Var.f247819a.get("chatname"); String str4 = (String) h1Var.f247819a.get("chatscene"); try { str = msgHandler.f167378x.getCurrentUrl(); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "exception in get currentUrl %s", e15.getMessage()); str = null; } String nullAsNil = Util.nullAsNil(msgHandler.f167382z.c(str)); LinkedList linkedList = new LinkedList(); String[] split = str2.split(";"); if (split == null || split.length <= 0) { msgHandler.q5(h1Var, "openEnterpriseChat:fail", null); return false; } for (String str5 : split) { linkedList.add(str5); } cg0.h ZN0 = bg0.w0.ZN0(); p3 p3Var = new p3(msgHandler, h1Var, str4); ZN0.getClass(); d60.z.l().f198618b.f(new cg0.t(nullAsNil, str3, linkedList, p3Var)); return true; } public static boolean j1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "hy: do get soter support"); GetIsSupportSoterEvent getIsSupportSoterEvent = new GetIsSupportSoterEvent(); getIsSupportSoterEvent.publish(); HashMap hashMap = new HashMap(); hashMap.put("support_mode", Integer.valueOf(getIsSupportSoterEvent.f63176d.f63177a)); msgHandler.q5(h1Var, "getSupportSoter", hashMap); msgHandler.c7(h1Var, 0, getIsSupportSoterEvent.f63176d.f63177a == 1 ? 1 : 0); return true; } public static boolean j2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; try { Bundle bundle = new Bundle(); bundle.putString(FFmpegMetadataRetriever.METADATA_KEY_TITLE, p.f(h1Var.f247819a, FFmpegMetadataRetriever.METADATA_KEY_TITLE)); bundle.putInt("mask", p.e(h1Var.f247819a, "mask", 0)); msgHandler.f167378x.callback(149, bundle); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } msgHandler.q5(h1Var, "showSearchLoading:succ", null); return true; } /* JADX WARNING: Removed duplicated region for block: B:53:0x0187 A[Catch:{ Exception -> 0x01ab }] */ /* JADX WARNING: Removed duplicated region for block: B:55:0x0190 A[Catch:{ Exception -> 0x01ab }] */ /* JADX WARNING: Removed duplicated region for block: B:61:0x019c A[Catch:{ Exception -> 0x01ab }] */ /* JADX WARNING: Removed duplicated region for block: B:67:0x021a */ /* JADX WARNING: Removed duplicated region for block: B:68:0x0222 */ /* JADX WARNING: Removed duplicated region for block: B:71:0x022d */ /* JADX WARNING: Removed duplicated region for block: B:74:0x0236 */ /* JADX WARNING: Removed duplicated region for block: B:76:0x0239 */ /* JADX WARNING: Removed duplicated region for block: B:77:0x023b */ /* JADX WARNING: Removed duplicated region for block: B:80:0x0244 */ /* JADX WARNING: Removed duplicated region for block: B:81:0x024e */ /* JADX WARNING: Removed duplicated region for block: B:84:0x02f3 */ public static boolean j3(MsgHandler msgHandler, h1 h1Var) { String str; String str2; byte[] bArr; boolean z15; r21.d dVar; int i15; String c15; String str3; String string; i iVar; Context context; Bundle bundle; boolean z16; boolean z17; String str4; m mVar = msgHandler.f167378x; lh4.m.g(h1Var, "msg"); Object obj = h1Var.f247819a.get("action"); lh4.m.e(obj, "null cannot be cast to non-null type kotlin.String"); String str5 = (String) obj; int i16 = 0; Log.i("MicroMsg.WebViewNativePageUtil", "doHandleMPPageAction action=%s", str5); if (Util.isNullOrNil(str5)) { msgHandler.q5(h1Var, "handleMPPageAction:fail action is empty", null); } else { new Bundle().putString("action", str5); int i17 = -1; if (lh4.m.b("paySuccess", str5)) { Map<String, Object> map = h1Var.f247819a; lh4.m.f(map, "msg.params"); if (map.containsKey("fullUrl")) { Object obj2 = h1Var.f247819a.get("fullUrl"); lh4.m.e(obj2, "null cannot be cast to non-null type kotlin.String"); str4 = (String) obj2; } else { Object obj3 = h1Var.f247819a.get("url"); lh4.m.e(obj3, "null cannot be cast to non-null type kotlin.String"); str4 = (String) obj3; } Map<String, Object> map2 = h1Var.f247819a; lh4.m.f(map2, "msg.params"); if (map2.containsKey("itemShowType")) { Object obj4 = h1Var.f247819a.get("itemShowType"); lh4.m.e(obj4, "null cannot be cast to non-null type kotlin.String"); i17 = Util.getInt((String) obj4, -1); } if (Util.isNullOrNil(str4)) { msgHandler.q5(h1Var, "handleMPPageAction:fail_url_is_null", null); return true; } ((r21.d) d60.z.q(r21.d.class)).px(str4, i17); msgHandler.q5(h1Var, "handleMPPageAction:ok", null); return true; } else if (lh4.m.b(ConstValue.INIT_CONFIG_KEY_ISGPVERSION, str5)) { HashMap hashMap = new HashMap(); if (ChannelUtil.isGPVersion() || u0.y()) { i16 = 1; } hashMap.put("GPVersion", Integer.valueOf(i16)); msgHandler.q5(h1Var, "handleMPPageAction:ok", hashMap); return true; } else if (lh4.m.b("requestTeenModeTemporaryVisit", str5)) { s0 s0Var = (s0) d60.z.q(s0.class); boolean isTeenMode = s0Var != null ? s0Var.isTeenMode() : false; if (!isTeenMode) { Log.w("MicroMsg.WebViewNativePageUtil", "requestTeenModeTemporaryVisit isTeenMode = " + isTeenMode); msgHandler.q5(h1Var, h1Var.f247863i + ":fail,not int teen mode now", null); } else { int i18 = Util.getInt((String) h1Var.f247819a.get("type"), 0); String str6 = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str7 = (String) h1Var.f247819a.get("currentUrl"); String str8 = (String) h1Var.f247819a.get("coverUrl"); r21.d dVar2 = (r21.d) d60.z.q(r21.d.class); boolean z18 = dVar2 != null && dVar2.g50(str7); if (mVar != null) { try { bundle = mVar.v6(206, new Bundle()); } catch (Exception e15) { Log.e("MicroMsg.WebViewNativePageUtil", "get info ex " + e15.getMessage()); str = null; } } else { bundle = null; } lh4.m.e(bundle, "null cannot be cast to non-null type android.os.Bundle"); if (!z18) { str7 = bundle.getString("webview_current_url"); } if (str6 != null) { if (!y.n(str6)) { z16 = false; if (z16) { str6 = bundle.getString("webpageTitle"); } if (str8 != null) { if (!y.n(str8)) { z17 = false; if (z17) { str8 = bundle.getString("thumbUrl"); } str = bundle.getString("thumbPath"); l.b bVar = new l.b(); bVar.f76854f = str6; bVar.f76930y = str8; bVar.f76870j = str7; str2 = "<fromusr>" + u0.r() + "</fromusr>" + "<type>" + 49 + "</type>" + "<content>" + Util.escapeStringForXml(l.b.t(bVar, null, null)) + "</content>"; lh4.m.f(str2, "sb.toString()"); if (Util.isNullOrNil(str8)) { z15 = false; bArr = u1.N(str, 0, -1); } else { z15 = false; bArr = null; } dVar = (r21.d) d60.z.q(r21.d.class); if (dVar != null) { if (dVar.g50(str7)) { z15 = true; } } i15 = z15 ? 2 : 3; c15 = wq3.c.f334779a.c(str7); if (z18) { str3 = msgHandler.f167360d.getString(R.string.l7c); } else { str3 = msgHandler.f167360d.getString(R.string.l7d); } lh4.m.f(str3, "if (isMpArticle) {\n …quest_out_link)\n }"); Log.i("MicroMsg.WebViewNativePageUtil", "requestTeenModeTemporaryVisit type=" + i18 + ", bizType=" + i15 + ", bizKey=" + c15 + " title=" + str6 + ", coverUrl=" + str8 + ", thumbPath=" + str + ", currentUrl=" + str7); string = msgHandler.f167360d.getString(R.string.f367640za); lh4.m.f(string, "msgHandler.context.getSt…libmmui.R.string.app_url)"); iVar = (i) j.c(i.class); context = msgHandler.f167360d; lh4.m.e(context, "null cannot be cast to non-null type android.app.Activity"); if (!iVar.SG((Activity) context, i18, i15, c15, str3, string + Util.nullAsNil(str6), str2, bArr, new yp3.f(i18, msgHandler, h1Var, mVar), new yp3.g(msgHandler, h1Var))) { msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); } } } z17 = true; if (z17) { } str = bundle.getString("thumbPath"); l.b bVar2 = new l.b(); bVar2.f76854f = str6; bVar2.f76930y = str8; bVar2.f76870j = str7; str2 = "<fromusr>" + u0.r() + "</fromusr>" + "<type>" + 49 + "</type>" + "<content>" + Util.escapeStringForXml(l.b.t(bVar2, null, null)) + "</content>"; lh4.m.f(str2, "sb.toString()"); if (Util.isNullOrNil(str8)) { } dVar = (r21.d) d60.z.q(r21.d.class); if (dVar != null) { } if (z15) { } c15 = wq3.c.f334779a.c(str7); if (z18) { } lh4.m.f(str3, "if (isMpArticle) {\n …quest_out_link)\n }"); Log.i("MicroMsg.WebViewNativePageUtil", "requestTeenModeTemporaryVisit type=" + i18 + ", bizType=" + i15 + ", bizKey=" + c15 + " title=" + str6 + ", coverUrl=" + str8 + ", thumbPath=" + str + ", currentUrl=" + str7); string = msgHandler.f167360d.getString(R.string.f367640za); lh4.m.f(string, "msgHandler.context.getSt…libmmui.R.string.app_url)"); iVar = (i) j.c(i.class); context = msgHandler.f167360d; lh4.m.e(context, "null cannot be cast to non-null type android.app.Activity"); if (!iVar.SG((Activity) context, i18, i15, c15, str3, string + Util.nullAsNil(str6), str2, bArr, new yp3.f(i18, msgHandler, h1Var, mVar), new yp3.g(msgHandler, h1Var))) { } } } z16 = true; if (z16) { } if (str8 != null) { } z17 = true; if (z17) { } str = bundle.getString("thumbPath"); l.b bVar22 = new l.b(); bVar22.f76854f = str6; bVar22.f76930y = str8; bVar22.f76870j = str7; str2 = "<fromusr>" + u0.r() + "</fromusr>" + "<type>" + 49 + "</type>" + "<content>" + Util.escapeStringForXml(l.b.t(bVar22, null, null)) + "</content>"; lh4.m.f(str2, "sb.toString()"); if (Util.isNullOrNil(str8)) { } dVar = (r21.d) d60.z.q(r21.d.class); if (dVar != null) { } if (z15) { } c15 = wq3.c.f334779a.c(str7); if (z18) { } lh4.m.f(str3, "if (isMpArticle) {\n …quest_out_link)\n }"); Log.i("MicroMsg.WebViewNativePageUtil", "requestTeenModeTemporaryVisit type=" + i18 + ", bizType=" + i15 + ", bizKey=" + c15 + " title=" + str6 + ", coverUrl=" + str8 + ", thumbPath=" + str + ", currentUrl=" + str7); string = msgHandler.f167360d.getString(R.string.f367640za); lh4.m.f(string, "msgHandler.context.getSt…libmmui.R.string.app_url)"); iVar = (i) j.c(i.class); context = msgHandler.f167360d; lh4.m.e(context, "null cannot be cast to non-null type android.app.Activity"); if (!iVar.SG((Activity) context, i18, i15, c15, str3, string + Util.nullAsNil(str6), str2, bArr, new yp3.f(i18, msgHandler, h1Var, mVar), new yp3.g(msgHandler, h1Var))) { } } return true; } else { msgHandler.q5(h1Var, "handleMPPageAction:fail, action not support", null); } } return false; } public static boolean j4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str2 = (String) h1Var.f247819a.get("singer"); String str3 = (String) h1Var.f247819a.get("epname"); String str4 = (String) h1Var.f247819a.get("coverImgUrl"); String str5 = (String) h1Var.f247819a.get("dataUrl"); String str6 = (String) h1Var.f247819a.get("lowbandUrl"); String str7 = (String) h1Var.f247819a.get("webUrl"); String str8 = (String) h1Var.f247819a.get("appId"); String str9 = (String) h1Var.f247819a.get("mid"); if (str4 == null) { str4 = ""; } o1.a(h1Var.f247862h, false, null, str8); Log.i("MicroMsg.MsgHandler", "title : %s, singer : %s, epName : %s, coverImgUrl : %s, dataUrl : %s, lowbandUrl : %s, webUrl : %s, appid : %s, mid:%s", str, str2, str3, str4, str5, str6, str7, str8, str9); if (Util.isNullOrNil(str) || Util.isNullOrNil(str2) || Util.isNullOrNil(str3) || Util.isNullOrNil(str4) || Util.isNullOrNil(str6) || Util.isNullOrNil(str5) || Util.isNullOrNil(str7)) { msgHandler.q5(h1Var, "playMusic:fail", null); } else { d.k(); d.j(bh0.o.a(7, str4, str, str2, str7, str6, str5, "" + str5.hashCode(), z80.b.E(), bc2.a.a() + str4.hashCode(), str3, str8)); msgHandler.q5(h1Var, "playMusic:ok", null); } return true; } public static boolean j5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.q5(h1Var, "gameCenterJump:not support", null); return true; } public static boolean k(MsgHandler msgHandler, h1 h1Var) { boolean z15; msgHandler.getClass(); boolean z16 = false; if (Util.getInt((String) h1Var.f247819a.get("isShowNfcSwitchGuide"), 1) == 1) { z15 = true; } else { z15 = false; } NfcAdapter defaultAdapter = NfcAdapter.getDefaultAdapter(msgHandler.f167360d); if (defaultAdapter == null) { msgHandler.q5(h1Var, "nfcCheckState:nfc_not_support", null); } else { int intValue = ((Integer) d60.z.s().i().f(w1.a.I2, 0)).intValue(); int intValue2 = ((Integer) d60.z.s().i().f(w1.a.J2, 0)).intValue(); if (intValue == 2 || (intValue == 0 && intValue2 != 1)) { z16 = true; } if (z16) { if (!z15) { msgHandler.q5(h1Var, "nfcCheckState:nfc_wechat_setting_off", null); } else { MMHandlerThread.postToMainThread(new m3(msgHandler, h1Var)); } } else if (defaultAdapter.isEnabled()) { msgHandler.q5(h1Var, "nfcCheckState:nfc_ok", null); } else if (!z15) { msgHandler.q5(h1Var, "nfcCheckState:nfc_off", null); } else { MMHandlerThread.postToMainThread(new o3(msgHandler, h1Var)); } } return true; } public static boolean k0(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); try { str = msgHandler.f167378x.getCurrentUrl(); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "exception in get currentUrl %s", e15.getMessage()); str = null; } String nullAsNil = Util.nullAsNil(msgHandler.f167382z.c(str)); if (Util.isNullOrNil(nullAsNil)) { msgHandler.q5(h1Var, "openEnterpriseContact:fail", null); } com.tencent.mm.plugin.webview.model.y yVar = new com.tencent.mm.plugin.webview.model.y(nullAsNil, str, h1Var.f247819a); d60.z.d().a(1393, new s3(msgHandler, h1Var, msgHandler)); d60.z.d().f(yVar); Context context = msgHandler.f167360d; msgHandler.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(msgHandler.f167360d).getString(R.string.f367656zq), true, true, new t3(msgHandler, yVar)); return true; } public static boolean k1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); String str = (String) h1Var.f247819a.get("appId"); if (msgHandler.f167367n != null && TextUtils.isEmpty(str)) { str = msgHandler.f167367n.getString("jsapi_args_appid"); } intent.putExtra("appId", str); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); intent.putExtra("url", msgHandler.s6()); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "wallet", ".bind.ui.WalletUnbindBankCardProxyUI", intent, 39, false); return true; } public static boolean k2(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); HashMap hashMap = new HashMap(); com.tencent.mm.pluginsdk.ui.tools.l0 l0Var = (com.tencent.mm.pluginsdk.ui.tools.l0) ((dx.j) j.c(dx.j.class)).cF0(msgHandler.f167360d); hashMap.put("heading", Integer.valueOf(l0Var.f173283b)); hashMap.put("pitch", Integer.valueOf(l0Var.f173284c)); Log.i("MicroMsg.MsgHandler", "doGetHeadingAndPitch, heading=[%s], pitch=[%s]", Integer.valueOf(l0Var.f173283b), Integer.valueOf(l0Var.f173284c)); msgHandler.q5(h1Var, "get_heading_and_pitch:ok", hashMap); return true; } public static boolean k3(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); if (h1Var.f247819a.get("pay_packageName") == null) { str = ""; } else { str = (String) h1Var.f247819a.get("pay_packageName"); } Log.i("MicroMsg.MsgHandler", "do request joint payment: %s", Util.nullAs(str, "")); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); if (msgHandler.f167360d instanceof MMActivity) { WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); walletJsapiData.A = 1; walletJsapiData.G = true; Log.i("MicroMsg.MsgHandler", "doPay, pay channel: %s, scene: %s", Integer.valueOf(walletJsapiData.f173501v), Integer.valueOf(walletJsapiData.f173499t)); if (!((u00.f) j.c(u00.f.class)).bh0((MMActivity) msgHandler.f167360d, walletJsapiData, 68, msgHandler)) { msgHandler.q5(h1Var, "get_brand_wcpay_request:fail", null); } else { long j15 = Util.getLong((String) h1Var.f247819a.get("message_id"), 0); int i15 = Util.getInt((String) h1Var.f247819a.get("message_index"), 0); q.INSTANCE.g(10593, walletJsapiData.f173498s, walletJsapiData.f173486d, Long.valueOf(j15), Integer.valueOf(i15), Integer.valueOf(walletJsapiData.f173499t), walletJsapiData.f173497r); msgHandler.K = msgHandler.o5(h1Var); } } return true; } public static boolean k4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doGetTransferMoneyRequest JSOAUTH"); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); if (!(msgHandler.f167360d instanceof MMActivity)) { return true; } WebViewEventReporter.f165408g.a(wq3.m.CALL_FOR_PAY); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); intent.putExtra(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 3); intent.putExtra("appId", walletJsapiData.f173486d); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); intent.putExtra("url", walletJsapiData.f173497r); intent.putExtra("pay_channel", walletJsapiData.f173501v); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "remittance", ".ui.RemittanceAdapterUI", intent, 11); return true; } public static boolean k5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); int i15 = Util.getInt((String) h1Var.f247819a.get("downloaderType"), 0); int i16 = Util.getInt((String) h1Var.f247819a.get("showAllLog"), 0); GameDebugSettingEvent gameDebugSettingEvent = new GameDebugSettingEvent(); GameDebugSettingEvent.a aVar = gameDebugSettingEvent.f63048d; aVar.f63049a = i15; aVar.f63050b = i16; aVar.f63051c = (String) h1Var.f247819a.get("countryCode"); gameDebugSettingEvent.publish(); msgHandler.q5(h1Var, "setGameDebugConfig:ok", null); return true; } public static boolean l(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); if (!((jt.b) j.c(jt.b.class)).tn0()) { msgHandler.z5(h1Var, jsapiPermissionWrapper); return true; } ((jt.b) j.c(jt.b.class)).i80(msgHandler.f167360d, com.tencent.mm.model.gdpr.a.f78328f, (String) h1Var.f247819a.get("username"), new h1(msgHandler, h1Var, jsapiPermissionWrapper)); return true; } public static boolean l0(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); try { str = msgHandler.f167378x.getCurrentUrl(); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "exception in get currentUrl %s", e15.getMessage()); str = null; } String nullAsNil = Util.nullAsNil(msgHandler.f167382z.c(str)); if (Util.isNullOrNil(nullAsNil)) { msgHandler.q5(h1Var, "selectEnterpriseContact:fail", null); } h1Var.f247819a.put("groupId", ""); h1Var.f247819a.put(AppMeasurement.Param.TIMESTAMP, ""); h1Var.f247819a.put("nonceStr", ""); h1Var.f247819a.put("signature", ""); JSONObject jSONObject = new JSONObject(); try { JSONArray jSONArray = new JSONArray((String) h1Var.f247819a.get("type")); jSONObject.put("fromDepartmentId", Util.safeParseInt((String) h1Var.f247819a.get("fromDepartmentId"))); jSONObject.put("mode", (String) h1Var.f247819a.get("mode")); jSONObject.put("type", jSONArray); String str2 = (String) h1Var.f247819a.get("selectedDepartmentIds"); if (str2 != null) { jSONObject.put("selectedDepartmentIds", new JSONArray(str2)); } String str3 = (String) h1Var.f247819a.get("selectedUserIds"); if (str3 != null) { jSONObject.put("selectedUserIds", new JSONArray(str3)); } h1Var.f247819a.put("params", jSONObject); } catch (JSONException e16) { Log.e("MicroMsg.MsgHandler", "doSelectEnterpriseContact ex: %s", e16.getMessage()); } catch (NumberFormatException e17) { Log.e("MicroMsg.MsgHandler", "doSelectEnterpriseContact ex: %s", e17.getMessage()); } com.tencent.mm.plugin.webview.model.y yVar = new com.tencent.mm.plugin.webview.model.y(nullAsNil, str, h1Var.f247819a); u3 u3Var = new u3(msgHandler, h1Var, msgHandler); d60.z.d().a(1393, u3Var); d60.z.d().f(yVar); Context context = msgHandler.f167360d; msgHandler.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(msgHandler.f167360d).getString(R.string.f367656zq), true, true, new v3(msgHandler, yVar, u3Var)); return true; } /* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */ public static boolean l1(MsgHandler msgHandler, h1 h1Var) { int i15; msgHandler.f167375u = false; Bundle bundle = new Bundle(); try { int i16 = Util.getInt(h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE).toString().trim(), 0); bundle.putInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, i16); Log.i("MicroMsg.MsgHandler", "doExposePreparation scene:%d", Integer.valueOf(i16)); if (-1 == bundle.getInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE)) { msgHandler.q5(h1Var, "doExposePreparation fail:unknown scene", null); } else { Bundle v65 = msgHandler.f167378x.v6(73, bundle); HashMap hashMap = new HashMap(); if (!v65.isEmpty()) { if (i16 == 45) { i15 = 0; } else if (i16 == 51) { i15 = 0; hashMap.put("newMsgId", v65.getString("newMsgId")); hashMap.put("msgType", Integer.valueOf(v65.getInt("msgType"))); } else if (i16 == 61) { i15 = 0; hashMap.put("realChatUser", ((f5) j.c(f5.class)).o(v65.getString("username"))); } else if (i16 == 76) { i15 = 0; hashMap.put("realChatUser", ((qd3.w) j.c(qd3.w.class)).o(v65.getString("username"))); } else if (i16 != 990) { switch (i16) { default: switch (i16) { case 33: hashMap.put("newMsgId", v65.getString("newMsgId")); case 34: hashMap.put("webviewImg", v65.getString("webviewImg")); hashMap.put("webviewHtml", v65.getString("webviewHtml")); hashMap.put("content", v65.getString("url")); Log.i("MicroMsg.MsgHandler", "content = " + v65.getString("url")); case 35: case 36: case 37: case 38: case 39: break; default: i15 = 0; Log.w("MicroMsg.MsgHandler", "unknown scene %d", Integer.valueOf(i16)); break; } case 1: case 2: case 3: case 4: case 5: case 6: case 7: i15 = 0; break; } } else { i15 = 0; hashMap.put("realChatUser", v65.getString("realChatUser")); } hashMap.put("username", v65.getString("username")); JSONArray jSONArray = new JSONArray(); ArrayList<String> stringArrayList = v65.getStringArrayList("proof"); if (stringArrayList != null) { int size = stringArrayList.size(); for (int i17 = i15; i17 < size; i17++) { jSONArray.put(stringArrayList.get(i17)); } } if (!hashMap.containsKey("content")) { hashMap.put("content", jSONArray.toString()); } msgHandler.q5(h1Var, "doExposePreparation ok", hashMap); } else { msgHandler.q5(h1Var, "doExposePreparation fail", null); } } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "doExposePreparation exception " + e15.getMessage()); msgHandler.q5(h1Var, "doExposePreparation fail", null); } return true; } public static boolean l2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; try { msgHandler.f167378x.callback(150, new Bundle()); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } msgHandler.q5(h1Var, "hideSearchLoading:succ", null); return true; } public static boolean l3(MsgHandler msgHandler, h1 h1Var) { Map<String, String> v65 = msgHandler.v6(h1Var); if (v65 == null) { return true; } ((u00.f) j.c(u00.f.class)).Sv0((MMActivity) msgHandler.f167360d, "selectPayment", v65, 69, msgHandler); return true; } public static boolean l4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { int i15; String str; String str2; msgHandler.getClass(); if (!u0.s()) { Log.e("MicroMsg.MsgHandler", "doWeibo fail, qq not binded"); p64.g n15 = i14.j.n(msgHandler.f167360d, R.string.lae, R.string.f367625yv, new m0(msgHandler), null); n15.setCancelable(false); n15.setOnDismissListener(new q0(msgHandler, h1Var)); } else { r4 Ga = ((s4) ((k0) d60.z.q(k0.class)).Cj0()).Ga("@t.qq.com"); if (Ga == null || Util.nullAsNil(Ga.f174987b).length() == 0) { p64.g o15 = i14.j.o(msgHandler.f167360d, R.string.lac, R.string.f367625yv, true, new a1(msgHandler)); o15.setCancelable(false); o15.setOnDismissListener(new e1(msgHandler, h1Var)); } else { String nullAs = Util.nullAs((String) h1Var.f247819a.get("type"), "40"); int i16 = 40; if (nullAs != null && nullAs.length() > 0) { try { i15 = Util.getInt(nullAs, 40); } catch (Exception unused) { } if (i15 == 11 || i15 == 20) { i16 = i15; } str = (String) h1Var.f247819a.get("content"); str2 = (String) h1Var.f247819a.get("url"); if (str == null || str.trim().length() == 0) { str = ""; } if (str2 != null || str2.length() == 0) { Log.e("MicroMsg.MsgHandler", "doWeibo fail, invalid argument, content = " + str + ", url = " + str2); msgHandler.q5(h1Var, "share_weibo:fail_-2", null); } else { o1.a(h1Var.f247862h, msgHandler.u6("shareWeibo"), null, null); String C6 = msgHandler.C6(str2); Intent intent = new Intent(msgHandler.f167360d, ShareToQQWeiboUI.class); intent.putExtra("type", i16); intent.putExtra("shortUrl", C6); intent.putExtra("content", str); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmStartActivityForResult(msgHandler, intent, 2); } } } i15 = 40; i16 = i15; str = (String) h1Var.f247819a.get("content"); str2 = (String) h1Var.f247819a.get("url"); str = ""; if (str2 != null) { } Log.e("MicroMsg.MsgHandler", "doWeibo fail, invalid argument, content = " + str + ", url = " + str2); msgHandler.q5(h1Var, "share_weibo:fail_-2", null); } } return true; } /* JADX WARNING: Removed duplicated region for block: B:25:0x00b0 */ /* JADX WARNING: Removed duplicated region for block: B:26:0x00b4 */ public static boolean l5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { int i15; int i16; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("sessionId"); String str2 = (String) h1Var.f247819a.get("sessionFrom"); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "startTempSession:fail_missing arguments", null); } else { if (str2 != null) { try { str2 = URLEncoder.encode(str2, "UTF-8"); } catch (UnsupportedEncodingException unused) { } } else { str2 = null; } Object obj = h1Var.f247819a.get("showType"); if (obj != null) { if (obj instanceof Integer) { i15 = ((Integer) obj).intValue(); } else if (obj instanceof String) { try { i15 = Util.getInt((String) obj, 0); } catch (NumberFormatException unused2) { } } i16 = Util.getInt(Util.nullAsNil((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE)), 0); String format = String.format("weixin://dl/business/tempsession/?username=%s&appid=%s&sessionFrom=%s&showtype=%s&scene=%s", str, msgHandler.f167382z.c(msgHandler.f167378x.getCurrentUrl()), Util.nullAsNil(str2), Integer.valueOf(i15), Integer.valueOf(i16)); Intent intent = new Intent("android.intent.action.VIEW"); intent.addCategory("android.intent.category.BROWSABLE"); intent.setData(Uri.parse(format)); if (i16 == 0) { intent.putExtra("translate_link_scene", i16); } else { intent.putExtra("translate_link_scene", 4); } Context context = msgHandler.f167360d; k30.a aVar = new k30.a(); aVar.c(intent); j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doOpenTempSession", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context.startActivity((Intent) aVar.a(0)); j30.a.e(context, "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doOpenTempSession", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); msgHandler.q5(h1Var, "startTempSession:ok", null); } i15 = 0; i16 = Util.getInt(Util.nullAsNil((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE)), 0); try { String format2 = String.format("weixin://dl/business/tempsession/?username=%s&appid=%s&sessionFrom=%s&showtype=%s&scene=%s", str, msgHandler.f167382z.c(msgHandler.f167378x.getCurrentUrl()), Util.nullAsNil(str2), Integer.valueOf(i15), Integer.valueOf(i16)); Intent intent2 = new Intent("android.intent.action.VIEW"); intent2.addCategory("android.intent.category.BROWSABLE"); intent2.setData(Uri.parse(format2)); if (i16 == 0) { } Context context2 = msgHandler.f167360d; k30.a aVar2 = new k30.a(); aVar2.c(intent2); j30.a.d(context2, aVar2.b(), "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doOpenTempSession", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context2.startActivity((Intent) aVar2.a(0)); j30.a.e(context2, "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doOpenTempSession", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); msgHandler.q5(h1Var, "startTempSession:ok", null); } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); msgHandler.q5(h1Var, "startTempSession:fail_exception", null); } } return true; } public static boolean m(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); try { Bundle v65 = msgHandler.f167378x.v6(5001, null); if (v65 != null) { int i15 = v65.getInt("webview_video_proxy_init"); Log.i("MicroMsg.MsgHandler", "int webview video proxy : %d", Integer.valueOf(i15)); HashMap hashMap = new HashMap(); hashMap.put("videoProxyInitResult", Integer.valueOf(i15)); if (i15 == 0) { f2 f2Var = f2.f165535c; f2Var.f165536a = msgHandler.f167378x; f2Var.f165537b = true; ArrayList<IDKey> arrayList = new ArrayList<>(); IDKey iDKey = new IDKey(); iDKey.SetID(TPOptionalID.OPTION_ID_BEFORE_LONG_SEEK_AV_PTS_ALIGN_MAX_THRESHOLD_MS); iDKey.SetKey(0); iDKey.SetValue(1); arrayList.add(iDKey); IDKey iDKey2 = new IDKey(); iDKey2.SetID(TPOptionalID.OPTION_ID_BEFORE_LONG_SEEK_AV_PTS_ALIGN_MAX_THRESHOLD_MS); iDKey2.SetKey(1); iDKey2.SetValue(1); arrayList.add(iDKey2); q.INSTANCE.a(arrayList, false); msgHandler.q5(h1Var, "videoProxyInit:ok", hashMap); } else { ArrayList<IDKey> arrayList2 = new ArrayList<>(); IDKey iDKey3 = new IDKey(); iDKey3.SetID(TPOptionalID.OPTION_ID_BEFORE_LONG_SEEK_AV_PTS_ALIGN_MAX_THRESHOLD_MS); iDKey3.SetKey(0); iDKey3.SetValue(1); arrayList2.add(iDKey3); IDKey iDKey4 = new IDKey(); iDKey4.SetID(TPOptionalID.OPTION_ID_BEFORE_LONG_SEEK_AV_PTS_ALIGN_MAX_THRESHOLD_MS); iDKey4.SetKey(2); iDKey4.SetValue(1); arrayList2.add(iDKey4); IDKey iDKey5 = new IDKey(); iDKey5.SetID(TPOptionalID.OPTION_ID_BEFORE_LONG_SEEK_AV_PTS_ALIGN_MAX_THRESHOLD_MS); Map<Integer, Integer> map = aq3.a.f7944b; Integer num = map.get(Integer.valueOf(i15)); if (num == null) { num = map.get(-1); } iDKey5.SetKey(num.intValue()); iDKey5.SetValue(1); arrayList2.add(iDKey5); q.INSTANCE.a(arrayList2, false); msgHandler.q5(h1Var, "videoProxyInit:fail", hashMap); } return false; } } catch (Exception e15) { Log.i("MicroMsg.MsgHandler", "doinit webview proxy failed : %s", e15.getMessage()); } msgHandler.q5(h1Var, "videoProxyInit:fail", null); return false; } public static boolean m0(MsgHandler msgHandler, h1 h1Var) { if (msgHandler.f167378x == null) { msgHandler.q5(h1Var, "sendEnterpriseChat:fail", null); } else { try { Bundle bundle = new Bundle(); bundle.putString("enterprise_action", "enterprise_get_context_bizchat"); Bundle v65 = msgHandler.f167378x.v6(71, bundle); String string = v65.getString("enterprise_context_biz"); long j15 = v65.getLong("enterprise_context_bizchatid", -1); if (!Util.isNullOrNil(string)) { if (j15 >= 0) { String str = (String) h1Var.f247819a.get("type"); if (MimeTypes.BASE_TYPE_TEXT.equals(str)) { msgHandler.j6(h1Var, string, j15); } else if ("link".equals(str)) { msgHandler.i6(h1Var, string, j15); } else { msgHandler.q5(h1Var, "sendEnterpriseChat:fail_params error", null); } } } msgHandler.q5(h1Var, "sendEnterpriseChat:fail_not in enterprise chat", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "clear webview cache fail : %s", e15.getMessage()); msgHandler.q5(h1Var, "sendEnterpriseChat:fail", null); } } return true; } public static boolean m1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String obj = h1Var.f247819a.get("chat_username").toString(); Intent intent = new Intent(); intent.putExtra("Chat_User", obj); intent.putExtra("finish_direct", true); intent.putExtra("expose_edit_mode", true); intent.setFlags(536870912); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { sv3.b.v((MMActivity) context, ".ui.chatting.ChattingUI", intent, 40, msgHandler); } else { Log.e("MicroMsg.MsgHandler", "getMsgProofItems invalid context"); msgHandler.q5(h1Var, "select chat record:fail", null); } return true; } public static boolean m2(MsgHandler msgHandler, h1 h1Var) { int i15 = 0; msgHandler.f167375u = false; jo3.m q102 = com.tencent.mm.plugin.webview.modeltools.m.q10(); Map<String, Object> map = h1Var.f247819a; com.tencent.mm.plugin.websearch.f fVar = (com.tencent.mm.plugin.websearch.f) q102; fVar.getClass(); HashMap hashMap = new HashMap(); hashMap.put("errcode", 0); hashMap.put("msg", "success"); if (map != null) { int e15 = p.e(map, "limit", 3); int e16 = p.e(map, "webview_instance_id", -1); if (e16 > 0) { String str = String.valueOf(e16) + '_' + String.valueOf(Util.nowSecond() / 300); if (((HashMap) fVar.f164284g).containsKey(str)) { i15 = ((Integer) ((HashMap) fVar.f164284g).get(str)).intValue(); } if (i15 < e15) { ((vp.e) j.c(vp.e.class)).Xw0(40); ((HashMap) fVar.f164284g).put(str, Integer.valueOf(i15 + 1)); } else { hashMap.put("errcode", -1); hashMap.put("msg", "fail:over call"); } } } else { ((vp.e) j.c(vp.e.class)).Xw0(40); } msgHandler.q5(h1Var, "updateWASearchTemplate:succ", hashMap); return true; } public static boolean m3(MsgHandler msgHandler, h1 h1Var) { Map<String, String> v65 = msgHandler.v6(h1Var); if (v65 == null) { return true; } ((u00.f) j.c(u00.f.class)).Sv0((MMActivity) msgHandler.f167360d, "entrustAuthorization", v65, 69, msgHandler); return true; } public static boolean m4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String[] split; msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doOpenWCPaySpecificView"); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); if (msgHandler.f167360d instanceof MMActivity) { WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); String str = walletJsapiData.f173491i; HashMap hashMap = new HashMap(); if (!Util.isNullOrNil(str) && (split = str.split("&")) != null && split.length > 0) { for (int i15 = 0; i15 < split.length; i15++) { if (!Util.isNullOrNil(split[i15])) { String[] split2 = split[i15].split("="); if (split2.length == 2 && !Util.isNullOrNil(split2[0])) { hashMap.put(split2[0], split2[1]); } } } } String str2 = (String) hashMap.get("openview"); Bundle bundle = new Bundle(); bundle.putString("appId", walletJsapiData.f173486d); bundle.putString("timeStamp", walletJsapiData.f173490h); bundle.putString("nonceStr", walletJsapiData.f173489g); bundle.putString("packageExt", walletJsapiData.f173491i); bundle.putString("signtype", walletJsapiData.f173488f); bundle.putString("paySignature", walletJsapiData.f173495p); bundle.putString("url", walletJsapiData.f173497r); bundle.putInt("pay_channel", walletJsapiData.f173501v); if (!Util.isNullOrNil(str2)) { str2.getClass(); if (str2.equals("open_lqt_fixed_deposit_deposit")) { bundle.putInt("entry_scene", Util.safeParseInt((String) hashMap.get("entry_scene"))); ((qv3.c) j.c(qv3.c.class)).startLqtFixedDepositMakePlanUseCase(msgHandler.f167360d, bundle); msgHandler.q5(h1Var, "open_lqt_fixed_deposit_deposit:ok", null); } else if (str2.equals("open_lqt_fixed_deposit_plan_list")) { ((qv3.c) j.c(qv3.c.class)).startLqtFixedDepositPlanListUseCase(msgHandler.f167360d, bundle); msgHandler.q5(h1Var, "open_lqt_fixed_deposit_plan_list:ok", null); } } ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "wallet_index", ".ui.WalletOpenViewProxyUI", new Intent().putExtras(bundle), 17, false); } return true; } public static boolean m5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doGetRecevieBizHongBaoRequest"); o1.a(h1Var.f247862h, false, null, (String) h1Var.f247819a.get("appId")); if (!(msgHandler.f167360d instanceof MMActivity)) { return true; } WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); intent.putExtra("key_way", 3); intent.putExtra("appId", walletJsapiData.f173486d); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); intent.putExtra("url", walletJsapiData.f173497r); ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "luckymoney", ".ui.LuckyMoneyBusiReceiveUI", intent, 22); return true; } public static boolean n(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!f2.f165535c.f165537b) { msgHandler.q5(h1Var, "videoProxyStartPlay:fail_has_not_init", null); } else { String str = (String) h1Var.f247819a.get("webviewVideoProxyCdnUrls"); String str2 = (String) h1Var.f247819a.get("webviewVideoProxyFileId"); int i15 = Util.getInt((String) h1Var.f247819a.get("webviewVideoProxyFileSize"), 0); int i16 = Util.getInt((String) h1Var.f247819a.get("webviewVideoProxyFileDuration"), 0); int i17 = Util.getInt((String) h1Var.f247819a.get("webviewVideoProxyFileType"), 1); Log.i("MicroMsg.MsgHandler", "cdnurls = %s, filedId = %s, fileSize = %d, fileDuration = %d, fileType = %d", str, str2, Integer.valueOf(i15), Integer.valueOf(i16), Integer.valueOf(i17)); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "videoProxyStartPlay:fail_cdnurl_is_null", null); } else { ArrayList<IDKey> arrayList = new ArrayList<>(); try { Bundle bundle = new Bundle(); bundle.putString("webview_video_proxy_cdn_urls", str); bundle.putString("webview_video_proxy_fileId", str2); bundle.putInt("webview_video_proxy_file_size", i15); bundle.putInt("webview_video_proxy_file_duration", i16); bundle.putInt("webview_video_proxy_file_type", i17); Bundle v65 = msgHandler.f167378x.v6(5002, bundle); IDKey iDKey = new IDKey(); iDKey.SetID(TPOptionalID.OPTION_ID_BEFORE_LONG_SEEK_AV_PTS_ALIGN_MAX_THRESHOLD_MS); iDKey.SetKey(15); iDKey.SetValue(1); arrayList.add(iDKey); if (v65 != null) { int i18 = v65.getInt("webview_video_proxy_play_data_id"); String string = v65.getString("webview_video_proxy_local_url"); Log.i("MicroMsg.MsgHandler", "invoke result palyDataId = %d, localUrl = %s", Integer.valueOf(i18), string); if (i18 > 0 && !Util.isNullOrNil(string)) { q qVar = q.INSTANCE; qVar.a(arrayList, false); HashMap hashMap = new HashMap(); hashMap.put("videoProxyPlayDataId", Integer.valueOf(i18)); hashMap.put("videoProxyPlayLocalUrl", string); msgHandler.q5(h1Var, "videoProxyStartPlay:ok", hashMap); qVar.a(arrayList, false); } } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "proxy start play failed : %s", e15.getMessage()); } IDKey iDKey2 = new IDKey(); iDKey2.SetID(TPOptionalID.OPTION_ID_BEFORE_LONG_SEEK_AV_PTS_ALIGN_MAX_THRESHOLD_MS); iDKey2.SetKey(16); iDKey2.SetValue(1); arrayList.add(iDKey2); q.INSTANCE.a(arrayList, false); msgHandler.q5(h1Var, "videoProxyStartPlay:fail", null); } } return false; } public static boolean n0(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); String str2 = (String) h1Var.f247819a.get("chatId"); String str3 = (String) h1Var.f247819a.get("chatType"); try { str = msgHandler.f167378x.getCurrentUrl(); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "exception in get currentUrl %s", e15.getMessage()); str = null; } String nullAsNil = Util.nullAsNil(msgHandler.f167382z.c(str)); if (Util.isNullOrNil(str2) || Util.isNullOrNil(str3) || Util.isNullOrNil(nullAsNil)) { msgHandler.q5(h1Var, "enterEnterpriseChat:fail_params error", null); } else { cg0.h ZN0 = bg0.w0.ZN0(); q3 q3Var = new q3(msgHandler, h1Var); ZN0.getClass(); d60.z.l().f198618b.f(new cg0.m(nullAsNil, str2, str3, q3Var)); } return true; } public static boolean n1(MsgHandler msgHandler, h1 h1Var) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get(l3.COL_LOCALID); Object obj = h1Var.f247819a.get("isShowProgressTips"); if (obj != null) { try { z15 = Util.getInt(obj.toString(), 0) == 1; } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "Exception has occured : %s", e15.getMessage()); } Log.i("MicroMsg.MsgHandler", "uploadMediaFile, appid = %s, localid = %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "appId or localid is null or nil."); msgHandler.q5(h1Var, "uploadMediaFile:fail_missing arguments", null); } else { o1.a(h1Var.f247862h, false, null, str); WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str2); if (b15 == null) { msgHandler.q5(h1Var, "uploadMediaFile:fail", null); } else { int i15 = b15.f165434n; if (i15 == 1) { msgHandler.g7(h1Var, str, str2, 20301, 202, 2, "uploadMediaFile", z15); } else if (i15 != 4) { msgHandler.h7(h1Var, str, str2, 20303, 202, 2, "uploadMediaFile", z15); } else { msgHandler.h7(h1Var, str, str2, CdnLogic.kMediaTypeAppVideo, 202, 2, "uploadMediaFile", z15); } } } return true; } z15 = true; Log.i("MicroMsg.MsgHandler", "uploadMediaFile, appid = %s, localid = %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str)) { } Log.e("MicroMsg.MsgHandler", "appId or localid is null or nil."); msgHandler.q5(h1Var, "uploadMediaFile:fail_missing arguments", null); return true; } public static boolean n2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; String f15 = p.f(h1Var.f247819a, "userName"); String f16 = p.f(h1Var.f247819a, "appId"); boolean d15 = p.d(h1Var.f247819a, "fakeNative", false); boolean d16 = p.d(h1Var.f247819a, "preloadEnv", false); int e15 = p.e(h1Var.f247819a, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); Log.i("MicroMsg.MsgHandler", "preload search weapp, username[%s], appId[%s], preloadEnv[%b], fakeNative[%b], scene[%s]。", f15, f16, Boolean.valueOf(d16), Boolean.valueOf(d15), Integer.valueOf(e15)); if (f15.length() > 0) { ((i1) j.c(i1.class)).Gp(f15, e15); } if (d16) { if (d15) { ((com.tencent.mm.plugin.appbrand.service.m0) j.c(com.tencent.mm.plugin.appbrand.service.m0.class)).ED0(m1.D); } else if (f16.length() > 0) { ((com.tencent.mm.plugin.appbrand.service.t0) j.c(com.tencent.mm.plugin.appbrand.service.t0.class)).vR(f16); } } msgHandler.q5(h1Var, "preloadSearchWeapp:succ", null); return true; } /* JADX WARNING: Removed duplicated region for block: B:185:0x0748 */ /* JADX WARNING: Removed duplicated region for block: B:194:0x07e6 */ /* JADX WARNING: Removed duplicated region for block: B:195:0x07ea */ /* JADX WARNING: Removed duplicated region for block: B:198:0x07fa */ /* JADX WARNING: Removed duplicated region for block: B:203:0x0849 */ /* JADX WARNING: Removed duplicated region for block: B:50:0x0274 */ /* JADX WARNING: Removed duplicated region for block: B:63:0x02d7 */ /* JADX WARNING: Removed duplicated region for block: B:73:0x0306 */ public static boolean n3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; String str; RemoteException e15; int i15; String str2; String str3; String str4; String str5; String str6; String str7; DoFavoriteEvent doFavoriteEvent; Context context; String str8; RemoteException e16; RemoteException e17; msgHandler.getClass(); if (Util.isNullOrNil((String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE))) { Log.i("MicroMsg.MsgHandler", "doSendAppMessage: msg.params.get('title') == null"); String str9 = (String) ((HashMap) h1Var.f247819a).get("url"); try { str9 = Uri.parse(str9).getHost(); } catch (Exception e18) { Log.e("MicroMsg.MsgHandler", "parse url fail!, e= %s", e18.getMessage()); } ((HashMap) h1Var.f247819a).put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, str9); } boolean I6 = msgHandler.I6(); WXMediaMessage w55 = msgHandler.w5(h1Var, I6); msgHandler.f167362f = w55; if (w55 == null) { Log.e("MicroMsg.MsgHandler", "doSendAppMsg fail, appmsg is null"); msgHandler.q5(h1Var, "send_app_msg:fail", null); return true; } String string = msgHandler.w6().getString(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE); msgHandler.w6().remove(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE); if (!"friend".equals(string)) { o1.a(h1Var.f247862h, msgHandler.u6("sendAppMessage"), null, (String) ((HashMap) h1Var.f247819a).get("appid")); } Log.i("MicroMsg.MsgHandler", "send appmsg scene is '%s'", string); if ("connector".equals(string)) { String string2 = msgHandler.w6().getString("connector_local_send"); msgHandler.w6().remove("connector_local_send"); msgHandler.w6().putString("connector_local_report", string2); Log.i("MicroMsg.MsgHandler", "directly send to %s", string2); msgHandler.mmOnActivityResult(1, -1, new Intent().putExtra("Select_Conv_User", string2)); z15 = true; } else { Object obj = "url"; boolean z16 = I6; if ("favorite".equals(string)) { Log.i("MicroMsg.MsgHandler", "favorite url"); DoFavoriteEvent doFavoriteEvent2 = new DoFavoriteEvent(); g.a aVar = new g.a(); String str10 = (String) ((HashMap) msgHandler.f167361e.f247819a).get("link"); String C6 = msgHandler.C6(str10); Log.i("MicroMsg.MsgHandler", "rawurl:[%s], shareurl:[%s]", str10, C6); aVar.f165538a = C6; aVar.f165541d = (String) ((HashMap) msgHandler.f167361e.f247819a).get("img_url"); aVar.f165539b = (String) ((HashMap) msgHandler.f167361e.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); aVar.f165540c = (String) ((HashMap) msgHandler.f167361e.f247819a).get("desc"); aVar.f165542e = (String) ((HashMap) msgHandler.f167361e.f247819a).get("appid"); try { a0.b x65 = msgHandler.x6(msgHandler.f167378x.getCurrentUrl()); if (x65 != null && !Util.isNullOrNil(x65.f165892a)) { dg0 dg02 = new dg0(); aVar.f165547j = dg02; int i16 = x65.f165894c; dg02.f19281d = i16; dg02.f19288n = x65.f165892a; dg02.f19289o = x65.f165893b; dg02.f19295u = x65.f165895d; if (com.tencent.mm.message.f.f(i16)) { dg0 dg03 = aVar.f165547j; dg03.f19282e = 1; dg03.f19287j = x65.f165899h; dg03.f19283f = x65.f165896e; dg03.f19284g = x65.f165897f; dg03.f19286i = x65.f165898g; } } } catch (Exception e19) { Log.printErrStackTrace("MicroMsg.MsgHandler", e19, "", new Object[0]); } Bundle bundle = msgHandler.f167367n; if (bundle != null) { str7 = bundle.getString("key_snsad_statextstr"); aVar.f165546i = str7; } else { str7 = null; } try { Bundle v65 = msgHandler.f167378x.v6(18, null); if (v65 != null) { String a15 = nf0.z0.a(Util.nullAsNil(v65.getString("KPublisherId"))); z0.c c15 = nf0.z0.d().c(a15, true); c15.i("sendAppMsgScene", 2); c15.i("preChatName", v65.getString("preChatName")); c15.i("preMsgIndex", Integer.valueOf(v65.getInt("preMsgIndex"))); c15.i("prePublishId", v65.getString("prePublishId")); c15.i("preUsername", v65.getString("preUsername")); c15.i("getA8KeyScene", Integer.valueOf(v65.getInt("getA8KeyScene"))); c15.i("referUrl", v65.getString("referUrl")); if (!Util.isNullOrNil(str7)) { c15.i("adExtStr", str7); } doFavoriteEvent = doFavoriteEvent2; try { doFavoriteEvent.f62174d.f62183h = a15; } catch (RemoteException e25) { e17 = e25; } } else { doFavoriteEvent = doFavoriteEvent2; } } catch (RemoteException e26) { e17 = e26; doFavoriteEvent = doFavoriteEvent2; Log.e("MicroMsg.MsgHandler", "try to report error, %s", e17); context = msgHandler.f167360d; if (context instanceof Activity) { } com.tencent.mm.plugin.webview.model.g.a(doFavoriteEvent, aVar); doFavoriteEvent.f62174d.f62192q = new s2(msgHandler); doFavoriteEvent.publish(); msgHandler.E.a(3, (String) ((HashMap) msgHandler.f167361e.f247819a).get("use_update_jsapi_data")); if (doFavoriteEvent.f62175e.f62197a != 0) { } z15 = true; return z15; } context = msgHandler.f167360d; if (context instanceof Activity) { DoFavoriteEvent.a aVar2 = doFavoriteEvent.f62174d; aVar2.f62184i = (Activity) context; aVar2.f62188m = 36; try { Object obj2 = ((HashMap) msgHandler.f167361e.f247819a).get("KPublisherId"); if (obj2 != null) { if (obj2.toString().startsWith("wrd")) { doFavoriteEvent.f62174d.f62189n = 2; } else if (obj2.toString().startsWith("gs")) { doFavoriteEvent.f62174d.f62189n = 3; } } } catch (Exception unused) { } } com.tencent.mm.plugin.webview.model.g.a(doFavoriteEvent, aVar); doFavoriteEvent.f62174d.f62192q = new s2(msgHandler); doFavoriteEvent.publish(); msgHandler.E.a(3, (String) ((HashMap) msgHandler.f167361e.f247819a).get("use_update_jsapi_data")); if (doFavoriteEvent.f62175e.f62197a != 0) { msgHandler.k7(3, 1); try { str8 = "invokeAsResult error : %s"; try { msgHandler.W6(aVar.f165542e, aVar.f165541d, "", 4, -1, msgHandler.f167378x.v6(85, null)); } catch (RemoteException e27) { e16 = e27; } } catch (RemoteException e28) { e16 = e28; str8 = "invokeAsResult error : %s"; Log.e("MicroMsg.MsgHandler", str8, e16); z15 = true; return z15; } } else { msgHandler.k7(3, 2); msgHandler.q5(msgHandler.f167361e, "send_fav_msg:fail", null); } } else if ("enterprise".equals(string)) { String string3 = msgHandler.w6().getString("connector_local_send"); msgHandler.w6().remove("connector_local_send"); msgHandler.w6().putString("connector_local_report", string3); HashMap hashMap = new HashMap(); hashMap.put("img_url", (String) ((HashMap) h1Var.f247819a).get("img_url")); hashMap.put("desc", (String) ((HashMap) h1Var.f247819a).get("desc")); hashMap.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)); hashMap.put("src_username", (String) ((HashMap) h1Var.f247819a).get("src_username")); hashMap.put("src_displayname", (String) ((HashMap) h1Var.f247819a).get("src_displayname")); Log.i("MicroMsg.MsgHandler", "doSendAppMessage, img_url=%s, desc=%s, title=%s", (String) ((HashMap) h1Var.f247819a).get("img_url"), (String) ((HashMap) h1Var.f247819a).get("desc"), (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)); if (((fo.w) j.c(fo.w.class)).kL(string3)) { Intent intent = new Intent(); intent.setClassName(msgHandler.f167360d, "com.tencent.mm.ui.bizchat.BizChatSelectConversationUI"); intent.putExtra("enterprise_biz_name", string3); intent.putExtra("biz_chat_scene", 1); intent.putExtra("enterprise_extra_params", hashMap); Context context2 = msgHandler.f167360d; if (context2 instanceof MMActivity) { ((MMActivity) context2).mmSetOnActivityResultCallback(msgHandler); ((MMActivity) msgHandler.f167360d).mmStartActivityForResult(msgHandler, intent, 37); } } else if (((fo.w) j.c(fo.w.class)).Zn(string3)) { Intent intent2 = new Intent(); intent2.putExtra("enterprise_biz_name", string3); intent2.putExtra("enterprise_scene", 3); intent2.putExtra("enterprise_extra_params", hashMap); Context context3 = msgHandler.f167360d; if (context3 instanceof MMActivity) { ((MMActivity) context3).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "brandservice", ".ui.EnterpriseBizContactPlainListUI", intent2, 37); } } } else if ("wework".equals(string) || "wework_local".equals(string)) { z15 = true; Log.w("MicroMsg.MsgHandler", "doSendAppMessage do not share to wework here!"); } else if ("facebook".equals(string)) { Intent intent3 = new Intent(); intent3.putExtra(FFmpegMetadataRetriever.METADATA_KEY_TITLE, (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)); intent3.putExtra("digest", (String) ((HashMap) h1Var.f247819a).get("desc")); intent3.putExtra("img", (String) ((HashMap) h1Var.f247819a).get("img_url")); intent3.putExtra("link", (String) ((HashMap) h1Var.f247819a).get("link")); intent3.setClassName(msgHandler.f167360d, "com.tencent.mm.plugin.account.ui.ShareToFacebookRedirectUI"); Context context4 = msgHandler.f167360d; k30.a aVar3 = new k30.a(); aVar3.c(intent3); j30.a.d(context4, aVar3.b(), "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doShareFacebook", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context4.startActivity((Intent) aVar3.a(0)); j30.a.e(context4, "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doShareFacebook", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); msgHandler.q5(h1Var, "shareQZone:ok", null); } else if ("qq".equals(string)) { msgHandler.a6(h1Var, jsapiPermissionWrapper); } else if ("recentFriend".equals(string)) { if (msgHandler.y5(jsapiPermissionWrapper, h1Var, jsapiPermissionWrapper.f(89) || jsapiPermissionWrapper.f(TingProto.TingReportContext.CURRPLAYQUALITY_FIELD_NUMBER))) { msgHandler.f167362f = msgHandler.w5(h1Var, z16); } String string4 = msgHandler.w6().getString("sourUserName"); msgHandler.w6().remove("sourUserName"); if (((String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)) == null) { str2 = ""; } else { str2 = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); } if (((String) ((HashMap) h1Var.f247819a).get("img_url")) == null) { str3 = ""; } else { str3 = (String) ((HashMap) h1Var.f247819a).get("img_url"); } if (((String) ((HashMap) h1Var.f247819a).get("src_username")) == null) { str4 = ""; } else { str4 = (String) ((HashMap) h1Var.f247819a).get("src_username"); } if (((String) ((HashMap) h1Var.f247819a).get("src_displayname")) == null) { str5 = ""; } else { str5 = (String) ((HashMap) h1Var.f247819a).get("src_displayname"); } if (z16) { str6 = ""; } else { str6 = msgHandler.f167360d.getResources().getString(R.string.f367640za); } StringBuffer stringBuffer = new StringBuffer(str6); stringBuffer.append(str2); String stringBuffer2 = stringBuffer.toString(); if (z16) { stringBuffer2 = msgHandler.C6((String) ((HashMap) h1Var.f247819a).get("link")); } msgHandler.f167364h = true; ((cu3.w) j.c(cu3.w.class)).fU(msgHandler.f167360d, string4, stringBuffer2, new h3(msgHandler, str3, h1Var, string4, str4, str5), new j3(msgHandler, z16, h1Var), new k3(msgHandler)); } else { msgHandler.E.a(1, (String) ((HashMap) h1Var.f247819a).get("use_update_jsapi_data")); Log.i("MicroMsg.MsgHandler", "select user to send"); HashMap hashMap2 = new HashMap(); if (msgHandler.y5(jsapiPermissionWrapper, h1Var, jsapiPermissionWrapper.f(89) || jsapiPermissionWrapper.f(TingProto.TingReportContext.CURRPLAYQUALITY_FIELD_NUMBER))) { msgHandler.f167362f = msgHandler.w5(h1Var, z16); } if (jsapiPermissionWrapper.f(com.tencent.mm.plugin.appbrand.jsapi.audio.k.CTRL_INDEX)) { ((HashMap) msgHandler.f167361e.f247819a).put("share_callback_with_scene", Boolean.TRUE); } else { ((HashMap) msgHandler.f167361e.f247819a).put("share_callback_with_scene", Boolean.FALSE); } String str11 = (String) ((HashMap) h1Var.f247819a).get("img_url"); hashMap2.put("img_url", str11); hashMap2.put("desc", (String) ((HashMap) h1Var.f247819a).get("desc")); String str12 = (String) ((HashMap) h1Var.f247819a).get(obj); hashMap2.put(obj, str12); try { Bundle v66 = msgHandler.f167378x.v6(18, null); if (v66 != null) { z0.c c16 = nf0.z0.d().c(nf0.z0.a(Util.nullAsNil(v66.getString("KPublisherId"))), true); a0.b x66 = msgHandler.x6(str12); z16 = z16; try { int i17 = v66.getInt("_DATA_CENTER_ITEM_SHOW_TYPE", -1); if (x66 != null && (i15 = x66.f165894c) >= 0) { i17 = i15; } if (x66 == null || !x66.f165900i) { obj = obj; } else { obj = obj; try { c16.i("_DATA_CENTER_NEED_SHOW_SOURCE_INFO", Boolean.TRUE); } catch (RemoteException e29) { e15 = e29; Log.e("MicroMsg.MsgHandler", "doSendAppMessage, %s", e15); str = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); if (Util.isNullOrNil(str)) { } hashMap2.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, str); Log.i("MicroMsg.MsgHandler", "doSendAppMessage, img_url=%s, desc=%s, title=%s, url=%s", (String) ((HashMap) h1Var.f247819a).get("img_url"), (String) ((HashMap) h1Var.f247819a).get("desc"), (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE), (String) ((HashMap) h1Var.f247819a).get(obj)); q.INSTANCE.idkeyStat(157, 5, 1, false); Intent intent4 = new Intent(); intent4.putExtra("Select_Conv_Type", 35); intent4.putExtra("scene_from", 2); intent4.putExtra("mutil_select_is_ret", true); intent4.putExtra("webview_params", hashMap2); if (z16) { } if (!(msgHandler.f167360d instanceof MMActivity)) { } } } if (i17 != -1) { hashMap2.put("item_show_type", String.valueOf(i17)); c16.i("_DATA_CENTER_ITEM_SHOW_TYPE", Integer.valueOf(i17)); c16.i("_tmpl_webview_transfer_scene", 11); c16.i("_DATA_CENTER_IS_PAY_SUBSCRIBE", Integer.valueOf(x66 != null ? x66.f165895d : 0)); if ((i17 == 5 || i17 == 16) && x66 != null) { c16.i("_DATA_CENTER_VID", x66.f165899h); c16.i("_DATA_CENTER__DULATION", Integer.valueOf(x66.f165898g)); c16.i("_DATA_CENTER_COVER_URL", str11); c16.i("_DATA_CENTER_VIDEO_WIDTH", Integer.valueOf(x66.f165896e)); c16.i("_DATA_CENTER_VIDEO_HEIGHT", Integer.valueOf(x66.f165897f)); c16.i("_DATA_SHOW_NATIVE_PAGE", 1); } } } catch (RemoteException e35) { e15 = e35; obj = obj; Log.e("MicroMsg.MsgHandler", "doSendAppMessage, %s", e15); str = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); if (Util.isNullOrNil(str)) { } hashMap2.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, str); Log.i("MicroMsg.MsgHandler", "doSendAppMessage, img_url=%s, desc=%s, title=%s, url=%s", (String) ((HashMap) h1Var.f247819a).get("img_url"), (String) ((HashMap) h1Var.f247819a).get("desc"), (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE), (String) ((HashMap) h1Var.f247819a).get(obj)); q.INSTANCE.idkeyStat(157, 5, 1, false); Intent intent42 = new Intent(); intent42.putExtra("Select_Conv_Type", 35); intent42.putExtra("scene_from", 2); intent42.putExtra("mutil_select_is_ret", true); intent42.putExtra("webview_params", hashMap2); if (z16) { } if (!(msgHandler.f167360d instanceof MMActivity)) { } } } else { z16 = z16; obj = obj; Log.e("MicroMsg.MsgHandler", "doSendAppMessage bundle == null"); } } catch (RemoteException e36) { e15 = e36; z16 = z16; obj = obj; Log.e("MicroMsg.MsgHandler", "doSendAppMessage, %s", e15); str = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); if (Util.isNullOrNil(str)) { } hashMap2.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, str); Log.i("MicroMsg.MsgHandler", "doSendAppMessage, img_url=%s, desc=%s, title=%s, url=%s", (String) ((HashMap) h1Var.f247819a).get("img_url"), (String) ((HashMap) h1Var.f247819a).get("desc"), (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE), (String) ((HashMap) h1Var.f247819a).get(obj)); q.INSTANCE.idkeyStat(157, 5, 1, false); Intent intent422 = new Intent(); intent422.putExtra("Select_Conv_Type", 35); intent422.putExtra("scene_from", 2); intent422.putExtra("mutil_select_is_ret", true); intent422.putExtra("webview_params", hashMap2); if (z16) { } if (!(msgHandler.f167360d instanceof MMActivity)) { } } str = (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); if (Util.isNullOrNil(str) || !((r21.d) d60.z.q(r21.d.class)).gk0(str12)) { hashMap2.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, str); } else { try { hashMap2.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, msgHandler.f167378x.v6(84, null).getString("webview_current_title")); } catch (RemoteException e37) { Log.e("MicroMsg.MsgHandler", "invokeAsResult error : %s", e37); } } Log.i("MicroMsg.MsgHandler", "doSendAppMessage, img_url=%s, desc=%s, title=%s, url=%s", (String) ((HashMap) h1Var.f247819a).get("img_url"), (String) ((HashMap) h1Var.f247819a).get("desc"), (String) ((HashMap) h1Var.f247819a).get(FFmpegMetadataRetriever.METADATA_KEY_TITLE), (String) ((HashMap) h1Var.f247819a).get(obj)); q.INSTANCE.idkeyStat(157, 5, 1, false); Intent intent4222 = new Intent(); intent4222.putExtra("Select_Conv_Type", 35); intent4222.putExtra("scene_from", 2); intent4222.putExtra("mutil_select_is_ret", true); intent4222.putExtra("webview_params", hashMap2); if (z16) { intent4222.putExtra("Retr_Msg_Type", 2); } else { String C62 = msgHandler.C6(str12); intent4222.putExtra("Retr_Msg_Type", 4); hashMap2.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, C62); } if (!(msgHandler.f167360d instanceof MMActivity)) { ((HashMap) h1Var.f247862h).put("Internal@AsyncReport", Boolean.TRUE); if (Util.getInt((String) ((HashMap) h1Var.f247819a).get("open_from_scene"), 0) == 4) { z15 = true; ((nr.j) j.c(nr.j.class)).PM(msgHandler.f167367n.getLong("favlocalid", 0), 1, 0); } else { z15 = true; } ((ep.j) j.c(ep.j.class)).setScene(5); int i18 = z15 ? 1 : 0; int i19 = z15 ? 1 : 0; int i25 = z15 ? 1 : 0; int i26 = z15 ? 1 : 0; int i27 = z15 ? 1 : 0; int i28 = z15 ? 1 : 0; sv3.b.v((MMActivity) msgHandler.f167360d, ".ui.transmit.SelectConversationUI", intent4222, i18, msgHandler); e4.a(str11); } else { Log.e("MicroMsg.MsgHandler", "doSendAppMessage context is not activity"); return false; } } z15 = true; } return z15; } public static boolean n4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doChooseCard JSOAUTH"); String str = (String) h1Var.f247819a.get(ConstantsKinda.INTENT_LITEAPP_APPID); int i15 = Util.getInt((String) h1Var.f247819a.get("location_id"), 0); String str2 = (String) h1Var.f247819a.get("sign_type"); String str3 = (String) h1Var.f247819a.get("card_sign"); int i16 = Util.getInt((String) h1Var.f247819a.get("time_stamp"), 0); String str4 = (String) h1Var.f247819a.get("nonce_str"); String str5 = (String) h1Var.f247819a.get("card_id"); String str6 = (String) h1Var.f247819a.get("card_type"); if ("INVOICE".equalsIgnoreCase(str6)) { msgHandler.q5(h1Var, "choose_card:fail", new HashMap()); return false; } int i17 = Util.getInt((String) h1Var.f247819a.get("can_multi_select"), 0); o1.a(h1Var.f247862h, false, null, str); Intent intent = new Intent(); intent.putExtra(ConstantsKinda.INTENT_LITEAPP_APPID, str); intent.putExtra("shop_id", i15); intent.putExtra("sign_type", str2); intent.putExtra("card_sign", str3); intent.putExtra("time_stamp", i16); intent.putExtra("nonce_str", str4); intent.putExtra("card_tp_id", str5); intent.putExtra("card_type", str6); intent.putExtra("can_multi_select", i17); intent.putExtra("key_from_scene", 7); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "card", ".ui.CardListSelectedUI", intent, 13, false); } return true; } public static boolean n5(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { if (msgHandler.f167360d != null) { String str = (String) h1Var.f247819a.get("deviceType"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "deviceType is null"); msgHandler.q5(h1Var, "openMyDeviceProfile:fail_no deviceType", null); return true; } String str2 = (String) h1Var.f247819a.get("deviceId"); if (Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "deviceId is null"); msgHandler.q5(h1Var, "openMyDeviceProfile:fail_no deviceId", null); return true; } Intent intent = new Intent(); if (!(msgHandler.f167360d instanceof Activity)) { intent.addFlags(268435456); } intent.putExtra("device_type", str); intent.putExtra(TPDownloadProxyEnum.USER_DEVICE_ID, str2); sv3.b.j(msgHandler.f167360d, "exdevice", ".ui.ExdeviceDeviceProfileUI", intent, null); msgHandler.q5(h1Var, "openMyDeviceProfile:ok", null); return true; } Log.e("MicroMsg.MsgHandler", "context is null"); msgHandler.q5(h1Var, "openMyDeviceProfile:fail", null); return true; } public static boolean o(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!f2.f165535c.f165537b) { msgHandler.q5(h1Var, "videoProxyStartPlay:fail_has_not_init", null); return true; } int i15 = Util.getInt((String) h1Var.f247819a.get("webviewVideoProxyPlaydataId"), 0); if (i15 > 0) { Bundle bundle = new Bundle(); bundle.putInt("webview_video_proxy_play_data_id", i15); try { msgHandler.f167378x.v6(5003, bundle); msgHandler.q5(h1Var, "videoProxyStopPlay:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "webview proxy stop play failed : %s", e15.getMessage()); } return false; } msgHandler.q5(h1Var, "videoProxyStopPlay:fail", null); return false; } public static boolean o0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); try { Bundle b15 = h1.b(h1Var.f247819a); msgHandler.f167378x.Va0(); msgHandler.f167378x.d(b15); String str = ""; Bundle bundle = msgHandler.f167367n; if (bundle != null) { bundle.setClassLoader(MsgHandler.class.getClassLoader()); str = msgHandler.f167367n.getString("KoriginUrl"); msgHandler.f167367n.getBoolean("KIsHKAgreeUrl"); } WebViewCloseWindowEvent webViewCloseWindowEvent = new WebViewCloseWindowEvent(); webViewCloseWindowEvent.f65229d.f65230a = str; webViewCloseWindowEvent.publish(); } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "doCloseWindow, ex = " + e15.getMessage()); } msgHandler.q5(h1Var, "close_window:ok", null); return true; } public static boolean o1(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; String trim = h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE).toString().trim(); if (!trim.equals("expose")) { msgHandler.q5(h1Var, "openSecurityView fail, scene error : " + trim, null); } else if (h1Var.f247819a.get("userData") != null) { try { Intent intent = new Intent(); intent.putExtra("sns_permission_userName", ((JSONObject) new JSONTokener(h1Var.f247819a.get("userData").toString()).nextValue()).get("userName").toString()); intent.putExtra("sns_permission_anim", true); intent.putExtra("sns_permission_block_scene", 1); intent.setFlags(536870912); sv3.b.j(msgHandler.f167360d, "sns", ".ui.SnsPermissionUI", intent, null); msgHandler.q5(h1Var, "openSecurityView ok", null); } catch (JSONException unused) { Log.w("MicroMsg.MsgHandler", "openSecurityView error, userData not in json"); msgHandler.q5(h1Var, "openSecurityView error,userData not in json", null); } } else { msgHandler.q5(h1Var, "openSecurityView fail, no userData", null); } return true; } public static boolean o2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; String obj = h1Var.f247819a.get("list").toString(); LinkedList<as3> linkedList = new LinkedList<>(); try { JSONArray jSONArray = new JSONArray(obj); for (int i15 = 0; i15 < jSONArray.length(); i15++) { JSONObject optJSONObject = jSONArray.optJSONObject(i15); if (optJSONObject != null) { as3 as32 = new as3(); as32.f16559d = optJSONObject.optInt("cmdId"); String optString = optJSONObject.optString("cmdBuffer"); if (!TextUtils.isEmpty(optString)) { as32.f16560e = new xv3.b(optString.getBytes()); linkedList.add(as32); } else { Log.e("MicroMsg.MsgHandler", "doUxSearchOpLog cmdId " + as32.f16559d + " , cmdBuffer is empty"); } } } } catch (JSONException e15) { Log.e("MicroMsg.MsgHandler", Util.stackTraceToString(e15)); } HashMap hashMap = new HashMap(); long nowMilliSecond = Util.nowMilliSecond(); hashMap.put("reqId", Long.valueOf(nowMilliSecond)); if (!linkedList.isEmpty()) { c.b bVar = new c.b(); bVar.f345559a = new pp5(); bVar.f345560b = new qp5(); bVar.f345561c = "/cgi-bin/mmux-bin/wxaapp/wxaapp_opsearch"; bVar.f345562d = 1865; yf0.c a15 = bVar.a(); ((pp5) a15.f345548a.f345573a).f33259d = linkedList; l0.e(a15, new x3(msgHandler, nowMilliSecond), false); } msgHandler.q5(h1Var, "uxSearchOpLog:succ", hashMap); return true; } public static boolean o3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); long j15 = Util.getLong((String) h1Var.f247819a.get("download_id"), -1); Log.i("MicroMsg.MsgHandler", "doPauseDownloadTask, downloadId = " + j15); if (j15 <= 0) { Log.e("MicroMsg.MsgHandler", "doPauseDownloadTask fail, invalid downloadId = " + j15); msgHandler.q5(h1Var, "pause_download_task:fail", null); } else { c3 Uj = ((t) j.c(t.class)).Uj(j15); if (Uj == null) { msgHandler.q5(h1Var, "pause_download_task:ok", null); } else { int i15 = Util.getInt((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 1000); int i16 = Util.getInt((String) h1Var.f247819a.get("uiarea"), 0); int i17 = Util.getInt((String) h1Var.f247819a.get("notice_id"), 0); int i18 = Util.getInt((String) h1Var.f247819a.get(TPDownloadProxyEnum.USER_SSID), 0); boolean z15 = Util.getInt((String) h1Var.f247819a.get("ignoreNetwork"), 0) == 1; Uj.field_scene = i15; Uj.field_uiarea = i16; Uj.field_noticeId = i17; Uj.field_ssid = i18; Uj.field_downloadInWifi = false; ((t) j.c(t.class)).A00(Uj); ((kq.c0) j.c(kq.c0.class)).Ly0(msgHandler.f167360d, j15, z15, new f2(msgHandler, h1Var)); } } return true; } public static boolean o4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doChooseInvoice JSOAUTH"); int i15 = Util.getInt((String) h1Var.f247819a.get(AppMeasurement.Param.TIMESTAMP), 0); Intent intent = new Intent(); intent.putExtra(ConstantsKinda.INTENT_LITEAPP_APPID, (String) h1Var.f247819a.get("appId")); intent.putExtra("sign_type", (String) h1Var.f247819a.get("signType")); intent.putExtra("card_sign", (String) h1Var.f247819a.get("cardSign")); intent.putExtra("time_stamp", i15); intent.putExtra("nonce_str", (String) h1Var.f247819a.get("nonceStr")); intent.putExtra("can_multi_select", 1); intent.putExtra("card_type", "INVOICE"); intent.putExtra("key_from_scene", 7); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "card", ".ui.CardListSelectedUI", intent, 36, false); } return true; } public static boolean p(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!f2.f165535c.f165537b) { msgHandler.q5(h1Var, "videoProxyStartPlay:fail_has_not_init", null); return true; } String str = (String) h1Var.f247819a.get("webviewVideoProxyPlayState"); Log.i("MicroMsg.MsgHandler", "set player state : %s", str); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "videoProxySetPlayerState:fail", null); return true; } int i15 = Util.getInt(str, 0); try { Bundle bundle = new Bundle(); bundle.putInt("webview_video_proxy_play_state", i15); msgHandler.f167378x.v6(5004, bundle); msgHandler.q5(h1Var, "videoProxySetPlayerState:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "set player state failed : %s", e15.getMessage()); msgHandler.q5(h1Var, "videoProxySetPlayerState:fail", null); } return false; } public static boolean p0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); try { String nullAsNil = Util.nullAsNil(msgHandler.f167382z.c(msgHandler.f167378x.getCurrentUrl())); if (Util.isNullOrNil(nullAsNil)) { msgHandler.q5(h1Var, "getEnterpriseChat:fail", null); } else { Bundle bundle = new Bundle(); bundle.putString("enterprise_action", "enterprise_get_context_bizchat"); Bundle v65 = msgHandler.f167378x.v6(71, bundle); String string = v65.getString("enterprise_context_biz"); long j15 = v65.getLong("enterprise_context_bizchatid", -1); String str = cg0.e.f49351a; String str2 = bg0.w0.bO0().c0(j15).field_bizChatServId; if (!Util.isNullOrNil(string)) { if (!Util.isNullOrNil(str2)) { r3 r3Var = new r3(msgHandler, h1Var); d60.z.l().f198618b.a(1285, r3Var); JSONObject jSONObject = new JSONObject(); boolean z15 = false; try { jSONObject.put("brand_user_name", string); jSONObject.put("bizchat_id", str2); z15 = d60.z.l().f198618b.g(new p0(nullAsNil, 1, jSONObject.toString(), null), 0); } catch (Exception unused) { } if (!z15) { d60.z.l().f198618b.p(1285, r3Var); msgHandler.q5(h1Var, "getEnterpriseChat:fail", null); } } } msgHandler.q5(h1Var, "getEnterpriseChat:fail_not in enterprise chat", null); } } catch (Exception unused2) { msgHandler.q5(h1Var, "getEnterpriseChat:fail", null); } return true; } public static boolean p1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("toUsername")); String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE)); String nullAsNil3 = Util.nullAsNil((String) h1Var.f247819a.get("type")); String nullAsNil4 = Util.nullAsNil((String) h1Var.f247819a.get("allowBackCamera")); String nullAsNil5 = Util.nullAsNil((String) h1Var.f247819a.get("showOther")); String nullAsNil6 = Util.nullAsNil((String) h1Var.f247819a.get("avatarUrl")); String nullAsNil7 = Util.nullAsNil((String) h1Var.f247819a.get("context")); Log.i("MicroMsg.MsgHandler", "doStartVoipCS,toUserName:" + nullAsNil + ",scene:" + nullAsNil2 + ",type:" + nullAsNil3 + ",allowBackCamera:" + nullAsNil4 + ",showOther:" + nullAsNil5 + ",avatarUrl:" + nullAsNil6 + ",voipCSContext:" + nullAsNil7); String str = (String) h1Var.f247819a.get("appId"); if (str == null || str.equals("") || nullAsNil == null || nullAsNil.equals("")) { msgHandler.q5(h1Var, "startVoipCall:param invalid", null); return true; } msgHandler.U = h1Var; msgHandler.V.alive(); if (nullAsNil.equals("testacs")) { Intent intent = new Intent(); intent.putExtra("voipCSBizId", "gh_e8b085bb67e0"); intent.putExtra("voipCSAppId", "wx1224160e0adcefd6"); sv3.b.j(MMApplicationContext.getContext(), "voip_cs", ".ui.VoipCSMainUI", intent, null); return true; } Intent intent2 = new Intent(); intent2.putExtra("voipCSBizId", nullAsNil); intent2.putExtra("voipCSScene", nullAsNil2); intent2.putExtra("voipCSType", nullAsNil3); intent2.putExtra("voipCSAppId", str); intent2.putExtra("voipCSAllowBackCamera", nullAsNil4); intent2.putExtra("voipCSShowOther", nullAsNil5); intent2.putExtra("voipCSAvatarUrl", nullAsNil6); intent2.putExtra("voipCSContext", nullAsNil7); v.e(intent2.getExtras(), "voip_cs", ".ui.VoipCSMainUI", msgHandler.f167378x, new u2(msgHandler, intent2)); return true; } public static boolean p2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; Bundle bundle = new Bundle(); bundle.putString("widgetId", (String) h1Var.f247819a.get("widgetId")); try { m mVar = msgHandler.f167378x; if (mVar != null) { mVar.callback(100001, bundle); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "doOpenSearchWAWidgetLogView exception" + e15.getMessage()); } msgHandler.q5(h1Var, "openSearchWAWidgetLogView:ok", null); return true; } public static boolean p3(MsgHandler msgHandler, h1 h1Var) { String str; msgHandler.getClass(); JSONObject jSONObject = new JSONObject(); try { if (h1Var.f247819a.get("style") != null) { jSONObject.put("style", h1Var.f247819a.get("style")); } } catch (Exception unused) { } boolean LH0 = ((z00.t) j.c(z00.t.class)).LH0(jSONObject.toString()); StringBuilder sb5 = new StringBuilder(); sb5.append("doVibrateShort:"); if (LH0) { str = "ok"; } else { str = "fail"; } sb5.append(str); msgHandler.q5(h1Var, sb5.toString(), null); return true; } public static boolean p4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("card_list"); String str2 = (String) h1Var.f247819a.get("src_username"); String str3 = (String) h1Var.f247819a.get("url"); String str4 = (String) h1Var.f247819a.get("consumedCardId"); String str5 = (String) h1Var.f247819a.get("tempalate_id"); Log.i("MicroMsg.MsgHandler", "doBatchAddCard consumedCardId %s", str4); Log.i("MicroMsg.MsgHandler", "doBatchAddCard %s", h1Var.f247819a.toString()); int i15 = Util.getInt((String) h1Var.f247819a.get("webview_scene"), 0); int i16 = Util.getInt((String) h1Var.f247819a.get("stastic_scene"), 0); int i17 = i15 == 25 ? 16 : 7; Log.i("MicroMsg.MsgHandler", "doBatchAddCard src_username is %s, scene is %d, stasticScene is %d", str2, Integer.valueOf(i17), Integer.valueOf(i16)); Intent intent = new Intent(); intent.putExtra("key_in_card_list", str); intent.putExtra("key_from_scene", i17); intent.putExtra("key_stastic_scene", i16); intent.putExtra("src_username", str2); intent.putExtra("js_url", str3); intent.putExtra("key_consumed_card_id", str4); intent.putExtra("key_template_id", str5); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "card", ".ui.CardAddEntranceUI", intent, 16, false); } return true; } public static ArrayList<f4> p6(long[] jArr) { ArrayList<f4> arrayList = new ArrayList<>(); if (jArr != null) { for (long j15 : jArr) { arrayList.add(((g4) ((k0) d60.z.q(k0.class)).WU()).tz(j15)); } } return arrayList; } public static boolean q(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (!f2.f165535c.f165537b) { msgHandler.q5(h1Var, "videoProxySetRemainTime:fail_has_not_init", null); } else { String str = (String) h1Var.f247819a.get("webviewVideoProxyPlaydataId"); int i15 = Util.getInt(str, 0); String str2 = (String) h1Var.f247819a.get("webviewVideoProxyRemainTime"); int i16 = Util.getInt(str2, 0); Log.i("MicroMsg.MsgHandler", "doWebviewProxySetRemainTime, id = %s, time = %s", str, str2); try { Bundle bundle = new Bundle(); bundle.putInt("webview_video_proxy_play_data_id", i15); bundle.putInt("webview_video_proxy_play_remain_time", i16); msgHandler.f167378x.v6(5006, bundle); msgHandler.q5(h1Var, "videoProxySetRemainTime:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "set remain time faild : %s", e15.getMessage()); msgHandler.q5(h1Var, "videoProxySetRemainTime:fail", null); } } return false; } /* JADX WARNING: Removed duplicated region for block: B:35:0x00cd */ /* JADX WARNING: Removed duplicated region for block: B:36:0x00d7 */ public static boolean q0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; String str2; String o65; int i15; String str3; String str4; String str5; UnsupportedEncodingException e15; int i16; Exception e16; msgHandler.getClass(); String str6 = " "; String str7 = ""; String str8 = (String) h1Var.f247819a.get("actionKey"); String str9 = (String) h1Var.f247819a.get("actionValue"); Log.i("MicroMsg.MsgHandler", "doReportActionInfo, actionKey = %s, actionValue = %s", str8, str9); if (Util.isNullOrNil(str8) || Util.isNullOrNil(str9)) { Log.e("MicroMsg.MsgHandler", "doReportActionInfo, actionKey or actionValue is null"); msgHandler.q5(h1Var, "reportActionInfo:fail", null); return true; } else if (str8.length() <= 0 || str8.length() > 32 || str9.length() <= 0 || str9.length() > 1024) { Log.e("MicroMsg.MsgHandler", "doReportActionInfo, actionKey or actionValue size is bad"); msgHandler.q5(h1Var, "reportActionInfo:fail", null); return true; } else { try { Bundle v65 = msgHandler.f167378x.v6(77, null); if (v65 != null) { str = Util.nullAsNil(v65.getString("KSessionId")); try { str2 = Util.nullAsNil(v65.getString("KUserAgent")); } catch (Exception e17) { e16 = e17; str2 = str6; Log.e("MicroMsg.MsgHandler", "get sessionId error, %s", e16); o65 = msgHandler.o6(str6); if (!TextUtils.isEmpty(o65)) { } } try { str6 = Util.nullAsNil(v65.getString("KUrl")); if (TextUtils.isEmpty(str6)) { Log.e("MicroMsg.MsgHandler", "doReportActionInfo, url is empty"); msgHandler.q5(h1Var, "reportActionInfo:fail", null); return true; } Log.i("MicroMsg.MsgHandler", "doReportActionInfo, sessionId %s, userAgent %s, url %s", str, str2, str6); } catch (Exception e18) { e16 = e18; Log.e("MicroMsg.MsgHandler", "get sessionId error, %s", e16); o65 = msgHandler.o6(str6); if (!TextUtils.isEmpty(o65)) { } } } else { str2 = str6; str = str2; } } catch (Exception e19) { e16 = e19; str2 = str6; str = str2; Log.e("MicroMsg.MsgHandler", "get sessionId error, %s", e16); o65 = msgHandler.o6(str6); if (!TextUtils.isEmpty(o65)) { } } o65 = msgHandler.o6(str6); if (!TextUtils.isEmpty(o65)) { Log.e("MicroMsg.MsgHandler", "doReportActionInfo, appId is empty"); msgHandler.q5(h1Var, "reportActionInfo:fail", null); return true; } Log.i("MicroMsg.MsgHandler", "doReportActionInfo, appId %s", o65); if (NetStatusUtil.isConnected(msgHandler.f167360d)) { if (NetStatusUtil.isWifi(msgHandler.f167360d)) { i16 = 1; } else if (NetStatusUtil.is5G(msgHandler.f167360d)) { i16 = 5; } else if (NetStatusUtil.is4G(msgHandler.f167360d)) { i16 = 4; } else if (NetStatusUtil.is3G(msgHandler.f167360d)) { i16 = 3; } else { i16 = NetStatusUtil.is2G(msgHandler.f167360d) ? 2 : 0; } Log.i("MicroMsg.MsgHandler", "doReportActionInfo, get networkType %d", Integer.valueOf(i16)); i15 = i16; } else { i15 = 0; } long nowSecond = Util.nowSecond(); try { str3 = URLEncoder.encode(Util.nullAsNil(str2), "UTF-8"); try { str5 = URLEncoder.encode(str6, "UTF-8"); try { str4 = URLEncoder.encode(str8, "UTF-8"); try { str7 = URLEncoder.encode(str9, "UTF-8"); } catch (UnsupportedEncodingException e25) { e15 = e25; } } catch (UnsupportedEncodingException e26) { e15 = e26; str4 = str7; Log.printErrStackTrace("MicroMsg.MsgHandler", e15, str7, new Object[0]); q.INSTANCE.g(13379, Long.valueOf(nowSecond), o65, Integer.valueOf(i15), str3, str5, str, str4, str7); msgHandler.q5(h1Var, "reportActionInfo:ok", null); return true; } } catch (UnsupportedEncodingException e27) { e15 = e27; str5 = str7; str4 = str5; Log.printErrStackTrace("MicroMsg.MsgHandler", e15, str7, new Object[0]); q.INSTANCE.g(13379, Long.valueOf(nowSecond), o65, Integer.valueOf(i15), str3, str5, str, str4, str7); msgHandler.q5(h1Var, "reportActionInfo:ok", null); return true; } } catch (UnsupportedEncodingException e28) { e15 = e28; str5 = str7; str4 = str5; str3 = str4; Log.printErrStackTrace("MicroMsg.MsgHandler", e15, str7, new Object[0]); q.INSTANCE.g(13379, Long.valueOf(nowSecond), o65, Integer.valueOf(i15), str3, str5, str, str4, str7); msgHandler.q5(h1Var, "reportActionInfo:ok", null); return true; } q.INSTANCE.g(13379, Long.valueOf(nowSecond), o65, Integer.valueOf(i15), str3, str5, str, str4, str7); msgHandler.q5(h1Var, "reportActionInfo:ok", null); return true; } } public static boolean q1(MsgHandler msgHandler, h1 h1Var) { String o65 = msgHandler.o6(msgHandler.s6()); String f15 = r.f(true); String i15 = r.i(); if (Util.isNullOrNil(f15) || Util.isNullOrNil(o65) || Util.isNullOrNil(i15)) { msgHandler.q5(h1Var, "getOpenDeviceId:fail", null); } else { String mD5String = MD5Util.getMD5String(MD5Util.getMD5String(o65 + f15)); String mD5String2 = MD5Util.getMD5String(MD5Util.getMD5String(o65 + i15)); HashMap hashMap = new HashMap(); hashMap.put("deviceid", mD5String); hashMap.put("newDeviceId", mD5String2); msgHandler.q5(h1Var, "getOpenDeviceId:ok", hashMap); } return true; } public static boolean q2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("username"); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "open_biz_chat:param_err", null); } else { z1 z1Var = ((k0) d60.z.q(k0.class)).Zx().get(str); if (z1Var == null || !z1Var.u3()) { msgHandler.q5(h1Var, "open_biz_chat:not biz username", null); } else if (!z1Var.z3()) { msgHandler.q5(h1Var, "open_biz_chat:unfollow", null); } else { String str2 = h1Var.f247819a.containsKey("modalMode") ? (String) h1Var.f247819a.get("modalMode") : null; String str3 = h1Var.f247819a.containsKey("referInfo") ? (String) h1Var.f247819a.get("referInfo") : null; Intent intent = new Intent(); intent.putExtra("Chat_User", str); intent.putExtra("finish_direct", true); if (str3 != null) { intent.putExtra("key_biz_half_screen_chat_refer_info", str3); } if ("1".equals(str2)) { intent.putExtra("key_biz_half_screen_chat_style", true); intent.addFlags(67108864); intent.addFlags(268435456); sv3.b.t(msgHandler.f167360d, ".ui.chatting.BizHalfScreenChattingUI", intent, null); try { if (msgHandler.f167378x != null) { Bundle bundle = new Bundle(); bundle.putBoolean("forbid_response_kb_state_when_inactive", true); msgHandler.f167378x.v6(305, bundle); } } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "doOpenBizChat", new Object[0]); } } else { sv3.b.t(msgHandler.f167360d, ".ui.chatting.ChattingUI", intent, null); } msgHandler.q5(h1Var, "open_biz_chat:ok", null); } } return true; } public static boolean q3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE); String str2 = (String) h1Var.f247819a.get("panelShowType"); String str3 = (String) h1Var.f247819a.get("mode"); String str4 = (String) h1Var.f247819a.get("businessId"); if (Util.isNullOrNil(str)) { Log.i("MicroMsg.MsgHandler", "[WeCoin] doBuyWCCoin scene is null"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } m1 m1Var = new m1(msgHandler, h1Var); if (Util.isNullOrNil(str3) || "1".equals(str3)) { zl3.i iVar = new zl3.i(); iVar.f354476b = Util.safeParseInt(str4); iVar.f354475a = Integer.parseInt(str); zl3.g.a(str2); iVar.f354477c = ""; iVar.f354478d = m1Var; iVar.f354481g = zl3.h.COMMON_CHARGE; ((zl3.e) d60.z.q(zl3.e.class)).zK0((MMActivity) msgHandler.f167360d, iVar); } else if ("2".equals(str3)) { String str5 = (String) h1Var.f247819a.get("customCount"); String str6 = (String) h1Var.f247819a.get("productId"); String str7 = (String) h1Var.f247819a.get("agreementVersion"); if (Util.isNullOrNil(str5)) { Log.i("MicroMsg.MsgHandler", "[WeCoin] doBuyWCCoin customCount is null"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } else if (Util.isNullOrNil(str6)) { Log.i("MicroMsg.MsgHandler", "[WeCoin] doBuyWCCoin productId is null"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } else if (Util.isNullOrNil(str7)) { Log.i("MicroMsg.MsgHandler", "[WeCoin] doBuyWCCoin agreementVersion is null"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } else { zl3.i iVar2 = new zl3.i(); iVar2.f354476b = Util.safeParseInt(str4); iVar2.f354480f = str6; iVar2.f354482h = Long.parseLong(str5); iVar2.f354479e = Integer.parseInt(str7); iVar2.f354475a = Integer.parseInt(str); iVar2.f354477c = ""; iVar2.f354478d = m1Var; iVar2.f354481g = zl3.h.DIRECT_CHARGE; zl3.g.a(str2); ((zl3.e) d60.z.q(zl3.e.class)).zK0((MMActivity) msgHandler.f167360d, iVar2); } } else { Log.i("MicroMsg.MsgHandler", "mode not right"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } return true; } public static boolean q4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get(TPReportKeys.LiveExKeys.LIVE_EX_DEFINATION_SWICH); String str2 = (String) h1Var.f247819a.get("title_cn"); String str3 = (String) h1Var.f247819a.get("title_eng"); String str4 = (String) h1Var.f247819a.get("ok_cn"); String str5 = (String) h1Var.f247819a.get("ok_eng"); String str6 = (String) h1Var.f247819a.get("cancel_cn"); String str7 = (String) h1Var.f247819a.get("cancel_eng"); Log.i("MicroMsg.MsgHandler", "doSetCloseWindowConfirmDialogInfo, switch value : %s, title_cn : %s, title_eng : %s, ok_cn : %s, ok_eng : %s, cancel_cn : %s, cancel_eng : %s", str, str2, str3, str4, str5, str6, str7); Bundle bundle = new Bundle(); bundle.putString("close_window_confirm_dialog_switch", str); bundle.putString("close_window_confirm_dialog_title_cn", str2); bundle.putString("close_window_confirm_dialog_title_eng", str3); bundle.putString("close_window_confirm_dialog_ok_cn", str4); bundle.putString("close_window_confirm_dialog_ok_eng", str5); bundle.putString("close_window_confirm_dialog_cancel_cn", str6); bundle.putString("close_window_confirm_dialog_cancel_eng", str7); try { msgHandler.f167378x.callback(13, bundle); } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "doSetCloseWindowConfirmDialogInfo invoke callback failed : %s", e15.getMessage()); } msgHandler.q5(h1Var, "setCloseWindowConfirmDialogInfo:ok", null); return true; } public static boolean r(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; p.e(h1Var.f247819a, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); ((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).c(h1Var.f247819a); return false; } public static boolean r0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; String str = (String) h1Var.f247819a.get("brandUsername"); Intent Cd0 = ((z00.o) j.c(z00.o.class)).Cd0(); Cd0.putExtra("ftsneedkeyboard", true); Cd0.putExtra("ftsbizscene", 19); Cd0.putExtra("ftsType", 2); Map<String, String> tq4 = ((z00.o) j.c(z00.o.class)).tq(19, true, 2); tq4.put("userName", str); Cd0.putExtra("rawUrl", ((z00.o) j.c(z00.o.class)).FB(tq4)); Cd0.putExtra("key_load_js_without_delay", true); Cd0.putExtra("ftsbizusername", str); sv3.b.y(MMApplicationContext.getContext(), Cd0, null); return false; } /* JADX WARNING: Removed duplicated region for block: B:16:0x0046 A[Catch:{ Exception -> 0x009b }] */ /* JADX WARNING: Removed duplicated region for block: B:17:0x0048 A[Catch:{ Exception -> 0x009b }] */ /* JADX WARNING: Removed duplicated region for block: B:24:0x006e A[Catch:{ Exception -> 0x009b }, LOOP:0: B:23:0x006c->B:24:0x006e, LOOP_END] */ /* JADX WARNING: Removed duplicated region for block: B:27:0x0090 A[Catch:{ Exception -> 0x009b }] */ public static boolean r1(MsgHandler msgHandler, h1 h1Var) { String str; ih.c b15; msgHandler.getClass(); try { Bundle v65 = msgHandler.f167378x.v6(CodecError.FLUSH_ILLEGAL, null); if (v65 != null) { String[] stringArray = v65.getStringArray("webview_get_route_url_list"); int i15 = v65.getInt("webview_get_route_url_geta8key_scene"); if (i15 == 7 || i15 == 56) { String string = v65.getString("geta8key_username"); if (!Util.isNullOrNil(string) && (b15 = bg0.l.b(string)) != null) { str = b15.field_appId; Object[] objArr = new Object[3]; objArr[0] = Integer.valueOf(stringArray == null ? stringArray.length : -1); objArr[1] = Integer.valueOf(i15); objArr[2] = str; Log.i("MicroMsg.MsgHandler", "routeUrl length = %d, scene = %d, appid = %s", objArr); if (stringArray != null && stringArray.length > 0) { HashMap hashMap = new HashMap(); JSONArray jSONArray = new JSONArray(); for (String str2 : stringArray) { jSONArray.put(str2); } hashMap.put("urls", jSONArray.toString()); hashMap.put(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, Integer.valueOf(i15)); if (!Util.isNullOrNil(str)) { hashMap.put("appid", str); } msgHandler.q5(h1Var, "getRouteUrl:ok", hashMap); return true; } } } str = null; Object[] objArr2 = new Object[3]; objArr2[0] = Integer.valueOf(stringArray == null ? stringArray.length : -1); objArr2[1] = Integer.valueOf(i15); objArr2[2] = str; Log.i("MicroMsg.MsgHandler", "routeUrl length = %d, scene = %d, appid = %s", objArr2); HashMap hashMap2 = new HashMap(); JSONArray jSONArray2 = new JSONArray(); while (r10 < r9) { } hashMap2.put("urls", jSONArray2.toString()); hashMap2.put(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, Integer.valueOf(i15)); if (!Util.isNullOrNil(str)) { } msgHandler.q5(h1Var, "getRouteUrl:ok", hashMap2); return true; } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "get routeurl failed ; %s", e15.getMessage()); } msgHandler.q5(h1Var, "getRouteUrl:fail", null); return true; } public static boolean r2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; int safeParseInt = Util.safeParseInt((String) h1Var.f247819a.get("x")); int safeParseInt2 = Util.safeParseInt((String) h1Var.f247819a.get("y")); Bundle bundle = new Bundle(); bundle.putString("widgetId", (String) h1Var.f247819a.get("widgetId")); bundle.putInt("x", safeParseInt); bundle.putInt("y", safeParseInt2); bundle.putString("eventId", (String) h1Var.f247819a.get("eventId")); try { m mVar = msgHandler.f167378x; if (mVar != null) { mVar.callback(100002, bundle); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "doTapSearchWAWidgetView exception" + e15.getMessage()); } msgHandler.q5(h1Var, "tapSearchWAWidgetView:ok", null); return true; } public static boolean r3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) ((HashMap) h1Var.f247819a).get("buff"); if (str == null) { Log.i("MicroMsg.MsgHandler", "[WeCoin] doConsumeWCCoin rawPrepareBuffParams is null"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); } else { byte[] decode = Base64.decode(str, 2); String str2 = (String) ((HashMap) h1Var.f247819a).get("businessId"); String str3 = (String) ((HashMap) h1Var.f247819a).get("mode"); String str4 = (String) ((HashMap) h1Var.f247819a).get("productWecoinPrice"); String str5 = (String) ((HashMap) h1Var.f247819a).get("productTitle"); String str6 = (String) ((HashMap) h1Var.f247819a).get("productTitleInsufficient"); if (Util.isNullOrNil(str2)) { Log.i("MicroMsg.MsgHandler", "[WeCoin] doConsumeWCCoin businessId is null"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); } else { fl3.j jVar = new fl3.j(Util.safeParseInt(str2), (MMActivity) msgHandler.f167360d, new n1(msgHandler, h1Var), new o1(msgHandler, h1Var), new p1(msgHandler, h1Var)); jVar.f215478g = decode; if ("2".equals(str3)) { jVar.f215477f = fl3.i.ShowPanel; lh4.m.g(str5, "<set-?>"); jVar.f215479h = str5; lh4.m.g(str6, "<set-?>"); jVar.f215480i = str6; jVar.f215481j = Util.safeParseInt(str4); String str7 = (String) ((HashMap) h1Var.f247819a).get("productWecoinRealPrice"); if (!Util.isNullOrNil(str7)) { lh4.m.g(str7, "<set-?>"); jVar.f215482k = str7; } String str8 = (String) ((HashMap) h1Var.f247819a).get("consumeTipsWording"); if (!Util.isNullOrNil(str8)) { try { List<String> asList = Arrays.asList(Util.toStringArray(new JSONArray(str8))); lh4.m.g(asList, "<set-?>"); jVar.f215483l = asList; } catch (JSONException unused) { Log.i("MicroMsg.MsgHandler", "json parse fail"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); } } } msgHandler.H = ((zl3.e) d60.z.q(zl3.e.class)).Y90(jVar); return true; } } return false; } /* JADX WARNING: Removed duplicated region for block: B:59:0x0191 */ /* JADX WARNING: Removed duplicated region for block: B:60:0x0194 */ /* JADX WARNING: Removed duplicated region for block: B:63:0x019b */ /* JADX WARNING: Removed duplicated region for block: B:64:0x019e */ /* JADX WARNING: Removed duplicated region for block: B:66:0x01a1 A[ADDED_TO_REGION] */ public static boolean r4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; Exception e15; String str; String str2; int i15; p2 p2Var; boolean z16; int i16; int i17; Exception e16; String string; msgHandler.getClass(); String str3 = ""; String str4 = (String) h1Var.f247819a.get("verifyAppId"); String str5 = (String) h1Var.f247819a.get("verifySignature"); String str6 = (String) h1Var.f247819a.get("verifyNonceStr"); String str7 = (String) h1Var.f247819a.get("verifyTimestamp"); String str8 = (String) h1Var.f247819a.get("verifySignType"); String str9 = (String) h1Var.f247819a.get("verifyJsApiList"); String str10 = (String) h1Var.f247819a.get("url"); String str11 = h1Var.f247819a.containsKey("verifyOpenTagList") ? (String) h1Var.f247819a.get("verifyOpenTagList") : null; Log.i("MicroMsg.MsgHandler", "doPreVerifyJSAPI, appid:%s, signature:%s, nouce:%s, timeStamp:%s, signType:%s", str4, str5, str6, str7, str8); o1.a(h1Var.f247862h, false, null, str4); LinkedList linkedList = new LinkedList(); LinkedList linkedList2 = new LinkedList(); try { if (!Util.isNullOrNil(str11)) { JSONArray jSONArray = new JSONArray(str11); str = str8; for (int i18 = 0; i18 < jSONArray.length(); i18++) { linkedList2.add(jSONArray.getString(i18)); } } else { str = str8; } JSONArray jSONArray2 = new JSONArray(str9); Object[] objArr = new Object[2]; objArr[0] = str9; try { objArr[1] = str11; Log.i("MicroMsg.MsgHandler", "doPreVerifyJSAPI jsapiListStr %s, webComptListStr %s", objArr); if (jSONArray2.length() == 0 && linkedList2.size() == 0) { msgHandler.q5(h1Var, "checkJsApi:param is empty", null); } else { for (int i19 = 0; i19 < jSONArray2.length(); i19++) { String string2 = jSONArray2.getString(i19); if (!Util.isNullOrNil(string2)) { linkedList.add(string2); } } String x35 = msgHandler.f167378x.x3(); String str12 = Util.isNullOrNil(x35) ? str10 : x35; Object[] objArr2 = new Object[2]; objArr2[0] = str10; try { objArr2[1] = str12; Log.i("MicroMsg.MsgHandler", "doPreVerifyJSAPI currentUrl %s, commitUrl %s", objArr2); try { Bundle v65 = msgHandler.f167378x.v6(140, null); int i25 = v65.getInt("key_webview_preverify_info_scene", 0); try { string = v65.getString("key_webview_preverify_info_source_appid", str3); } catch (Exception e17) { e16 = e17; i16 = i25; i17 = 1; Object[] objArr3 = new Object[i17]; objArr3[0] = e16; Log.e("TAG", "doPreVerifyJSAPI: %s", objArr3); i15 = i16; str2 = str3; msgHandler.f167378x.v6(252, null); String b15 = com.tencent.mm.plugin.webview.webcompt.u.b(str10); String b16 = com.tencent.mm.plugin.webview.webcompt.u.b(str12); m mVar = msgHandler.f167378x; c cVar = msgHandler.f167382z; int l65 = msgHandler.l6(); int m65 = msgHandler.m6(); p2Var = new p2(msgHandler, b16, mVar, str12, jsapiPermissionWrapper, str10, h1Var); cVar.getClass(); z16 = !Util.isNullOrNil(str4); if (linkedList.size() <= 0) { } if (linkedList2.size() <= 0) { } if (z16) { } Log.e("MicroMsg.webview.JSVerifyHelper", "handlePreVerify wrong args, %s", str4); p2Var.b(c.a.EnumC1741a.RET_FAIL, null, null, 0, 0); return true; } try { v65.getString("raw_url", str3); i15 = i25; str2 = string; } catch (Exception e18) { e16 = e18; i16 = i25; str3 = string; i17 = 1; Object[] objArr32 = new Object[i17]; objArr32[0] = e16; Log.e("TAG", "doPreVerifyJSAPI: %s", objArr32); i15 = i16; str2 = str3; msgHandler.f167378x.v6(252, null); String b152 = com.tencent.mm.plugin.webview.webcompt.u.b(str10); String b162 = com.tencent.mm.plugin.webview.webcompt.u.b(str12); m mVar2 = msgHandler.f167378x; c cVar2 = msgHandler.f167382z; int l652 = msgHandler.l6(); int m652 = msgHandler.m6(); p2Var = new p2(msgHandler, b162, mVar2, str12, jsapiPermissionWrapper, str10, h1Var); cVar2.getClass(); z16 = !Util.isNullOrNil(str4); if (linkedList.size() <= 0) { } if (linkedList2.size() <= 0) { } if (z16) { } Log.e("MicroMsg.webview.JSVerifyHelper", "handlePreVerify wrong args, %s", str4); p2Var.b(c.a.EnumC1741a.RET_FAIL, null, null, 0, 0); return true; } } catch (Exception e19) { e16 = e19; i17 = 1; i16 = 0; Object[] objArr322 = new Object[i17]; objArr322[0] = e16; Log.e("TAG", "doPreVerifyJSAPI: %s", objArr322); i15 = i16; str2 = str3; msgHandler.f167378x.v6(252, null); String b1522 = com.tencent.mm.plugin.webview.webcompt.u.b(str10); String b1622 = com.tencent.mm.plugin.webview.webcompt.u.b(str12); m mVar22 = msgHandler.f167378x; c cVar22 = msgHandler.f167382z; int l6522 = msgHandler.l6(); int m6522 = msgHandler.m6(); p2Var = new p2(msgHandler, b1622, mVar22, str12, jsapiPermissionWrapper, str10, h1Var); cVar22.getClass(); z16 = !Util.isNullOrNil(str4); if (linkedList.size() <= 0) { } if (linkedList2.size() <= 0) { } if (z16) { } Log.e("MicroMsg.webview.JSVerifyHelper", "handlePreVerify wrong args, %s", str4); p2Var.b(c.a.EnumC1741a.RET_FAIL, null, null, 0, 0); return true; } try { msgHandler.f167378x.v6(252, null); } catch (Exception unused) { } String b15222 = com.tencent.mm.plugin.webview.webcompt.u.b(str10); String b16222 = com.tencent.mm.plugin.webview.webcompt.u.b(str12); m mVar222 = msgHandler.f167378x; c cVar222 = msgHandler.f167382z; int l65222 = msgHandler.l6(); int m65222 = msgHandler.m6(); p2Var = new p2(msgHandler, b16222, mVar222, str12, jsapiPermissionWrapper, str10, h1Var); cVar222.getClass(); z16 = !Util.isNullOrNil(str4); boolean z17 = linkedList.size() <= 0; boolean z18 = linkedList2.size() <= 0; if (z16 || (!z17 && !z18)) { Log.e("MicroMsg.webview.JSVerifyHelper", "handlePreVerify wrong args, %s", str4); p2Var.b(c.a.EnumC1741a.RET_FAIL, null, null, 0, 0); return true; } d60.z.d().a(ro0.c.CTRL_INDEX, cVar222); d60.z.d().f(new com.tencent.mm.plugin.webview.model.d0(p2Var, b15222, b16222, str4, linkedList, linkedList2, str7, str6, str5, str, i15, str2, cVar222.f167592g, l65222, m65222)); } catch (Exception e25) { e15 = e25; z15 = true; Log.w("MicroMsg.MsgHandler", "exception occur " + e15.getMessage()); msgHandler.q5(h1Var, "pre_verify_jsapi:fail", null); return z15; } } return true; } catch (Exception e26) { e15 = e26; z15 = true; Log.w("MicroMsg.MsgHandler", "exception occur " + e15.getMessage()); msgHandler.q5(h1Var, "pre_verify_jsapi:fail", null); return z15; } } catch (Exception e27) { e15 = e27; z15 = true; Log.w("MicroMsg.MsgHandler", "exception occur " + e15.getMessage()); msgHandler.q5(h1Var, "pre_verify_jsapi:fail", null); return z15; } } public static boolean s(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; String f15 = p.f(h1Var.f247819a, "username"); ((f1) j.c(f1.class)).Zr(msgHandler.f167360d, p.f(h1Var.f247819a, "contactUsername"), f15, p.f(h1Var.f247819a, "appId"), 5, p.f(h1Var.f247819a, "sceneNote"), new MsgHandler$$a(msgHandler, h1Var)); return true; } public static boolean s0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "start doChangePayActivityView"); ChangePayActivityViewEvent changePayActivityViewEvent = new ChangePayActivityViewEvent(); String str = (String) h1Var.f247819a.get("showInfo"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "changePayActivityView eroor, parse showinfo to jsonarray error"); msgHandler.q5(h1Var, "changePayActivityView:fail", null); return false; } try { JSONObject jSONObject = new JSONObject(str); changePayActivityViewEvent.f61995d.f61997a = jSONObject.getString("buttonTitle"); String string = jSONObject.getString("isButtonEnable"); String string2 = jSONObject.getString("isButtonHidden"); String string3 = jSONObject.getString("isActivityViewHidden"); Log.i("MicroMsg.MsgHandler", "isButtonEnable:" + string + " isButtonHidden:" + string2 + " isActivityViewHidden:" + string3); changePayActivityViewEvent.f61995d.f61998b = Util.getInt(string, 0) > 0; changePayActivityViewEvent.f61995d.f61999c = Util.getInt(string2, 0) > 0; changePayActivityViewEvent.f61995d.f62000d = Util.getInt(string3, 0) > 0; changePayActivityViewEvent.publish(); if (changePayActivityViewEvent.f61996e.f62001a) { Log.i("MicroMsg.MsgHandler", "changePayActivityView:ok"); msgHandler.q5(h1Var, "changePayActivityView:ok", null); } else { Log.i("MicroMsg.MsgHandler", "changePayActivityView:fail"); msgHandler.q5(h1Var, "changePayActivityView:fail", null); } return true; } catch (Exception unused) { Log.e("MicroMsg.MsgHandler", "changePayActivityView eroor, parse showinfo to jsonarray error"); msgHandler.q5(h1Var, "changePayActivityView:fail", null); return false; } } /* JADX WARNING: Removed duplicated region for block: B:11:0x005b */ /* JADX WARNING: Removed duplicated region for block: B:12:0x0068 */ public static boolean s1(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { int i15; int safeParseInt; Exception e15; msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "start secureTunnel"); String s65 = msgHandler.s6(); String o65 = msgHandler.o6(s65); try { i15 = msgHandler.f167378x.r8(); try { Log.e("MicroMsg.MsgHandler", "securetunnel getA8keyscene: " + msgHandler.f167378x.r8()); } catch (Exception e16) { e15 = e16; } } catch (Exception e17) { e15 = e17; i15 = 0; Log.e("MicroMsg.MsgHandler", "getCurrentUrl, exception = %s", e15); if (!Util.isNullOrNil((String) h1Var.f247819a.get("type"))) { } return true; } if (!Util.isNullOrNil((String) h1Var.f247819a.get("type"))) { Log.e("MicroMsg.MsgHandler", "securetunnel type nil"); msgHandler.q5(h1Var, "secureTunnel:fail", null); msgHandler.f167375u = false; } else if (Util.isNullOrNil((String) h1Var.f247819a.get("reqbuf"))) { Log.e("MicroMsg.MsgHandler", "securetunnel reqbuf nil"); msgHandler.q5(h1Var, "secureTunnel:fail", null); msgHandler.f167375u = false; } else if (Util.isNullOrNil((String) h1Var.f247819a.get(FileReaderHelper.OPEN_FILE_FROM_CMD))) { Log.e("MicroMsg.MsgHandler", "securetunnel cmd nil"); msgHandler.q5(h1Var, "secureTunnel:fail", null); msgHandler.f167375u = false; } else { if (h1Var.f247819a.containsKey("timeout") && (safeParseInt = Util.safeParseInt((String) h1Var.f247819a.get("timeout"))) != 0) { h1Var.f247819a.put("timeout", Integer.valueOf(safeParseInt)); } l1 l1Var = new l1(msgHandler, h1Var); if (((String) h1Var.f247819a.get("type")).equals("wxpay")) { Log.i("MicroMsg.MsgHandler", "secureTunnel doscene"); ((qv3.d) j.c(qv3.d.class)).Ur0(h1Var.f247819a, s65, o65, i15, l1Var); msgHandler.f167375u = false; } else { Log.i("MicroMsg.MsgHandler", "secureTunnel callback fail: invalid type"); HashMap hashMap = new HashMap(); hashMap.put("err_desc", "invalid type"); msgHandler.q5(h1Var, "secureTunnel:fail", hashMap); msgHandler.f167375u = false; } } return true; } public static boolean s2(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); String str = (String) map.get("query"); String str2 = (String) map.get("sortedContacts"); int safeParseInt = Util.safeParseInt((String) map.get("offset")); int safeParseInt2 = Util.safeParseInt((String) map.get("count")); int nullAsInt = Util.nullAsInt(map.get("webview_instance_id"), -1); if (TextUtils.isEmpty(str2)) { str2 = ""; } ArrayList arrayList = new ArrayList(); try { JSONArray jSONArray = new JSONArray(str2); for (int i15 = 0; i15 < jSONArray.length(); i15++) { arrayList.add(jSONArray.optString(i15)); } } catch (JSONException e15) { Log.printErrStackTrace("MicroMsg.WebSearch.FTSWebViewLogic", e15, "", new Object[0]); } if (fTSWebViewLogic.f164242r == null) { fTSWebViewLogic.f164242r = new so3.b(); } so3.d dVar = new so3.d(str, arrayList); so3.d dVar2 = fTSWebViewLogic.f164243s; if (dVar2 == null || !dVar2.equals(dVar)) { fTSWebViewLogic.f164243s = dVar; so3.b bVar = (so3.b) fTSWebViewLogic.f164242r; ((HashMap) bVar.f304292b).put(dVar, new com.tencent.mm.plugin.websearch.h(fTSWebViewLogic, safeParseInt, safeParseInt2, nullAsInt)); bVar.a(dVar, bVar.f304294d); } else { so3.d dVar3 = fTSWebViewLogic.f164243s; if (dVar3.f304299e) { fTSWebViewLogic.c(dVar3, safeParseInt, safeParseInt2, nullAsInt); } } return false; } public static boolean s3(MsgHandler msgHandler, h1 h1Var) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("alwaysDarkMode"); if (str == null || !str.equals("1")) { z15 = false; } else { z15 = true; } zl3.d Fq0 = ((zl3.e) d60.z.q(zl3.e.class)).Fq0(msgHandler.f167360d, z15); if (Fq0 == null) { msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); } else { Fq0.a(new q1(msgHandler, h1Var)); } return true; } public static boolean t0(MsgHandler msgHandler, h1 h1Var) { Context context; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("cardType"); if (Util.isNullOrNil(str) || (context = msgHandler.f167360d) == null) { msgHandler.q5(h1Var, "scanLicence:fail", null); } else if (!msgHandler.D.b(str, context, new j1(msgHandler, str, h1Var))) { HashMap hashMap = new HashMap(1); hashMap.put("cardType", str); msgHandler.q5(h1Var, "scanLicence:type not supported", hashMap); } return true; } public static boolean t1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("sendId"); int safeParseInt = Util.safeParseInt((String) h1Var.f247819a.get("hbKind")); if (!Util.isNullOrNil(str)) { Log.i("MicroMsg.MsgHandler", "sendId: %s, hbKind: %s", str, Integer.valueOf(safeParseInt)); Intent intent = new Intent(); intent.putExtra("key_sendid", str); intent.putExtra("key_jump_from", 4); if (safeParseInt == 2) { intent.putExtra("key_hb_kind", safeParseInt); sv3.b.j(msgHandler.f167360d, "luckymoney", ".ui.LuckyMoneyBusiDetailUI", intent, null); } else if (safeParseInt == 5) { intent.putExtra("key_hb_kind", safeParseInt); sv3.b.j(msgHandler.f167360d, "luckymoney", ".ui.LuckyMoneyBeforeDetailUI", intent, null); } else if (safeParseInt == 6) { intent.putExtra("key_hk_scene", 3); intent.putExtra("key_hb_kind", safeParseInt); sv3.b.j(msgHandler.f167360d, "luckymoney", ".hk.ui.LuckyMoneyHKBeforeDetailUI", intent, null); } else if (safeParseInt == 7) { intent.putExtra("key_hb_kind", safeParseInt); sv3.b.j(msgHandler.f167360d, "luckymoney", ".ui.LuckyMoneyBeforeDetailUI", intent, null); } else { sv3.b.j(msgHandler.f167360d, "luckymoney", ".ui.LuckyMoneyBeforeDetailUI", intent, null); } msgHandler.q5(h1Var, "openLuckyMoneyDetailView:ok", null); } else { msgHandler.q5(h1Var, "openLuckyMoneyDetailView:fail", null); } return true; } /* JADX WARNING: Removed duplicated region for block: B:146:0x0592 */ /* JADX WARNING: Removed duplicated region for block: B:27:0x011c A[SYNTHETIC, Splitter:B:27:0x011c] */ /* JADX WARNING: Removed duplicated region for block: B:41:0x014b */ /* JADX WARNING: Removed duplicated region for block: B:44:0x0150 */ /* JADX WARNING: Removed duplicated region for block: B:47:0x0157 A[SYNTHETIC, Splitter:B:47:0x0157] */ /* JADX WARNING: Removed duplicated region for block: B:51:0x017a */ /* JADX WARNING: Removed duplicated region for block: B:54:0x01d5 */ public static boolean t2(MsgHandler msgHandler, h1 h1Var) { boolean z15; String str; String str2; String str3; String str4; int i15; int i16; boolean z16; String str5; boolean z17; String str6; JSONException e15; String str7; JSONException e16; String str8; msgHandler.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; int i17 = msgHandler.A; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "openSearchWebView %s", map.toString()); int safeParseInt = Util.safeParseInt((String) map.get("actionType")); int e17 = p.e(map, "type", 0); String str9 = (String) map.get("extParams"); String str10 = (String) map.get("jumpTo"); String str11 = (String) map.get("navBarColor"); String f15 = p.f(map, "publishId"); boolean equals = "true".equals((String) map.get("hideSearchBar")); boolean equals2 = "true".equals((String) map.get("isMoreButton")); boolean equals3 = "true".equals((String) map.get("isShowCancel")); int safeParseInt2 = Util.safeParseInt((String) map.get("isHomePage")); String valueOf = String.valueOf(map.get("isSug")); boolean z18 = p.e(map, "isHalfScreen", 0) == 1; String str12 = (String) map.get("nativeConfig"); if (!Util.isNullOrNil(str12)) { z15 = equals3; try { JSONObject jSONObject = new JSONObject(str12); str7 = jSONObject.has(FFmpegMetadataRetriever.METADATA_KEY_TITLE) ? jSONObject.optString(FFmpegMetadataRetriever.METADATA_KEY_TITLE) : null; try { if (jSONObject.has("searchBarTextColor")) { str8 = jSONObject.optString("searchBarTextColor"); } else { str8 = null; } str2 = str8; } catch (JSONException e18) { e16 = e18; Log.printErrStackTrace("MicroMsg.WebSearch.FTSWebViewLogic", e16, "", new Object[0]); str2 = null; str = str7; str3 = (String) map.get("navButtonConfig"); if (!Util.isNullOrNil(str3)) { } i15 = 0; if (z18) { } if (Util.isNullOrNil(str11)) { } String str13 = (String) map.get("statusBarStyle"); String str14 = (String) map.get("tagId"); String str15 = (String) map.get("sessionId"); String str16 = (String) map.get("srcUserName"); int e19 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); int e25 = p.e(map, "subType", 0); int e26 = p.e(map, "ftsNeedHideKeyBoard", 0); if (safeParseInt == 1) { } z16 = false; return z16; } } catch (JSONException e27) { e16 = e27; str7 = null; Log.printErrStackTrace("MicroMsg.WebSearch.FTSWebViewLogic", e16, "", new Object[0]); str2 = null; str = str7; str3 = (String) map.get("navButtonConfig"); if (!Util.isNullOrNil(str3)) { } i15 = 0; if (z18) { } if (Util.isNullOrNil(str11)) { } String str132 = (String) map.get("statusBarStyle"); String str142 = (String) map.get("tagId"); String str152 = (String) map.get("sessionId"); String str162 = (String) map.get("srcUserName"); int e192 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); int e252 = p.e(map, "subType", 0); int e262 = p.e(map, "ftsNeedHideKeyBoard", 0); if (safeParseInt == 1) { } z16 = false; return z16; } str = str7; } else { z15 = equals3; str2 = null; str = null; } str3 = (String) map.get("navButtonConfig"); if (!Util.isNullOrNil(str3)) { try { JSONObject jSONObject2 = new JSONObject(str3); str4 = FFmpegMetadataRetriever.METADATA_KEY_TITLE; try { String optString = jSONObject2.optString("leftBarButtonType", "back"); if (optString.equals("exit")) { i15 = 1; } else if (optString.equals("none")) { i15 = 2; } } catch (JSONException e28) { e15 = e28; Log.printErrStackTrace("MicroMsg.WebSearch.FTSWebViewLogic", e15, "", new Object[0]); i15 = 0; if (z18) { } if (Util.isNullOrNil(str11)) { } String str1322 = (String) map.get("statusBarStyle"); String str1422 = (String) map.get("tagId"); String str1522 = (String) map.get("sessionId"); String str1622 = (String) map.get("srcUserName"); int e1922 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); int e2522 = p.e(map, "subType", 0); int e2622 = p.e(map, "ftsNeedHideKeyBoard", 0); if (safeParseInt == 1) { } z16 = false; return z16; } } catch (JSONException e29) { e15 = e29; str4 = FFmpegMetadataRetriever.METADATA_KEY_TITLE; Log.printErrStackTrace("MicroMsg.WebSearch.FTSWebViewLogic", e15, "", new Object[0]); i15 = 0; if (z18) { } if (Util.isNullOrNil(str11)) { } String str13222 = (String) map.get("statusBarStyle"); String str14222 = (String) map.get("tagId"); String str15222 = (String) map.get("sessionId"); String str16222 = (String) map.get("srcUserName"); int e19222 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); int e25222 = p.e(map, "subType", 0); int e26222 = p.e(map, "ftsNeedHideKeyBoard", 0); if (safeParseInt == 1) { } z16 = false; return z16; } if (z18) { i15 = 2; } if (Util.isNullOrNil(str11)) { try { i16 = Color.parseColor(str11); } catch (IllegalArgumentException e35) { Log.e("MicroMsg.WebSearch.FTSWebViewLogic", "startSearchItemDetailPage: " + e35.getMessage()); return true; } } else { i16 = 0; } String str132222 = (String) map.get("statusBarStyle"); String str142222 = (String) map.get("tagId"); String str152222 = (String) map.get("sessionId"); String str162222 = (String) map.get("srcUserName"); int e192222 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); int e252222 = p.e(map, "subType", 0); int e262222 = p.e(map, "ftsNeedHideKeyBoard", 0); if (safeParseInt == 1) { if (safeParseInt != 2) { if (safeParseInt != 3) { if (safeParseInt == 5) { String f16 = p.f(map, "query"); int e36 = p.e(map, "topStoryScene", 0); int e37 = p.e(map, "tagId", 0); String f17 = p.f(map, "navigationId"); String f18 = p.f(map, "newLifeByPass"); String f19 = p.f(map, "reportExtraInfo"); if (Util.isNullOrNil(str152222)) { str152222 = jo3.z0.f(e36); } String valueOf2 = String.valueOf(System.currentTimeMillis()); HashMap<String, String> hashMap = new HashMap<>(); hashMap.put(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, String.valueOf(21)); hashMap.put("query", f16); hashMap.put("extParams", str9); hashMap.put("sessionId", str152222); hashMap.put("subSessionId", str152222); hashMap.put("requestId", valueOf2); hashMap.put("pRequestId", valueOf2); hashMap.put(TPReportKeys.Common.COMMON_SEQ, valueOf2); hashMap.put("navigationId", f17); hashMap.put(AssistantStore.DownloadInfos.DownloadInfoColumns.CHANNELID, String.valueOf(e37)); w65 w65 = new w65(); w65.f40716p = ((e00.n) j.c(e00.n.class)).gL0(); w65.f40712i = e36; w65.f40707d = ""; w65.f40711h = f16; w65.f40708e = str152222; w65.f40709f = str152222; w65.f40721u = 2; w65.f40713j = ((e00.h) j.c(e00.h.class)).en0(hashMap); w65.f40722v = str; w65.f40719s = e37; w65.f40714n = valueOf2; w65.f40720t = f17; w65.f40723w = p.c(); w65.E = f18; e00 e002 = new e00(); e002.f19923d = "rec_category"; e002.f19924e = (long) e37; e002.f19925f = String.valueOf(e37); w65.f40715o.add(e002); if (!Util.isNullOrNil(f18)) { if (map.containsKey("setCachePage")) { int i18 = gw.i.E0; ServiceStateCenter<gw.m> ub02 = ((gw.f) j.c(gw.f.class)).ub0(); if (ub02 != null) { ub02.dispatch(new hw.q(f18)); } } else if (!a42.a.f1076a.a("entrance")) { gw.l.c(6, 2, 211); Bundle bundle = new Bundle(); bundle.putString("newlifeSearchByPassInfo", f18); ((e00.n) j.c(e00.n.class)).tr(MMApplicationContext.getContext(), e192222, bundle); } ((gw.h) j.c(gw.h.class)).YI("newlife_reportExtraInfo", f19); } else { ((e00.n) j.c(e00.n.class)).nt(MMApplicationContext.getContext(), w65, valueOf2); } } else if (safeParseInt != 7) { if (safeParseInt == 8) { String f25 = p.f(map, "query"); JSONObject jSONObject3 = new JSONObject(); try { jSONObject3.put("word", f25); jSONObject3.put("id", String.valueOf(System.currentTimeMillis())); jSONObject3.put(AppMeasurement.Param.TIMESTAMP, String.valueOf(System.currentTimeMillis())); jSONObject3.put("showType", 1); jSONObject3.put("jumpUrl", p.f(map, "jumpUrl")); } catch (Exception unused) { } ((b62.q) j.c(b62.q.class)).L4(f25 + "" + "1", jSONObject3.toString()); } } } String f26 = p.f(map, "query"); String f27 = p.f(map, "searchId"); Intent intent = new Intent(); if (e262222 == 1 || e262222 == 2) { intent.putExtra("ftsneedkeyboard", e262222 == 1); } intent.putExtra("hardcode_jspermission", JsapiPermissionWrapper.f173510h); intent.putExtra("hardcode_general_ctrl", GeneralControlWrapper.f173507e); intent.putExtra("neverGetA8Key", true); intent.putExtra("key_load_js_without_delay", true); intent.putExtra("ftsQuery", f26); intent.putExtra("ftsType", e17); intent.putExtra("customize_status_bar_color", i16); intent.putExtra("status_bar_style", str132222); intent.putExtra("jumpto_sns_contact_page", "snsContactPage".equalsIgnoreCase(str10)); intent.putExtra("KPublisherId", f15); intent.putExtra("ftsbizscene", e192222); intent.putExtra("key_preload_biz", 4); intent.putExtra("ftsismorebutton", equals2); intent.putExtra("ftsisshowcancel", z15); if (str != null) { intent.putExtra(str4, str); } int e38 = p.e(map, "tabPageType", 0); Map<String, String> c15 = jo3.z0.c(e192222, false, e17, str9); try { str5 = ck.q.b(f26, "utf-8"); } catch (Throwable unused2) { str5 = f26; } HashMap hashMap2 = (HashMap) c15; hashMap2.put("query", str5); hashMap2.put("searchId", f27); hashMap2.put("isHomePage", String.valueOf(safeParseInt2)); hashMap2.put("isSug", valueOf); if (!TextUtils.isEmpty(str152222)) { hashMap2.put("sessionId", str152222); intent.putExtra("sessionId", str152222); } String f28 = jo3.z0.f(e192222); hashMap2.put("subSessionId", f28); intent.putExtra("subSessionId", f28); intent.putExtra("rawUrl", jo3.z0.e(c15, 0)); intent.putExtra("ftsQuery", f26); intent.putExtra("customize_status_bar_color", i16); intent.putExtra("status_bar_style", str132222); intent.putExtra("tabId", str142222); intent.putExtra("key_load_js_without_delay", true); intent.putExtra("key_back_btn_type", i15); intent.putExtra("key_search_bar_text_color", str2); if (e38 == 1) { intent.putExtra("ftscaneditable", false); jo3.z0.l(MMApplicationContext.getContext(), f26, intent, str, str9, f27, str152222, f28); return false; } if (e192222 == 20 || e192222 == 22 || e192222 == 33 || e192222 == 3 || e192222 == 34 || e192222 == 65 || e192222 == 36 || e192222 == 100 || e192222 == 67 || e192222 == 140) { z17 = true; intent.putExtra("key_search_icon_and_hint_fix_default", true); intent.putExtra("ftsInitToSearch", true); intent.putExtra("hideSearchInput", equals); str6 = ".ui.tools.fts.FTSSOSHomeWebViewUI"; } else { intent.putExtra("key_change_search_icon", true); intent.putExtra("key_search_icon_and_hint_fix_default", true); str6 = ".ui.tools.fts.FTSSearchTabWebViewUI"; z17 = true; } if (e192222 == 125) { intent.putExtra("ftsForceShowDarkMode", z17); } if (z18) { intent.putExtra("ftscaneditable", false); } if (!TextUtils.isEmpty(str6)) { if (str6.endsWith(".ui.tools.fts.FTSSOSHomeWebViewUI")) { ((h0) j.c(h0.class)).Yb0(MMApplicationContext.getContext(), intent, z18, true); } else { ((h0) j.c(h0.class)).nI(MMApplicationContext.getContext(), intent, z18); } } } String f29 = p.f(map, "jumpUrl"); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "jump url = %s", f29); Bundle TQ = i17 != -1 ? ((o0) j.c(o0.class)).TQ(i17) : null; if (!Util.isNullOrNil(f29)) { fTSWebViewLogic.n(f29, TQ, i16, str132222, f15, 0, str162222, e192222, e252222, ""); } } else { if (e17 == 1) { z16 = false; fTSWebViewLogic.k(fTSWebViewLogic.i(map), false); } else if (e17 == 8) { String f35 = p.f(map, "snsid"); String f36 = p.f(map, "objectXmlDesc"); String f37 = p.f(map, "userName"); z16 = false; fTSWebViewLogic.m(f35, f36, f37, p.d(map, "fromMusicItem", false)); } else if (e17 != 32) { String f38 = p.f(map, "jumpUrl"); Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "jump url = %s", f38); Bundle TQ2 = i17 != -1 ? ((o0) j.c(o0.class)).TQ(i17) : null; if (!Util.isNullOrNil(f38)) { fTSWebViewLogic.n(f38, TQ2, i16, str132222, f15, 0, str162222, e192222, e252222, ""); } } else { fTSWebViewLogic.l(fTSWebViewLogic.h(map)); } return z16; } z16 = false; return z16; } str4 = FFmpegMetadataRetriever.METADATA_KEY_TITLE; i15 = 0; if (z18) { } if (Util.isNullOrNil(str11)) { } String str1322222 = (String) map.get("statusBarStyle"); String str1422222 = (String) map.get("tagId"); String str1522222 = (String) map.get("sessionId"); String str1622222 = (String) map.get("srcUserName"); int e1922222 = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); int e2522222 = p.e(map, "subType", 0); int e2622222 = p.e(map, "ftsNeedHideKeyBoard", 0); if (safeParseInt == 1) { } z16 = false; return z16; } public static boolean t3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); if (Util.isNullOrNil((String) h1Var.f247819a.get("businessId"))) { Log.i("MicroMsg.MsgHandler", "[WeCoin] doEnterWCCoinHomePage businessId is null"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } ((zl3.e) d60.z.q(zl3.e.class)).wb(msgHandler.f167360d); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); return true; } public static boolean t4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { if (!msgHandler.G6()) { Log.w("MicroMsg.MsgHandler", "Do not in recording state."); msgHandler.q5(h1Var, "stopRecord:fail", null); } else { String str = (String) h1Var.f247819a.get("appId"); Log.i("MicroMsg.MsgHandler", "stop record appId : %s", str); o1.a(h1Var.f247862h, false, null, str); WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(msgHandler.X); if (b15 == null || !str.equals(b15.f165427d)) { Log.e("MicroMsg.MsgHandler", "get jssdk file item by id failed or the appid is not corrected, appid is : %s", str); msgHandler.q5(h1Var, "stopRecord:fail", null); } else { MMHandlerThread.postToMainThread(new x2(msgHandler, b15)); Log.i("MicroMsg.MsgHandler", "stop record, file name : %s, file path : %s, localid : %s", b15.f165433j, b15.f165430g, b15.f165428e); HashMap hashMap = new HashMap(); hashMap.put(l3.COL_LOCALID, b15.f165428e); try { msgHandler.f167378x.callback(2009, null); } catch (RemoteException unused) { Log.e("MicroMsg.MsgHandler", "callback on stop record failed."); } msgHandler.q5(h1Var, "stopRecord:ok", hashMap); } } return true; } /* JADX WARNING: Removed duplicated region for block: B:25:0x00b8 */ /* JADX WARNING: Removed duplicated region for block: B:28:0x00de */ /* JADX WARNING: Removed duplicated region for block: B:36:0x014e */ /* JADX WARNING: Removed duplicated region for block: B:39:0x0195 A[SYNTHETIC, Splitter:B:39:0x0195] */ /* JADX WARNING: Removed duplicated region for block: B:47:0x01be */ /* JADX WARNING: Removed duplicated region for block: B:50:0x01cb */ /* JADX WARNING: Removed duplicated region for block: B:55:0x01e9 */ /* JADX WARNING: Removed duplicated region for block: B:62:0x0228 */ /* JADX WARNING: Removed duplicated region for block: B:63:0x022e */ public static boolean u0(MsgHandler msgHandler, h1 h1Var) { int i15; String str; Bundle bundle; Bundle v65; msgHandler.f167375u = false; StartAppBrandUIFromOuterEvent startAppBrandUIFromOuterEvent = new StartAppBrandUIFromOuterEvent(); StartAppBrandUIFromOuterEvent.a aVar = startAppBrandUIFromOuterEvent.f64736d; aVar.f64743f = msgHandler.f167360d; aVar.f64738a = p.f(h1Var.f247819a, "userName"); startAppBrandUIFromOuterEvent.f64736d.f64745h = p.f(h1Var.f247819a, "appId"); startAppBrandUIFromOuterEvent.f64736d.f64739b = p.f(h1Var.f247819a, "relativeURL"); startAppBrandUIFromOuterEvent.f64736d.f64746i = p.e(h1Var.f247819a, "appVersion", 0); startAppBrandUIFromOuterEvent.f64736d.f64741d = p.e(h1Var.f247819a, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 1018); int i16 = 2; if (msgHandler.l6() == 2) { StartAppBrandUIFromOuterEvent.a aVar2 = startAppBrandUIFromOuterEvent.f64736d; if (((c1) j.c(c1.class)).oV(aVar2.f64745h, aVar2.f64738a)) { i15 = 3; if (i15 != 0) { Bundle bundle2 = new Bundle(); bundle2.putInt("stat_scene", i15); startAppBrandUIFromOuterEvent.f64736d.f64757t = bundle2; } startAppBrandUIFromOuterEvent.f64736d.f64742e = p.f(h1Var.f247819a, "sceneNote"); if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64742e)) { startAppBrandUIFromOuterEvent.f64736d.f64742e = ck.q.a(Util.nullAsNil(msgHandler.s6())); } startAppBrandUIFromOuterEvent.f64736d.f64748k = p.f(h1Var.f247819a, "downloadURL"); startAppBrandUIFromOuterEvent.f64736d.f64740c = p.e(h1Var.f247819a, "openType", 0); startAppBrandUIFromOuterEvent.f64736d.f64749l = p.f(h1Var.f247819a, "checkSumMd5"); StartAppBrandUIFromOuterEvent.a aVar3 = startAppBrandUIFromOuterEvent.f64736d; aVar3.f64751n = false; aVar3.f64752o.f78387f = p.f(h1Var.f247819a, "extJsonInfo"); startAppBrandUIFromOuterEvent.f64736d.f64758u = msgHandler.o6(msgHandler.s6()); if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64758u) && (bundle = h1Var.f247859e) != null) { startAppBrandUIFromOuterEvent.f64736d.f64758u = bundle.getString("appId"); } if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64758u)) { startAppBrandUIFromOuterEvent.f64736d.f64758u = p.f(h1Var.f247819a, "sourceAppId"); } startAppBrandUIFromOuterEvent.f64736d.f64759v = msgHandler.s6(); startAppBrandUIFromOuterEvent.f64736d.f64760w = p.f(h1Var.f247819a, "privateExtraData"); startAppBrandUIFromOuterEvent.f64736d.f64763z = p.f(h1Var.f247819a, "extraData"); startAppBrandUIFromOuterEvent.f64736d.f64761x = p.f(h1Var.f247819a, "adUxInfo"); if (!TextUtils.isEmpty(startAppBrandUIFromOuterEvent.f64736d.f64761x)) { try { Bundle v66 = msgHandler.f167378x.v6(300, Bundle.EMPTY); if (v66 == null) { str = null; } else { str = v66.getString(w.j.f187151q); } startAppBrandUIFromOuterEvent.f64736d.f64761x = str; lq2.a.c("WebViewUI", "openWeApp", str, "intent"); } catch (Throwable th5) { Log.e("MicroMsg.MsgHandler", "doOpenWeApp try get adUxInfo by ipc, t=%s", th5); } } else { lq2.a.c("WebViewUI", "openWeApp", startAppBrandUIFromOuterEvent.f64736d.f64761x, "msg.params"); } if (h1Var.f247859e != null) { String f15 = p.f(h1Var.f247819a, "nativeExtraData"); if (!Util.isNullOrNil(f15)) { startAppBrandUIFromOuterEvent.f64736d.B = f15; } } if (((HashMap) h1Var.f247819a).containsKey("devuin")) { startAppBrandUIFromOuterEvent.f64736d.f64747j = gh.q.b(p.f(h1Var.f247819a, "devuin")); } Bundle v67 = msgHandler.f167378x.v6(302, Bundle.EMPTY); v67.setClassLoader(ActivityStarterIpcDelegate.class.getClassLoader()); startAppBrandUIFromOuterEvent.f64736d.f64744g = v67.getParcelable("delegate"); startAppBrandUIFromOuterEvent.publish(); if (!startAppBrandUIFromOuterEvent.f64737e.f64764a) { msgHandler.q5(h1Var, "openWeApp:ok", null); } else { msgHandler.q5(h1Var, "openWeApp:fail:" + Util.nullAsNil(startAppBrandUIFromOuterEvent.f64737e.f64765b), null); } return true; } } if (msgHandler.l6() == 1) { StartAppBrandUIFromOuterEvent.a aVar4 = startAppBrandUIFromOuterEvent.f64736d; if (((c1) j.c(c1.class)).oV(aVar4.f64745h, aVar4.f64738a)) { try { m mVar = msgHandler.f167378x; if (!(mVar == null || (v65 = mVar.v6(1020, null)) == null)) { String string = v65.getString("key_get_a8key_req_params_username"); if (!Util.isNullOrNil(string)) { if (!string.endsWith("chatroom")) { i16 = 1; } i15 = i16; if (i15 != 0) { } startAppBrandUIFromOuterEvent.f64736d.f64742e = p.f(h1Var.f247819a, "sceneNote"); if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64742e)) { } startAppBrandUIFromOuterEvent.f64736d.f64748k = p.f(h1Var.f247819a, "downloadURL"); startAppBrandUIFromOuterEvent.f64736d.f64740c = p.e(h1Var.f247819a, "openType", 0); startAppBrandUIFromOuterEvent.f64736d.f64749l = p.f(h1Var.f247819a, "checkSumMd5"); StartAppBrandUIFromOuterEvent.a aVar32 = startAppBrandUIFromOuterEvent.f64736d; aVar32.f64751n = false; aVar32.f64752o.f78387f = p.f(h1Var.f247819a, "extJsonInfo"); startAppBrandUIFromOuterEvent.f64736d.f64758u = msgHandler.o6(msgHandler.s6()); startAppBrandUIFromOuterEvent.f64736d.f64758u = bundle.getString("appId"); if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64758u)) { } startAppBrandUIFromOuterEvent.f64736d.f64759v = msgHandler.s6(); startAppBrandUIFromOuterEvent.f64736d.f64760w = p.f(h1Var.f247819a, "privateExtraData"); startAppBrandUIFromOuterEvent.f64736d.f64763z = p.f(h1Var.f247819a, "extraData"); startAppBrandUIFromOuterEvent.f64736d.f64761x = p.f(h1Var.f247819a, "adUxInfo"); if (!TextUtils.isEmpty(startAppBrandUIFromOuterEvent.f64736d.f64761x)) { } if (h1Var.f247859e != null) { } if (((HashMap) h1Var.f247819a).containsKey("devuin")) { } Bundle v672 = msgHandler.f167378x.v6(302, Bundle.EMPTY); v672.setClassLoader(ActivityStarterIpcDelegate.class.getClassLoader()); startAppBrandUIFromOuterEvent.f64736d.f64744g = v672.getParcelable("delegate"); startAppBrandUIFromOuterEvent.publish(); if (!startAppBrandUIFromOuterEvent.f64737e.f64764a) { } return true; } } i16 = 0; i15 = i16; } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "invokeAsResult error.%s", e15); } if (i15 != 0) { } startAppBrandUIFromOuterEvent.f64736d.f64742e = p.f(h1Var.f247819a, "sceneNote"); if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64742e)) { } startAppBrandUIFromOuterEvent.f64736d.f64748k = p.f(h1Var.f247819a, "downloadURL"); startAppBrandUIFromOuterEvent.f64736d.f64740c = p.e(h1Var.f247819a, "openType", 0); startAppBrandUIFromOuterEvent.f64736d.f64749l = p.f(h1Var.f247819a, "checkSumMd5"); StartAppBrandUIFromOuterEvent.a aVar322 = startAppBrandUIFromOuterEvent.f64736d; aVar322.f64751n = false; aVar322.f64752o.f78387f = p.f(h1Var.f247819a, "extJsonInfo"); startAppBrandUIFromOuterEvent.f64736d.f64758u = msgHandler.o6(msgHandler.s6()); startAppBrandUIFromOuterEvent.f64736d.f64758u = bundle.getString("appId"); if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64758u)) { } startAppBrandUIFromOuterEvent.f64736d.f64759v = msgHandler.s6(); startAppBrandUIFromOuterEvent.f64736d.f64760w = p.f(h1Var.f247819a, "privateExtraData"); startAppBrandUIFromOuterEvent.f64736d.f64763z = p.f(h1Var.f247819a, "extraData"); startAppBrandUIFromOuterEvent.f64736d.f64761x = p.f(h1Var.f247819a, "adUxInfo"); if (!TextUtils.isEmpty(startAppBrandUIFromOuterEvent.f64736d.f64761x)) { } if (h1Var.f247859e != null) { } if (((HashMap) h1Var.f247819a).containsKey("devuin")) { } Bundle v6722 = msgHandler.f167378x.v6(302, Bundle.EMPTY); v6722.setClassLoader(ActivityStarterIpcDelegate.class.getClassLoader()); startAppBrandUIFromOuterEvent.f64736d.f64744g = v6722.getParcelable("delegate"); startAppBrandUIFromOuterEvent.publish(); if (!startAppBrandUIFromOuterEvent.f64737e.f64764a) { } return true; } } i15 = 0; if (i15 != 0) { } startAppBrandUIFromOuterEvent.f64736d.f64742e = p.f(h1Var.f247819a, "sceneNote"); if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64742e)) { } startAppBrandUIFromOuterEvent.f64736d.f64748k = p.f(h1Var.f247819a, "downloadURL"); startAppBrandUIFromOuterEvent.f64736d.f64740c = p.e(h1Var.f247819a, "openType", 0); startAppBrandUIFromOuterEvent.f64736d.f64749l = p.f(h1Var.f247819a, "checkSumMd5"); StartAppBrandUIFromOuterEvent.a aVar3222 = startAppBrandUIFromOuterEvent.f64736d; aVar3222.f64751n = false; aVar3222.f64752o.f78387f = p.f(h1Var.f247819a, "extJsonInfo"); startAppBrandUIFromOuterEvent.f64736d.f64758u = msgHandler.o6(msgHandler.s6()); startAppBrandUIFromOuterEvent.f64736d.f64758u = bundle.getString("appId"); if (Util.isNullOrNil(startAppBrandUIFromOuterEvent.f64736d.f64758u)) { } startAppBrandUIFromOuterEvent.f64736d.f64759v = msgHandler.s6(); startAppBrandUIFromOuterEvent.f64736d.f64760w = p.f(h1Var.f247819a, "privateExtraData"); startAppBrandUIFromOuterEvent.f64736d.f64763z = p.f(h1Var.f247819a, "extraData"); startAppBrandUIFromOuterEvent.f64736d.f64761x = p.f(h1Var.f247819a, "adUxInfo"); if (!TextUtils.isEmpty(startAppBrandUIFromOuterEvent.f64736d.f64761x)) { } if (h1Var.f247859e != null) { } if (((HashMap) h1Var.f247819a).containsKey("devuin")) { } try { Bundle v67222 = msgHandler.f167378x.v6(302, Bundle.EMPTY); v67222.setClassLoader(ActivityStarterIpcDelegate.class.getClassLoader()); startAppBrandUIFromOuterEvent.f64736d.f64744g = v67222.getParcelable("delegate"); } catch (RemoteException e16) { Log.e("MicroMsg.MsgHandler", "doOpenWeApp, try get startActivityIpcDelegate e=%s", e16); } startAppBrandUIFromOuterEvent.publish(); if (!startAppBrandUIFromOuterEvent.f64737e.f64764a) { } return true; } public static boolean u1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("transactionId"); String str2 = (String) h1Var.f247819a.get("transfer_id"); String str3 = (String) h1Var.f247819a.get("receiverName"); String str4 = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str5 = (String) h1Var.f247819a.get("pic"); String str6 = (String) h1Var.f247819a.get("description"); String str7 = (String) h1Var.f247819a.get("left_button_wording"); String str8 = (String) h1Var.f247819a.get("right_button_wording"); String str9 = (String) h1Var.f247819a.get("is_open_im"); if (Util.isNullOrNil(str9)) { str9 = "0"; } int parseInt = Integer.parseInt(str9); if (Util.isNullOrNil(str) || Util.isNullOrNil(str3) || Util.isNullOrNil(str4) || Util.isNullOrNil(str5) || Util.isNullOrNil(str6) || Util.isNullOrNil(str7) || Util.isNullOrNil(str8)) { msgHandler.q5(h1Var, "doResendRemittanceMsg:fail", null); return true; } ((ss3.c) j.c(ss3.c.class)).cs0(msgHandler.f167360d, str4, str5, str6, str7, str8, new b2(msgHandler, str, str2, str3, parseInt, h1Var)); return true; } public static boolean u2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); int e15 = p.e(h1Var.f247819a, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 3); boolean z15 = 84 == e15; boolean z16 = 132 == e15; if (!z15 && !z16) { e15 = 33; } HashMap hashMap = new HashMap(); hashMap.put("query", p.f(h1Var.f247819a, "query")); hashMap.put(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, Integer.valueOf(e15)); hashMap.put("thirdExtParam", ((HashMap) h1Var.f247819a).get("thirdExtParam")); hashMap.put("type", Integer.valueOf(p.e(h1Var.f247819a, "type", 0))); if (((HashMap) h1Var.f247819a).containsKey("url")) { ((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).f164283f = new at5(); ((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).f164283f.f16625e = new lk(); ((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).f164283f.f16625e.f28607p = p.f(h1Var.f247819a, "url"); } String str = ""; if (z15) { ((FTSWebViewLogic) com.tencent.mm.plugin.webview.modeltools.m.ka()).getClass(); int e16 = p.e(hashMap, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 3); long e17 = (long) e6.e(); String f15 = p.f(hashMap, "query"); String k15 = b62.g.k(e16); jo3.t0 t0Var = new jo3.t0(); t0Var.f242489a = MMApplicationContext.getContext(); t0Var.f242490b = e16; t0Var.f242492d = f15; t0Var.f242501m = f15; t0Var.f242493e = k15; t0Var.f242494f = true; t0Var.f242496h = true; t0Var.f242497i = true; t0Var.f242498j = 1; t0Var.f242499k = gy3.a.d(MMApplicationContext.getContext(), R.color.aaw); t0Var.f242500l = true; ((HashMap) t0Var.f242495g).put("msgSvrId", String.valueOf(0L)); ((HashMap) t0Var.f242495g).put("parentSearchID", str); ((HashMap) t0Var.f242495g).put("fromTagSearch", "1"); ((HashMap) t0Var.f242506r).put("ShareSceneId", str); ((HashMap) t0Var.f242506r).put("SnsContentType", "0"); ((jo3.r) j.c(jo3.r.class)).H20(t0Var); if (!TextUtils.isEmpty(f15) && f15.startsWith("#")) { f15 = f15.substring(1); } WCTopicSearchContentActionStruct wCTopicSearchContentActionStruct = new WCTopicSearchContentActionStruct(); wCTopicSearchContentActionStruct.f71456d = 1; wCTopicSearchContentActionStruct.f71457e = e17; wCTopicSearchContentActionStruct.f71458f = 1; wCTopicSearchContentActionStruct.f71459g = wCTopicSearchContentActionStruct.b("ResultQuery", f15, true); wCTopicSearchContentActionStruct.f71460h = 6; wCTopicSearchContentActionStruct.f71461i = wCTopicSearchContentActionStruct.b("ShareSceneId", str, true); wCTopicSearchContentActionStruct.f71462j = e17; wCTopicSearchContentActionStruct.f71463k = 0; wCTopicSearchContentActionStruct.f71464l = wCTopicSearchContentActionStruct.b("SearchSessionId", k15, true); wCTopicSearchContentActionStruct.n(); jo3.l1.l(wCTopicSearchContentActionStruct); } else { ((FTSWebViewLogic) com.tencent.mm.plugin.webview.modeltools.m.ka()).getClass(); String f16 = p.f(hashMap, "query"); int e18 = p.e(hashMap, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 3); int e19 = p.e(hashMap, "type", 0); if (hashMap.get("thirdExtParam") != null) { str = hashMap.get("thirdExtParam").toString(); } String f17 = jo3.z0.f(e18); Map<String, String> b15 = jo3.z0.b(e18, true, 0); HashMap hashMap2 = (HashMap) b15; hashMap2.put("query", f16); hashMap2.put("sessionId", f17); hashMap2.put("thirdExtParam", ck.q.a(str)); ((jo3.r) j.c(jo3.r.class)).nb(MMApplicationContext.getContext(), e18, f16, f17, true, b15, e19, true); } msgHandler.q5(h1Var, "openWXSearchPage:ok", null); return true; } public static boolean u3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); byte[] Xe = fp2.g.INSTANCE.Xe(); if (Xe != null) { HashMap hashMap = new HashMap(1); hashMap.put("data", Base64.encodeToString(Xe, 2)); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); return true; } msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } public static boolean u4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get(l3.COL_LOCALID); o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "doPlayVoice, appId : %s, localId : %s", str, str2); if (Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { msgHandler.q5(h1Var, "playVoice:fail_missing arguments", null); } else { WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str2); if (b15 != null) { MMHandlerThread.postToMainThread(new y2(msgHandler, b15, str2)); msgHandler.q5(h1Var, "playVoice:ok", null); } else { msgHandler.q5(h1Var, "playVoice:fail_arguments error", null); } } return true; } public static boolean v(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; return ((jo3.p) j.c(jo3.p.class)).an().b(h1Var.f247819a); } public static boolean v0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "do ecard jsapi check"); ECardJsApiCheckEvent eCardJsApiCheckEvent = new ECardJsApiCheckEvent(); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); ECardJsApiCheckEvent.a aVar = eCardJsApiCheckEvent.f62208d; aVar.f62210a = walletJsapiData.f173486d; aVar.f62211b = walletJsapiData.f173490h; aVar.f62212c = walletJsapiData.f173489g; aVar.f62213d = walletJsapiData.f173491i; aVar.f62214e = walletJsapiData.f173495p; aVar.f62215f = walletJsapiData.f173488f; aVar.f62216g = walletJsapiData.f173497r; aVar.f62217h = (String) h1Var.f247819a.get("ecardType"); eCardJsApiCheckEvent.f62208d.f62218i = (String) h1Var.f247819a.get("openScene"); eCardJsApiCheckEvent.f62208d.f62219j = new WeakReference(msgHandler.f167360d); eCardJsApiCheckEvent.f62208d.f62220k = (String) h1Var.f247819a.get(XWalkReaderBasePlugin.PARAM_KEY_TOKEN); ECardJsApiCheckEvent.a aVar2 = eCardJsApiCheckEvent.f62208d; aVar2.f62221l = new t1(msgHandler, eCardJsApiCheckEvent, h1Var); aVar2.f62222m = walletJsapiData.f173501v; eCardJsApiCheckEvent.publish(); return true; } public static boolean v1(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doRecordVideo()"); msgHandler.G5(h1Var, 1); return true; } public static boolean v2(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = ""; o1.a(h1Var.f247862h, msgHandler.u6("sendEmail"), null, null); String str2 = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); try { str = msgHandler.C6(msgHandler.f167378x.getCurrentUrl()); } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, str, new Object[0]); } Intent intent = new Intent(); intent.putExtra("composeType", 1); intent.putExtra("subject", str2); intent.putExtra("mail_content", str); sv3.b.k(msgHandler.f167360d, "qqmail", ".ui.ComposeUI", intent, false); msgHandler.q5(h1Var, "send_email:ok", null); return true; } public static boolean v3(MsgHandler msgHandler, h1 h1Var) { byte[] bArr; msgHandler.getClass(); Object obj = h1Var.f247819a.get("rqt"); if (obj == null) { Log.e("MicroMsg.MsgHandler", "calrqt, dataIn is null."); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } if (obj instanceof String) { bArr = ((String) obj).getBytes(Charset.forName("UTF-8")); } else if (obj instanceof byte[]) { bArr = (byte[]) obj; } else { Log.e("MicroMsg.MsgHandler", "calrqt, cannot determine type of rqt data."); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } PInt pInt = new PInt(); PInt pInt2 = new PInt(); PByteArray pByteArray = new PByteArray(); if (fp2.g.INSTANCE.h7(1, bArr, 0, bArr.length, pInt, pInt2, pByteArray)) { HashMap hashMap = new HashMap(5); hashMap.put("k1", Integer.valueOf(pInt.value)); hashMap.put("k2", Integer.valueOf(pInt2.value)); hashMap.put("data", Base64.encodeToString(pByteArray.value, 2)); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); return true; } Log.e("MicroMsg.MsgHandler", "calrqt, cannot calculate hash of rqt data."); msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); return false; } public static boolean v4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get(l3.COL_LOCALID); o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "doStopVoice, appId : %s, localId : %s", str, str2); if (Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { msgHandler.q5(h1Var, "pauseVoice:fail_missing arguments", null); } else { WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str2); if (b15 != null) { MMHandlerThread.postToMainThread(new a3(msgHandler, b15)); msgHandler.q5(h1Var, "pauseVoice:ok", null); } else { msgHandler.q5(h1Var, "pauseVoice:fail_not playing", null); } } return true; } public static boolean w(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String obj = h1Var.f247819a.get("widgetId").toString(); String tC0 = ((z00.s) j.c(z00.s.class)).tC0(obj); HashMap hashMap = new HashMap(); hashMap.put("widgetId", obj); hashMap.put("imgUrl", tC0); msgHandler.q5(h1Var, String.format("%s:ok", h1Var.f247863i), hashMap); return false; } public static boolean w0(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("miniprogramAppID"); String str2 = (String) h1Var.f247819a.get("data"); if (Util.isNullOrNil(str)) { msgHandler.q5(h1Var, "sendDataToMiniProgram:fail invalid miniprogramAppID", null); return false; } ((com.tencent.mm.plugin.appbrand.service.t0) j.c(com.tencent.mm.plugin.appbrand.service.t0.class)).bw0(str, str2, msgHandler.A); msgHandler.q5(h1Var, "sendDataToMiniProgram:ok", null); return false; } public static boolean w1(MsgHandler msgHandler, h1 h1Var) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get(l3.COL_LOCALID); Log.i("MicroMsg.MsgHandler", "doPreviewVideo(), localId:%s", str); Intent intent = new Intent(); if (Util.nullAsNil(str).trim().startsWith("weixin://bgmixid/")) { intent.putExtra("game_bg_mix_fake_local_id", Util.nullAsNil(str).trim()); Context context = msgHandler.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "game", ".media.background.GameFakeVideoUI", intent, 46); } } else { WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str); if (b15 == null) { Log.e("MicroMsg.MsgHandler", "the item is null"); msgHandler.q5(h1Var, "previewVideo:fail", null); } else if (TextUtils.isEmpty(b15.f165430g)) { Log.e("MicroMsg.MsgHandler", "the File item not exist for localId:%s", b15.f165428e); msgHandler.q5(h1Var, "previewVideo:fail", null); } else { n2 a15 = n2.a(b15.f165430g); String str2 = a15.f189021f; if (str2 != null) { String k15 = o2.k(str2, false, false); if (!a15.f189021f.equals(k15)) { a15 = new n2(a15.f189019d, a15.f189020e, k15, a15.f189022g, a15.f189023h); } } h0.h l15 = h0.i.f188954a.l(a15, null); if (!l15.a()) { z15 = false; } else { z15 = l15.f188951a.D(l15.f188952b); } if (!z15) { Log.e("MicroMsg.MsgHandler", "the File not exist for origFilePath:%s", b15.f165430g); msgHandler.q5(h1Var, "previewVideo:fail", null); } else { intent.putExtra("key_video_path", b15.f165430g); Context context2 = msgHandler.f167360d; if (context2 instanceof MMActivity) { ((MMActivity) context2).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "card", ".ui.CardGiftVideoUI", intent, 46); } } } } return true; } public static boolean w2(MsgHandler msgHandler, h1 h1Var) { Map<String, Object> map; msgHandler.f167375u = false; try { if (!(msgHandler.f167378x == null || (map = h1Var.f247819a) == null || !map.containsKey("view"))) { Bundle bundle = new Bundle(); bundle.putString("fts_key_data", (String) h1Var.f247819a.get("view")); msgHandler.f167378x.callback(138, bundle); } } catch (Exception unused) { } return false; } public static boolean w3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); ((kq.c0) j.c(kq.c0.class)).Lx(msgHandler.f167360d, com.tencent.mm.plugin.downloader_app.model.a.c(h1Var.f247819a), new y0(msgHandler, h1Var)); return true; } /* JADX WARNING: Removed duplicated region for block: B:123:? A[RETURN, SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:92:0x0352 */ public static boolean w4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; int i15; String str2; int i16; String str3; boolean z15; String str4; String str5; a0.b bVar; String str6; String str7; int i17; int i18; String str8; String str9; String str10; a0.b bVar2; Exception e15; String str11; msgHandler.E.a(2, (String) h1Var.f247819a.get("use_update_jsapi_data")); msgHandler.y5(jsapiPermissionWrapper, h1Var, jsapiPermissionWrapper.f(88) || jsapiPermissionWrapper.f(TingProto.TingReportContext.CURRTAPETYPE_FIELD_NUMBER)); boolean I6 = msgHandler.I6(); WXMediaMessage w55 = msgHandler.w5(h1Var, I6); msgHandler.f167362f = w55; if (w55 == null) { Log.e("MicroMsg.MsgHandler", "doTimeline fail, appmsg is null"); } String str12 = (String) h1Var.f247819a.get("link"); if (str12 == null || str12.length() == 0) { Log.e("MicroMsg.MsgHandler", "doTimeline fail, link is null"); msgHandler.k7(2, 2); msgHandler.q5(h1Var, "share_timeline:fail", null); return true; } String str13 = (String) h1Var.f247819a.get("desc"); if (str13 != null) { msgHandler.d7(str13); } Log.i("MicroMsg.MsgHandler", "doTimeline, img_url = " + ((String) h1Var.f247819a.get("img_url")) + ", title = " + ((String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE)) + ", desc = " + ((String) h1Var.f247819a.get("desc"))); Log.i("MicroMsg.MsgHandler", "alvinluo doTimeline %s, %s", h1Var.f247819a.get("adUxInfo"), h1Var.f247819a.get(AppMeasurement.Param.TIMESTAMP)); Bundle bundle = msgHandler.f167367n; if (bundle != null) { bundle.setClassLoader(MsgHandler.class.getClassLoader()); str = "prePublishId"; int i19 = msgHandler.f167367n.getInt("snsWebSource", 1); String string = msgHandler.f167367n.getString("jsapi_args_appid"); i15 = Util.getInt(msgHandler.f167367n.getString("urlAttribute"), 0); msgHandler.f167367n.remove("urlAttribute"); i16 = i19; str2 = string; } else { str = "prePublishId"; str2 = ""; i16 = 1; i15 = 0; } if (Util.isNullOrNil(str2)) { str3 = "preMsgIndex"; str2 = (String) h1Var.f247819a.get("appid"); } else { str3 = "preMsgIndex"; } o1.a(h1Var.f247862h, msgHandler.u6(com.tencent.mm.plugin.appbrand.jsapi.share.n.NAME), str12, str2); String str14 = (String) h1Var.f247819a.get("img_width"); String str15 = (String) h1Var.f247819a.get("img_height"); String str16 = (String) h1Var.f247819a.get("link"); String C6 = msgHandler.C6(str16); Log.i("MicroMsg.MsgHandler", "doTimeline, rawUrl:[%s], shareUrl:[%s]", str16, C6); String str17 = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str18 = (String) h1Var.f247819a.get("img_url"); String str19 = (String) h1Var.f247819a.get("src_username"); String str20 = (String) h1Var.f247819a.get("src_displayname"); try { str5 = msgHandler.f167378x.getCurrentUrl(); z15 = I6; str4 = str19; } catch (Exception e16) { z15 = I6; str4 = str19; Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "", new Object[0]); str5 = ""; } a0.b x65 = msgHandler.x6(str5); if (x65 == null || Util.isNullOrNil(x65.f165892a)) { bVar = x65; str7 = str20; str6 = str4; } else { String str21 = x65.f165892a; bVar = x65; str7 = x65.f165893b; str6 = str21; } try { i17 = Integer.valueOf(str14).intValue(); try { Integer.valueOf(str15); } catch (NumberFormatException unused) { } } catch (NumberFormatException unused2) { i17 = -1; } Log.i("MicroMsg.MsgHandler", "doTimeline, init intent"); Intent intent = new Intent(); intent.putExtra("Ksnsupload_width", i17); intent.putExtra("Ksnsupload_height", i17); intent.putExtra("Ksnsupload_link", C6); intent.putExtra("Ksnsupload_title", str17); intent.putExtra("Ksnsupload_imgurl", str18); intent.putExtra("Ksnsupload_contentattribute", i15); intent.putExtra("ksnsupload_link_desc", str13); if (w0.D(str6)) { intent.putExtra("src_username", str6); intent.putExtra("src_displayname", str7); } intent.putExtra("Ksnsupload_source", i16); if (z15) { intent.putExtra("Kdescription", C6); intent.putExtra("Ksnsupload_type", 9); i18 = 1; } else { i18 = 1; intent.putExtra("Ksnsupload_type", 1); intent.putExtra("sns_upload_is_show_dialog", true); } if (str2 != null && str2.length() > 0) { intent.putExtra("Ksnsupload_appid", str2); } Object[] objArr = new Object[i18]; objArr[0] = Boolean.valueOf(msgHandler.f167367n == null); Log.i("MicroMsg.MsgHandler", "doTimeline, init intent, jsapiArgs == null ? %b", objArr); Bundle bundle2 = msgHandler.f167367n; if (bundle2 != null) { String string2 = bundle2.getString("K_sns_thumb_url"); String string3 = msgHandler.f167367n.getString("K_sns_raw_url"); str8 = ""; String nullAs = Util.nullAs(msgHandler.f167367n.getString("KSnsStrId"), str8); String nullAs2 = Util.nullAs(msgHandler.f167367n.getString("KSnsLocalId"), str8); String string4 = msgHandler.f167367n.getString("key_snsad_statextstr"); intent.putExtra("key_snsad_statextstr", string4); Log.i("MicroMsg.MsgHandler", "currentUrl %s contentUrl %s thumbUrl %s", str12, string3, string2); if (string3 != null && string3.equals(str12)) { intent.putExtra("KlinkThumb_url", string2); } intent.putExtra("KSnsStrId", nullAs); intent.putExtra("KSnsLocalId", nullAs2); Parcelable parcelable = msgHandler.f167367n.getParcelable("KSnsAdTag"); Log.i("MicroMsg.MsgHandler", "doTimeline, snsAdTag : %s", parcelable); if (parcelable != null && (parcelable instanceof SnsAdClick)) { intent.putExtra("KsnsAdTag", (SnsAdClick) parcelable); } if (nullAs != null && msgHandler.f167367n.getBoolean("KFromTimeline", false)) { SnsForwardFeedToSnsForDataReportEvent snsForwardFeedToSnsForDataReportEvent = new SnsForwardFeedToSnsForDataReportEvent(); SnsForwardFeedToSnsForDataReportEvent.a aVar = snsForwardFeedToSnsForDataReportEvent.f64619d; aVar.f64620a = nullAs; aVar.f64621b = nullAs2; snsForwardFeedToSnsForDataReportEvent.publish(); } str9 = string4; } else { str8 = ""; str9 = null; } try { intent.putExtra("ShareUrlOriginal", msgHandler.f167378x.Al()); Bundle v65 = msgHandler.f167378x.v6(18, null); if (v65 == null) { str11 = str8; str10 = "KPublisherId"; } else { str10 = "KPublisherId"; try { str11 = Util.nullAsNil(v65.getString(str10)); } catch (Exception e17) { e15 = e17; Log.printErrStackTrace("MicroMsg.MsgHandler", e15, str8, new Object[0]); Log.i("MicroMsg.MsgHandler", "doTimeline, start activity"); if (!(msgHandler.f167360d instanceof MMActivity)) { } } } intent.putExtra(str10, str11); intent.putExtra("ShareUrlOpen", str5); intent.putExtra("JsAppId", msgHandler.f167382z.c(str5)); } catch (Exception e18) { e15 = e18; str10 = "KPublisherId"; Log.printErrStackTrace("MicroMsg.MsgHandler", e15, str8, new Object[0]); Log.i("MicroMsg.MsgHandler", "doTimeline, start activity"); if (!(msgHandler.f167360d instanceof MMActivity)) { } } Log.i("MicroMsg.MsgHandler", "doTimeline, start activity"); if (!(msgHandler.f167360d instanceof MMActivity)) { return true; } intent.putExtra("need_result", true); try { Bundle v66 = msgHandler.f167378x.v6(18, null); if (v66 != null) { String a15 = nf0.z0.a(Util.nullAsNil(v66.getString(str10))); z0.c c15 = nf0.z0.d().c(a15, true); c15.i("sendAppMsgScene", 2); c15.i("preChatName", v66.getString("preChatName")); c15.i(str3, Integer.valueOf(v66.getInt(str3))); c15.i(str, v66.getString(str)); c15.i("preUsername", v66.getString("preUsername")); c15.i("url", C6); c15.i("getA8KeyScene", Integer.valueOf(v66.getInt("getA8KeyScene"))); c15.i("referUrl", v66.getString("referUrl")); int i25 = v66.getInt("_DATA_CENTER_ITEM_SHOW_TYPE", -1); if (bVar != null) { bVar2 = bVar; int i26 = bVar2.f165894c; if (i26 >= 0) { i25 = i26; } } else { bVar2 = bVar; } if (i25 != -1) { c15.i("_DATA_CENTER_ITEM_SHOW_TYPE", Integer.valueOf(i25)); c15.i("_tmpl_webview_transfer_scene", 10); c15.i("_DATA_CENTER_IS_PAY_SUBSCRIBE", Integer.valueOf(bVar2 != null ? bVar2.f165895d : 0)); if ((i25 == 5 || i25 == 16) && bVar2 != null) { c15.i("_DATA_CENTER_VID", bVar2.f165899h); c15.i("_DATA_CENTER_DESC", str13); c15.i("_DATA_CENTER__DULATION", Integer.valueOf(bVar2.f165898g)); c15.i("_DATA_CENTER_COVER_URL", msgHandler.f167367n.getString("K_sns_thumb_url")); c15.i("_DATA_CENTER_VIDEO_WIDTH", Integer.valueOf(bVar2.f165896e)); c15.i("_DATA_CENTER_VIDEO_HEIGHT", Integer.valueOf(bVar2.f165897f)); c15.i("_DATA_SHOW_NATIVE_PAGE", 1); intent.putExtra("ksnsis_video", true); } } if (!Util.isNullOrNil(str9)) { c15.i("adExtStr", str9); } intent.putExtra("reportSessionId", a15); } } catch (Exception e19) { Log.e("MicroMsg.MsgHandler", "try to attach report args error, %s", e19); } ((MMActivity) msgHandler.f167360d).mmSetOnActivityResultCallback(msgHandler); sv3.b.o(msgHandler.f167360d, "sns", ".ui.SnsUploadUI", intent, 24, false); return true; } public static boolean x(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.f167375u = false; jo3.m q102 = com.tencent.mm.plugin.webview.modeltools.m.q10(); Map<String, Object> map = h1Var.f247819a; com.tencent.mm.plugin.websearch.f fVar = (com.tencent.mm.plugin.websearch.f) q102; fVar.getClass(); int nullAsInt = Util.nullAsInt(map.get("webview_instance_id"), -1); String f15 = p.f(map, "searchId"); String f16 = p.f(map, "poiId"); c.b bVar = new c.b(); gm4 gm42 = new gm4(); gm42.f22849e = f16; gm42.f22848d = f15; bVar.f345559a = gm42; bVar.f345560b = new hm4(); bVar.f345561c = "/cgi-bin/mmsearch-bin/searchpoi"; bVar.f345562d = 2608; l0.e(bVar.a(), new com.tencent.mm.plugin.websearch.e(fVar, nullAsInt, f15, f16), false); return false; } public static boolean x0(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; ((com.tencent.mm.plugin.appbrand.service.t0) j.c(com.tencent.mm.plugin.appbrand.service.t0.class)).vR(String.valueOf(h1Var.f247819a.get("appId"))); msgHandler.q5(h1Var, "preloadMiniProgramEnv:ok", null); return true; } public static boolean x1(MsgHandler msgHandler, h1 h1Var) { boolean z15; msgHandler.getClass(); Log.i("MicroMsg.MsgHandler", "doUploadEncryptMediaFile()"); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get(l3.COL_LOCALID); Object obj = h1Var.f247819a.get("isShowProgressTips"); if (obj != null) { try { z15 = Util.getInt(obj.toString(), 0) == 1; } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "Exception has occured : %s", e15.getMessage()); } Log.i("MicroMsg.MsgHandler", "doUploadEncryptMediaFile, appid = %s, localid = %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "appId or localid is null"); msgHandler.q5(h1Var, "uploadEncryptMediaFile:fail_missing arguments", null); } else { o1.a(h1Var.f247862h, false, null, str); WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str2); if (b15 == null) { Log.e("MicroMsg.MsgHandler", "jssdk file item is null for localId:%s", str2); msgHandler.q5(h1Var, "uploadEncryptMediaFile:file_not_exist", null); } else { int i15 = b15.f165434n; if (i15 == 1) { msgHandler.g7(h1Var, str, str2, 10011, 0, 0, "uploadEncryptMediaFile", z15); } else if (i15 != 4) { msgHandler.h7(h1Var, str, str2, 10011, 0, 0, "uploadEncryptMediaFile", z15); } else { msgHandler.h7(h1Var, str, str2, 10011, 0, 0, "uploadEncryptMediaFile", z15); } } } return true; } z15 = true; Log.i("MicroMsg.MsgHandler", "doUploadEncryptMediaFile, appid = %s, localid = %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str)) { } Log.e("MicroMsg.MsgHandler", "appId or localid is null"); msgHandler.q5(h1Var, "uploadEncryptMediaFile:fail_missing arguments", null); return true; } public static boolean x2(MsgHandler msgHandler, h1 h1Var) { JSONObject jSONObject; msgHandler.getClass(); try { jSONObject = (JSONObject) new JSONTokener(h1Var.f247819a.get("liteAppInfo").toString()).nextValue(); } catch (JSONException unused) { Log.e("MicroMsg.MsgHandler", "doOpenGameUrlWithExtraWebView param error"); jSONObject = null; } String str = (String) h1Var.f247819a.get("url"); if (jSONObject != null) { String optString = jSONObject.optString("appId"); if (Util.isNullOrNil(optString)) { Log.e("MicroMsg.MsgHandler", "doOpenGameUrlWithExtraWebView openInLiteApp appId is null"); } String optString2 = jSONObject.optString(ConstantsKinda.INTENT_LITEAPP_PATH); String optString3 = jSONObject.optString("query"); Log.i("MicroMsg.MsgHandler", "doOpenGameUrlWithExtraWebView openInLiteApp, appId : %s, path : %s, query : %s", optString, optString2, optString3); Bundle bundle = new Bundle(); bundle.putString("appId", optString); bundle.putString(ConstantsKinda.INTENT_LITEAPP_PATH, optString2); bundle.putString("query", optString3); ((ku.f) j.c(ku.f.class)).V40(msgHandler.f167360d, bundle, true, false, new v0(msgHandler, str, h1Var)); } return true; } public static boolean x3(MsgHandler msgHandler, h1 h1Var) { Bundle bundle; JSONObject jSONObject; msgHandler.getClass(); TreeMap treeMap = new TreeMap(new z0(msgHandler)); try { bundle = msgHandler.f167378x.v6(150, null); } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); bundle = null; } if (bundle == null) { msgHandler.q5(h1Var, h1Var.f247863i + ":fail", null); } else { treeMap.put(21, bundle.getString("page_key")); treeMap.put(22, NetStatusUtil.getFormatedNetType(MMApplicationContext.getContext())); treeMap.put(23, String.valueOf(j6.b.b(MMApplicationContext.getContext()))); String string = bundle.getString("raw_url"); if (!Util.isNullOrNil(string)) { try { treeMap.put(24, ck.q.b(string, "UTF-8")); } catch (UnsupportedEncodingException unused) { } } treeMap.put(25, Integer.valueOf(bundle.getBoolean("is_used_wepkg", false) ? 1 : 0)); treeMap.put(26, 0); treeMap.put(27, 0); treeMap.put(28, bundle.getString("wepkg_version")); treeMap.put(29, bundle.getString("comm_js_version")); String str = (String) h1Var.f247819a.get("type"); boolean equals = "1".equals((String) h1Var.f247819a.get("isReportNow")); try { jSONObject = new JSONObject((String) h1Var.f247819a.get("data")); } catch (JSONException unused2) { jSONObject = null; } if (jSONObject == null) { Log.i("MicroMsg.MsgHandler", "data is null or not json"); msgHandler.q5(h1Var, h1Var.f247863i + ":fail_data_is_null", null); } else if ("1".equals(str)) { treeMap.put(49, 0); treeMap.put(1000, Boolean.valueOf(equals)); HashMap hashMap = (HashMap) oq3.e.a(jSONObject); for (Integer num : hashMap.keySet()) { if (!treeMap.containsKey(num)) { treeMap.put(num, hashMap.get(num)); } } oq3.e.b(string, treeMap); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); } else if ("2".equals(str)) { HashMap hashMap2 = (HashMap) oq3.e.a(jSONObject); for (Integer num2 : hashMap2.keySet()) { if (!treeMap.containsKey(num2)) { treeMap.put(num2, hashMap2.get(num2)); } } String a15 = oq3.c.a(treeMap); Log.i("MicroMsg.MsgHandler", "report web runtime. isReportNow:%b, reportData: [%s]", Boolean.valueOf(equals), a15); q.INSTANCE.c(16145, a15, equals, false); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); } else { Log.i("MicroMsg.MsgHandler", "type is error. type:%s", str); msgHandler.q5(h1Var, h1Var.f247863i + ":fail_type_not_right", null); } } return true; } public static boolean x4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get(l3.COL_LOCALID); Log.i("MicroMsg.MsgHandler", "doStopVoice, appId : %s, localId : %s", str, str2); o1.a(h1Var.f247862h, false, null, str); if (Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { msgHandler.q5(h1Var, "stopVoice:fail_missing arguments", null); } else { WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str2); if (b15 != null) { MMHandlerThread.postToMainThread(new z2(msgHandler, b15)); msgHandler.q5(h1Var, "stopVoice:ok", null); } else { msgHandler.q5(h1Var, "stopVoice:fail_not playing", null); } } return true; } public static boolean y(MsgHandler msgHandler, h1 h1Var) { msgHandler.f167375u = false; if (Util.safeParseInt((String) h1Var.f247819a.get("isSearch")) == 1) { return ((z00.o) j.c(z00.o.class)).nr(Util.safeParseLong((String) h1Var.f247819a.get("reddotTimeStamps"))); } ((vg3.h) ((e00.h) j.c(e00.h.class)).U4()).I(Util.safeParseLong((String) h1Var.f247819a.get("reddotTimeStamps"))); return false; } /* JADX DEBUG: Multi-variable search result rejected for r1v6, resolved type: com.tencent.mm.plugin.appbrand.service.t0 */ /* JADX WARN: Multi-variable type inference failed */ public static boolean y0(MsgHandler msgHandler, h1 h1Var) { List list; String str; msgHandler.f167375u = false; Object obj = h1Var.f247819a.get("userNames"); String str2 = ":ok"; if (obj instanceof String) { try { list = J6(new JSONArray((String) obj)); } catch (Exception unused) { str = ":fail:param type mismatch"; } } else if (obj instanceof JSONArray) { list = J6((JSONArray) obj); } else if (obj instanceof String[]) { list = Util.stringsToList((String[]) obj); } else { str = ":fail:empty param"; str2 = str; list = null; } if (!Util.isNullOrNil(list)) { ((com.tencent.mm.plugin.appbrand.service.t0) j.c(com.tencent.mm.plugin.appbrand.service.t0.class)).Pd0(list); } msgHandler.q5(h1Var, "preloadMiniProgramContacts" + str2, null); return true; } public static boolean y1(MsgHandler msgHandler, h1 h1Var) { boolean z15; boolean z16; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("url"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "url is null or nil"); msgHandler.q5(h1Var, "openCunstonWebview:fail_invalid_url", null); return true; } String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("orientation")); int i15 = -1; if (!Util.isNullOrNil(nullAsNil)) { if (nullAsNil.equals("horizontal")) { i15 = 0; } else if (nullAsNil.equals("vertical")) { i15 = 1; } else if (nullAsNil.equals("sensor")) { i15 = 4; } } boolean equals = Util.nullAsNil((String) h1Var.f247819a.get("fullscreen")).equals("true"); String str2 = (String) h1Var.f247819a.get("top_url"); String str3 = (String) h1Var.f247819a.get("top_title"); try { m mVar = msgHandler.f167378x; z15 = mVar != null ? mVar.v6(81, new Bundle()).getBoolean("from_shortcut", false) : false; } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doOpenCustomWebview, get from shortcut exception : %s", e15.getMessage()); z15 = false; } boolean equals2 = Util.nullAsNil((String) h1Var.f247819a.get("finish_recent_webview")).equals("1"); boolean equals3 = Util.nullAsNil((String) h1Var.f247819a.get("disable_swipe_back")).equals("1"); String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get("username")); try { m mVar2 = msgHandler.f167378x; z16 = mVar2 != null ? mVar2.v6(86, new Bundle()).getBoolean("is_from_keep_top") : false; } catch (Exception e16) { Log.e("MicroMsg.MsgHandler", "doOpenCustomWebview, get from keep top exception : %s", e16.getMessage()); z16 = false; } String nullAsNil3 = Util.nullAsNil((String) h1Var.f247819a.get("gameAppid")); Intent intent = new Intent(); intent.putExtra("rawUrl", str); intent.putExtra("screen_orientation", i15); intent.putExtra("show_full_screen", equals); intent.putExtra("disable_swipe_back", equals3); intent.putExtra("from_shortcut", z15); intent.putExtra("shortcut_user_name", nullAsNil2); intent.putExtra("is_from_keep_top", z16); intent.putExtra("game_hv_menu_appid", nullAsNil3); intent.putExtra("start_activity_time", System.currentTimeMillis()); if (z15) { sv3.b.j(msgHandler.f167360d, "webview", ".ui.tools.game.H5GameWebViewUI", intent, null); } else { v.e(intent.getExtras(), "webview", ".ui.tools.WebViewUI", msgHandler.f167378x, new r(msgHandler, intent)); } if (equals2 && !z15) { MMHandlerThread.postToMainThreadDelayed(new s(msgHandler), 200); } GameCommOperationEvent gameCommOperationEvent = new GameCommOperationEvent(); GameCommOperationEvent.a aVar = gameCommOperationEvent.f63042d; aVar.f63044a = 2; aVar.f63045b = nullAsNil3; gameCommOperationEvent.publish(); msgHandler.q5(h1Var, "openCunstonWebview:ok", null); return true; } public static boolean y2(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); String a15 = o3.f270764c.a("login_user_name", ""); String str = (String) h1Var.f247819a.get("request_ticket"); if (!Util.isNullOrNil(str)) { Intent intent = new Intent(); intent.putExtra("Kusername", a15); intent.putExtra("Kvertify_key", str); Context context = msgHandler.f167360d; if (!(context instanceof MMActivity)) { return true; } ((MMActivity) context).mmSetOnActivityResultCallback(msgHandler); sv3.b.n(msgHandler.f167360d, "voiceprint", ".ui.VoiceLoginUI", intent, 57); return true; } Log.e("MicroMsg.MsgHandler", "requestVoiceLoginVerify, ticket is null"); msgHandler.q5(h1Var, "requestVoiceLoginVerify:ticket is null", null); return true; } public static boolean y3(MsgHandler msgHandler, h1 h1Var) { msgHandler.getClass(); LinkedList<DownloadWidgetTaskInfo> Wg = ((ab1.h) j.c(ab1.h.class)).Wg(); if (Util.isNullOrNil(Wg)) { msgHandler.q5(h1Var, h1Var.f247863i + ":ok", null); } else { HashMap hashMap = new HashMap(); JSONArray jSONArray = new JSONArray(); Iterator<DownloadWidgetTaskInfo> it = Wg.iterator(); while (it.hasNext()) { DownloadWidgetTaskInfo next = it.next(); JSONObject jSONObject = new JSONObject(); try { jSONObject.put("appid", next.f103626d); jSONObject.put("status", next.f103628f); jSONObject.put("download_id", next.f103627e); jSONObject.put("progress", next.f103629g); jSONObject.put("progress_float", (double) next.f103631i); if (next.f103630h) { jSONObject.put("reserve_for_wifi", 1); } } catch (JSONException unused) { } jSONArray.put(jSONObject); } hashMap.put("result", jSONArray); msgHandler.q5(h1Var, h1Var.f247863i + ":ok", hashMap); } return true; } public static boolean y4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; msgHandler.getClass(); String str = (String) ((HashMap) h1Var.f247819a).get("appId"); String str2 = (String) ((HashMap) h1Var.f247819a).get(l3.COL_LOCALID); Object obj = ((HashMap) h1Var.f247819a).get("isShowProgressTips"); if (obj != null) { try { if (Util.getInt(obj.toString(), 0) != 1) { z15 = false; o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "doUploadVoice, appId : %s, localId : %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { Log.e("MicroMsg.MsgHandler", "appId or localId is null or nil."); msgHandler.q5(h1Var, "uploadVoice:fail_missing arguments", null); } else { b3 b3Var = new b3(msgHandler, str2, h1Var); boolean c15 = com.tencent.mm.plugin.webview.modeltools.m.cO0().c(str, str2, 5, 0, 0, b3Var); Log.i("MicroMsg.MsgHandler", "doUploadVoice, add cdn upload task result : %b", Boolean.valueOf(c15)); if (!c15) { msgHandler.q5(h1Var, "uploadVoice:fail", null); } else if (z15) { Context context = msgHandler.f167360d; msgHandler.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(msgHandler.f167360d).getString(R.string.lbc), true, true, new d3(msgHandler, b3Var, str2, h1Var)); } } return true; } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "Exception has occured : %s", e15.getMessage()); } } z15 = true; o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "doUploadVoice, appId : %s, localId : %s, isShowProgressTips(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str)) { } Log.e("MicroMsg.MsgHandler", "appId or localId is null or nil."); msgHandler.q5(h1Var, "uploadVoice:fail_missing arguments", null); return true; } public static boolean z(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); ((HashMap) h1Var.f247819a).put("type", 262144); ((HashMap) h1Var.f247819a).put("subType", 8); ((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).f164283f = new at5(); ((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).f164283f.f16625e = new lk(); ((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).f164283f.f16625e.f28604j = 1; msgHandler.q5(h1Var, h1Var.f247863i + ":ok", new HashMap()); msgHandler.f167375u = false; p.e(h1Var.f247819a, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0); ((com.tencent.mm.plugin.websearch.f) com.tencent.mm.plugin.webview.modeltools.m.q10()).c(h1Var.f247819a); return false; } public static boolean z0(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("packageName"); if (Util.isNullOrNil(str)) { Log.i("MicroMsg.MsgHandler", "packageName is null or nil"); msgHandler.q5(h1Var, "get_install_state:no", null); return true; } o1.a(h1Var.f247862h, false, str, null); e04.a.a(new i1(msgHandler, str, h1Var)); return true; } public static boolean z2(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { HashMap hashMap; MsgHandler msgHandler2; Exception e15; Bundle bundle; long j15; msgHandler.getClass(); HashMap hashMap2 = new HashMap(); try { String str = (String) h1Var.f247819a.get("next_step"); String str2 = (String) h1Var.f247819a.get("result"); try { Log.i("MicroMsg.MsgHandler", "next_step: %s, result: %s", str, str2); bundle = new Bundle(); if (!Util.isNullOrNil(str)) { long j16 = 500; if ("auth_again".equals(str)) { bundle.putString("go_next", "auth_again"); } else if ("get_reg_verify_code".equals(str)) { bundle.putString("go_next", "get_reg_verify_code"); } else { if ("roomlive_verify".equals(str)) { bundle.putString("go_next", "roomlive_verify"); bundle.putString("result_json", str2); WebViewExWindowCloseEvent webViewExWindowCloseEvent = new WebViewExWindowCloseEvent(); webViewExWindowCloseEvent.f65231d.f65232a = "next_continue_open_live"; webViewExWindowCloseEvent.publish(); } else if ("modify_alias".equals(str)) { bundle.putString("go_next", "modify_alias"); bundle.putString("result_json", str2); } else if ("continue_login".equals(str)) { WebViewExWindowCloseEvent webViewExWindowCloseEvent2 = new WebViewExWindowCloseEvent(); webViewExWindowCloseEvent2.f65231d.f65232a = "continue_login"; webViewExWindowCloseEvent2.asyncPublish(Looper.getMainLooper()); } else if ("cancel_login".equals(str)) { WebViewExWindowCloseEvent webViewExWindowCloseEvent3 = new WebViewExWindowCloseEvent(); webViewExWindowCloseEvent3.f65231d.f65232a = "cancel_login"; webViewExWindowCloseEvent3.asyncPublish(Looper.getMainLooper()); } else if ("escape_change_qq_login_type".equals(str)) { WebViewExWindowCloseEvent webViewExWindowCloseEvent4 = new WebViewExWindowCloseEvent(); WebViewExWindowCloseEvent.a aVar = webViewExWindowCloseEvent4.f65231d; aVar.f65232a = "escape_change_qq_login_type"; aVar.f65233b = new Bundle(); webViewExWindowCloseEvent4.f65231d.f65233b.putString("liteAppUuid", (String) h1Var.f247819a.get("liteAppUuid")); webViewExWindowCloseEvent4.f65231d.f65233b.putString("liteAppPtr", (String) h1Var.f247819a.get("liteAppPtr")); webViewExWindowCloseEvent4.asyncPublish(Looper.getMainLooper()); } else if ("continue_check".equals(str)) { WebViewExWindowCloseEvent webViewExWindowCloseEvent5 = new WebViewExWindowCloseEvent(); webViewExWindowCloseEvent5.f65231d.f65232a = "continue_check"; webViewExWindowCloseEvent5.asyncPublish(Looper.getMainLooper()); } bundle.putSerializable("next_params", new HashMap(h1Var.f247819a)); j15 = j16; } j16 = 0; bundle.putSerializable("next_params", new HashMap(h1Var.f247819a)); j15 = j16; } else { j15 = 0; } msgHandler2 = msgHandler; hashMap = hashMap2; } catch (Exception e16) { e15 = e16; msgHandler2 = msgHandler; hashMap = hashMap2; msgHandler2.I5(e15, hashMap); return true; } try { u0 u0Var = new u0(msgHandler2, bundle, hashMap, h1Var); if (j15 > 0) { MMHandlerThread.postToMainThreadDelayed(u0Var, j15); return true; } u0Var.run(); return true; } catch (Exception e17) { e15 = e17; msgHandler2.I5(e15, hashMap); return true; } } catch (Exception e18) { e15 = e18; msgHandler2 = msgHandler; hashMap = hashMap2; msgHandler2.I5(e15, hashMap); return true; } } public static boolean z3(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { msgHandler.getClass(); String str = (String) h1Var.f247819a.get("extInfo"); String str2 = (String) h1Var.f247819a.get("url"); String str3 = (String) h1Var.f247819a.get("task_url"); long j15 = Util.getLong((String) h1Var.f247819a.get("download_id"), -1); boolean z15 = Util.getBoolean((String) h1Var.f247819a.get("use_downloader_widget"), false); c3 Uj = ((t) j.c(t.class)).Uj(j15); if (Uj == null) { msgHandler.q5(h1Var, "doResumeDownloadTask:fail", null); return true; } int i15 = Util.getInt((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 1000); int i16 = Util.getInt((String) h1Var.f247819a.get("uiarea"), 0); int i17 = Util.getInt((String) h1Var.f247819a.get("notice_id"), 0); int i18 = Util.getInt((String) h1Var.f247819a.get("download_type"), 1); int i19 = Util.getInt((String) h1Var.f247819a.get(TPDownloadProxyEnum.USER_SSID), 0); Uj.field_scene = i15; Uj.field_uiarea = i16; Uj.field_noticeId = i17; Uj.field_ssid = i19; Uj.field_downloadType = i18; ((t) j.c(t.class)).A00(Uj); ua1.b bVar = new ua1.b(); bVar.a(Uj); bVar.f317027j = 0; ((kq.w) j.c(kq.w.class)).Rq(10, bVar); if (z15) { ((kq.c0) j.c(kq.c0.class)).WO(msgHandler.f167360d, Util.getLong((String) h1Var.f247819a.get("download_id"), -1), Util.getBoolean("download_in_wifi", false), false, new i2(msgHandler, h1Var)); ((lv.i) j.c(lv.i.class)).yP(10, "MsgHandler_doResumeDownloadTask", msgHandler.hashCode()); return true; } else if (!NetStatusUtil.isNetworkConnected(msgHandler.f167360d)) { Context context = msgHandler.f167360d; ak.a.makeText(context, hy3.h.a(context).getString(R.string.f368635fm1), 0).show(); msgHandler.q5(h1Var, "doResumeDownloadTask:fail_network_not_connected", null); Log.i("MicroMsg.MsgHandler", "doResumeDownloadTask fail, network not ready"); msgHandler.V6(Uj.field_appId, TingProto.TingReportContext.ACTIONSONGINDEXINLIST_FIELD_NUMBER, str); return true; } else if (NetStatusUtil.isWifi(msgHandler.f167360d)) { msgHandler.W5(h1Var, jsapiPermissionWrapper); return true; } else { q.INSTANCE.g(14217, Uj.field_appId, 4, str2, str3, 3); Context context2 = msgHandler.f167360d; i14.j.D(context2, hy3.h.a(context2).getString(R.string.l5x), hy3.h.a(msgHandler.f167360d).getString(R.string.l5y), hy3.h.a(msgHandler.f167360d).getString(R.string.l5q), hy3.h.a(msgHandler.f167360d).getString(R.string.f367394sg), false, new g2(msgHandler, Uj, str2, str3, h1Var, jsapiPermissionWrapper), new h2(msgHandler, Uj, str2, str3, h1Var), R.color.aaq); return true; } } /* JADX WARNING: Removed duplicated region for block: B:11:0x0061 */ /* JADX WARNING: Removed duplicated region for block: B:12:0x0067 */ public static boolean z4(MsgHandler msgHandler, h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15; msgHandler.getClass(); String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get("serverId"); Object obj = h1Var.f247819a.get("isShowProgressTips"); if (obj != null) { try { if (Util.getInt(obj.toString(), 0) != 1) { z15 = false; o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "doDownloadVoice, appid is : %s, media id is : %s, isShowProgDialog(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str2)) { msgHandler.q5(h1Var, "downloadVoice:fail_invaild_serverId", null); } else { e3 e3Var = new e3(msgHandler, str2, h1Var); com.tencent.mm.plugin.webview.modeltools.m.cO0().a(str, str2, e3Var); Log.i("MicroMsg.MsgHandler", "doDownloadVoice, add cdn download task result : %b", Boolean.TRUE); if (z15) { Context context = msgHandler.f167360d; msgHandler.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(msgHandler.f167360d).getString(R.string.laq), true, true, new f3(msgHandler, e3Var, str2, h1Var)); } } return true; } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "Exception has occured : %s", e15.getMessage()); } } z15 = true; o1.a(h1Var.f247862h, false, null, str); Log.i("MicroMsg.MsgHandler", "doDownloadVoice, appid is : %s, media id is : %s, isShowProgDialog(%s)", str, str2, Boolean.valueOf(z15)); if (!Util.isNullOrNil(str2)) { } return true; } public final boolean A5(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { long j15; String str; String str2; boolean z15; Map<String, Object> map; int i15; long j16; kq.v fI0; q qVar = q.INSTANCE; qVar.idkeyStat(157, 27, 1, false); String str3 = (String) ((HashMap) h1Var.f247819a).get("task_name"); String str4 = (String) ((HashMap) h1Var.f247819a).get("task_url"); String str5 = (String) ((HashMap) h1Var.f247819a).get("alternative_url"); long j17 = Util.getLong((String) ((HashMap) h1Var.f247819a).get("task_size"), 0); String str6 = (String) ((HashMap) h1Var.f247819a).get("file_md5"); String str7 = (String) ((HashMap) h1Var.f247819a).get("extInfo"); String str8 = (String) ((HashMap) h1Var.f247819a).get("fileType"); String str9 = (String) ((HashMap) h1Var.f247819a).get("appid"); String str10 = (String) ((HashMap) h1Var.f247819a).get(IXWebBroadcastListener.PACKAGE_NAME); int i16 = Util.getInt((String) ((HashMap) h1Var.f247819a).get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 1000); int i17 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("download_type"), 1); int i18 = Util.getInt((String) ((HashMap) h1Var.f247819a).get(TPDownloadProxyEnum.USER_SSID), 0); int i19 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("uiarea"), 0); int i25 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("notice_id"), 0); String str11 = (String) ((HashMap) h1Var.f247819a).get("sourceInfo"); String str12 = (String) ((HashMap) h1Var.f247819a).get("bizInfo"); Log.i("MicroMsg.MsgHandler", "doAddDownloadTaskStraight, md5 = " + str6 + ", url = " + str4 + ", extinfo = " + str7 + ", fileType = " + str8 + ", reportScene = " + i16); Bundle bundle = this.f167367n; if (bundle != null) { str2 = str10; str = str3; int i26 = bundle.getInt("key_download_restrict", 0); j15 = j17; String string = this.f167367n.getString("key_function_id", ""); if (!Util.isNullOrNil(string)) { z15 = true; qVar.g(14596, string, Integer.valueOf(i26), 0); } else { z15 = true; } if (i26 == z15) { Log.e("MicroMsg.MsgHandler", "not allow to download file"); q5(h1Var, "add_download_task_straight:fail", null); return z15; } map = null; } else { str = str3; str2 = str10; j15 = j17; map = null; z15 = true; } if (Util.isNullOrNil(str4)) { Log.e("MicroMsg.MsgHandler", "doAddDownloadTaskStraight fail, url is null"); q5(h1Var, "add_download_task_straight:fail_invalid_url", map); V6(str9, 700, str7); return z15; } if (Util.nullAsNil(str9).startsWith("wx")) { int i27 = z15 ? 1 : 0; int i28 = z15 ? 1 : 0; int i29 = z15 ? 1 : 0; int i35 = z15 ? 1 : 0; int i36 = z15 ? 1 : 0; i15 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("downloader_type"), i27); } else { i15 = Util.getInt((String) ((HashMap) h1Var.f247819a).get("downloader_type"), 0); } GameDownloadReport4WebViewEvent gameDownloadReport4WebViewEvent = new GameDownloadReport4WebViewEvent(); GameDownloadReport4WebViewEvent.a aVar = gameDownloadReport4WebViewEvent.f63052d; aVar.f63053a = str4; aVar.f63054b = str6; aVar.f63056d = str7; aVar.f63055c = str9; aVar.f63057e = i16; gameDownloadReport4WebViewEvent.publish(); com.tencent.mm.plugin.downloader.model.n nVar = new com.tencent.mm.plugin.downloader.model.n(null); nVar.f103517a = str4; nVar.f103518b = str5; nVar.f103519c = j15; nVar.f103520d = str; nVar.f103521e = str6; nVar.f103523g = str9; nVar.f103524h = str2; nVar.f103525i = true; nVar.f103522f = Util.getInt(str8, 1); nVar.f103528l = i16; nVar.f103533q = str7; nVar.f103538v = i17; nVar.f103535s = i18; nVar.f103537u = i19; nVar.f103536t = i25; if (i15 == 1) { j16 = ((com.tencent.mm.plugin.downloader.model.l) ((kq.y) j.c(kq.y.class)).fI0()).c(nVar); } else { j16 = ((com.tencent.mm.plugin.downloader.model.l) ((kq.y) j.c(kq.y.class)).fI0()).b(nVar); } Log.i("MicroMsg.MsgHandler", "doAddDownloadTaskStraight, downloadId = " + j16); ((lv.i) j.c(lv.i.class)).yP(10, "MsgHandler_doAddDownloadTaskStraight", hashCode()); if (j16 <= 0) { Log.e("MicroMsg.MsgHandler", "doAddDownloadTaskStraight fail, downloadId = " + j16); q5(h1Var, "add_download_task_straight:fail", null); return true; } j1 j1Var = j1.f165615a; String b15 = j1Var.b(str12, str11); if (b15 != null) { j1.f165616b.put(Long.valueOf(j16), new k1(str12, str11)); kq.y yVar = (kq.y) j.c(kq.y.class); FileDownloadTaskInfo p15 = (yVar == null || (fI0 = yVar.fI0()) == null) ? null : ((com.tencent.mm.plugin.downloader.model.l) fI0).p(j16); if (p15 == null) { Log.i("MicroMsg.WebViewAdReportHelper", "reportAddDownloadTaskStraightStart, downloadTaskInfo is null"); ((c0) j.c(c0.class)).Qg0(b15); } else if (p15.f103383f != 3 || !u1.k(p15.f103384g)) { Log.i("MicroMsg.WebViewAdReportHelper", "reportAddDownloadTaskStraightStart, downloadTaskInfo status is " + p15.f103383f + ", path is " + p15.f103384g); ((c0) j.c(c0.class)).Qg0(b15); } else { Log.i("MicroMsg.WebViewAdReportHelper", "not reportAddDownloadTaskStraightStart, because download finished and do install report"); String b16 = j1Var.b(str12, str11); if (b16 != null) { ((c0) j.c(c0.class)).GM0(b16); } } } HashMap hashMap = new HashMap(); hashMap.put("download_id", Long.valueOf(j16)); q5(h1Var, "add_download_task_straight:ok", hashMap); return true; } public final int A6() { Bundle v65; try { m mVar = this.f167378x; if (mVar == null || (v65 = mVar.v6(25, null)) == null) { return 0; } return v65.getInt(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE); } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "invokeAsResult error.%s", e15); return 0; } } public final boolean B5(String str, int i15, String str2) { String c15; if (Util.isNullOrNil(str) && i15 == 0) { return false; } if (Util.isNullOrNil(str)) { if (x.f168144l == null) { synchronized (x.class) { if (x.f168144l == null) { Context context = MMApplicationContext.getContext(); lh4.m.f(context, "getContext()"); x xVar = new x(context, null); x.f168144l = xVar; IListener<MusicPlayerEvent> iListener = xVar.f168150f; if (iListener != null) { iListener.alive(); } } b0 b0Var = b0.f332794a; } } x xVar2 = x.f168144l; synchronized (xVar2) { MMKVSlotManager mMKVSlotManager = xVar2.f168149e; c15 = xVar2.c(MMKVSlotManager.decodeString$default(mMKVSlotManager, "currentAlbumIdKey_" + str2 + '}', null, 2, null), str2); } if (c15 == null) { return false; } str = c15; } HashMap hashMap = new HashMap(); hashMap.put("audioListState", str); Log.i("MicroMsg.MsgHandler", "doAudioListStateCallback ok"); q5(this.f167361e, "getBackgroundAudioState:ok", hashMap); return true; } public void B6(String str, boolean z15, String str2, long j15) { Bundle bundle = new Bundle(); bundle.putString("emoji_store_json_data", str); bundle.putBoolean("emoji_store_new_query", z15); bundle.putString("emoji_store_page_buf", str2); bundle.putLong("emoji_store_search_id", j15); try { m mVar = this.f167378x; if (mVar != null) { mVar.callback(80001, bundle); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "getSearchEmotionDataCallBack exception" + e15.getMessage()); } } public boolean C5(h1 h1Var) { s5(f167350e1, 0); new y0(this.f167360d).b(null, new MsgHandler$$e(this), new MsgHandler$$f(this, h1Var), new MsgHandler$$g(this, h1Var)); return true; } public String C6(String str) { try { Bundle bundle = null; if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "currentUrl is null"); return null; } Bundle bundle2 = new Bundle(); bundle2.putString("webview_current_url", str); m mVar = this.f167378x; if (mVar != null) { bundle = mVar.v6(258, bundle2); } if (bundle != null) { String string = bundle.getString("k_share_url"); if (!Util.isNullOrNil(string)) { return string; } } return m2.b(str); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "getShareUrl error : %s", e15.getMessage()); } } /* JADX WARNING: Removed duplicated region for block: B:22:0x005b */ /* JADX WARNING: Removed duplicated region for block: B:25:0x008a A[SYNTHETIC, Splitter:B:25:0x008a] */ /* JADX WARNING: Removed duplicated region for block: B:42:0x00bd */ /* JADX WARNING: Removed duplicated region for block: B:45:0x00d1 */ /* JADX WARNING: Removed duplicated region for block: B:50:0x00e0 */ /* JADX WARNING: Removed duplicated region for block: B:56:0x013f */ /* JADX WARNING: Removed duplicated region for block: B:59:0x0148 */ /* JADX WARNING: Removed duplicated region for block: B:65:0x0172 */ /* JADX WARNING: Removed duplicated region for block: B:67:0x0176 */ public final boolean D5(h1 h1Var) { int i15; String str; Boolean bool; Boolean bool2; Boolean bool3; String str2 = (String) h1Var.f247819a.get("sourceType"); Log.i("MicroMsg.MsgHandler", "source Type = %s", str2); if (!Util.isNullOrNil(str2)) { try { JSONArray jSONArray = new JSONArray(str2); i15 = 0; for (int i16 = 0; i16 < jSONArray.length(); i16++) { try { if (jSONArray.getString(i16).equals(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { i15 |= 1; } else if (jSONArray.getString(i16).equals("camera")) { i15 |= 2; } } catch (Exception unused) { Log.e("MicroMsg.MsgHandler", "doChooseImage: sizeType parsing error"); if (i15 == 0) { } Log.i("MicroMsg.MsgHandler", "real scene = %d", Integer.valueOf(i15)); int i17 = Util.getInt((String) h1Var.f247819a.get("count"), 0); str = (String) h1Var.f247819a.get("sizeType"); bool = Boolean.FALSE; if (!Util.isNullOrNil(str)) { } String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("camera")); int i18 = 7; if (!bool.booleanValue()) { } if (!bool.booleanValue()) { } i18 = 8; bool3 = Boolean.FALSE; Intent intent = new Intent(); intent.putExtra("key_pick_local_pic_count", i17); intent.putExtra("key_pick_local_pic_query_source_type", i18); intent.putExtra("key_pick_local_pic_send_raw", bool3); intent.putExtra("query_media_type", 3); intent.putExtra("key_pick_local_media_video_type", 2); intent.putExtra("key_pick_local_media_sight_type", "image"); intent.putExtra("key_pick_local_media_choose_type", JsApiChooseImage.NAME); Log.i("MicroMsg.MsgHandler", "doChooseImage: realScene: %d, count: %d, querySourceType: %d, sendRaw: %b", Integer.valueOf(i15), Integer.valueOf(i17), Integer.valueOf(i18), bool3); if (Util.isNullOrNil(str2)) { } if (!str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { } if (str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { } } } } catch (Exception unused2) { i15 = 0; Log.e("MicroMsg.MsgHandler", "doChooseImage: sizeType parsing error"); if (i15 == 0) { } Log.i("MicroMsg.MsgHandler", "real scene = %d", Integer.valueOf(i15)); int i172 = Util.getInt((String) h1Var.f247819a.get("count"), 0); str = (String) h1Var.f247819a.get("sizeType"); bool = Boolean.FALSE; if (!Util.isNullOrNil(str)) { } String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get("camera")); int i182 = 7; if (!bool.booleanValue()) { } if (!bool.booleanValue()) { } i182 = 8; bool3 = Boolean.FALSE; Intent intent2 = new Intent(); intent2.putExtra("key_pick_local_pic_count", i172); intent2.putExtra("key_pick_local_pic_query_source_type", i182); intent2.putExtra("key_pick_local_pic_send_raw", bool3); intent2.putExtra("query_media_type", 3); intent2.putExtra("key_pick_local_media_video_type", 2); intent2.putExtra("key_pick_local_media_sight_type", "image"); intent2.putExtra("key_pick_local_media_choose_type", JsApiChooseImage.NAME); Log.i("MicroMsg.MsgHandler", "doChooseImage: realScene: %d, count: %d, querySourceType: %d, sendRaw: %b", Integer.valueOf(i15), Integer.valueOf(i172), Integer.valueOf(i182), bool3); if (Util.isNullOrNil(str2)) { } if (!str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { } if (str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { } } } else { i15 = 0; } if (i15 == 0) { i15 = 3; } Log.i("MicroMsg.MsgHandler", "real scene = %d", Integer.valueOf(i15)); int i1722 = Util.getInt((String) h1Var.f247819a.get("count"), 0); str = (String) h1Var.f247819a.get("sizeType"); bool = Boolean.FALSE; if (!Util.isNullOrNil(str)) { try { JSONArray jSONArray2 = new JSONArray(str); bool2 = bool; for (int i19 = 0; i19 < jSONArray2.length(); i19++) { try { if (jSONArray2.getString(i19).equals("original")) { bool = Boolean.TRUE; } else if (jSONArray2.getString(i19).equals("compressed")) { bool2 = Boolean.TRUE; } } catch (Exception unused3) { Log.e("MicroMsg.MsgHandler", "doChooseImage: sizeType parsing error"); String nullAsNil22 = Util.nullAsNil((String) h1Var.f247819a.get("camera")); int i1822 = 7; if (!bool.booleanValue()) { } if (!bool.booleanValue()) { } i1822 = 8; bool3 = Boolean.FALSE; Intent intent22 = new Intent(); intent22.putExtra("key_pick_local_pic_count", i1722); intent22.putExtra("key_pick_local_pic_query_source_type", i1822); intent22.putExtra("key_pick_local_pic_send_raw", bool3); intent22.putExtra("query_media_type", 3); intent22.putExtra("key_pick_local_media_video_type", 2); intent22.putExtra("key_pick_local_media_sight_type", "image"); intent22.putExtra("key_pick_local_media_choose_type", JsApiChooseImage.NAME); Log.i("MicroMsg.MsgHandler", "doChooseImage: realScene: %d, count: %d, querySourceType: %d, sendRaw: %b", Integer.valueOf(i15), Integer.valueOf(i1722), Integer.valueOf(i1822), bool3); if (Util.isNullOrNil(str2)) { } if (!str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { } if (str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { } } } } catch (Exception unused4) { bool2 = bool; Log.e("MicroMsg.MsgHandler", "doChooseImage: sizeType parsing error"); String nullAsNil222 = Util.nullAsNil((String) h1Var.f247819a.get("camera")); int i18222 = 7; if (!bool.booleanValue()) { } if (!bool.booleanValue()) { } i18222 = 8; bool3 = Boolean.FALSE; Intent intent222 = new Intent(); intent222.putExtra("key_pick_local_pic_count", i1722); intent222.putExtra("key_pick_local_pic_query_source_type", i18222); intent222.putExtra("key_pick_local_pic_send_raw", bool3); intent222.putExtra("query_media_type", 3); intent222.putExtra("key_pick_local_media_video_type", 2); intent222.putExtra("key_pick_local_media_sight_type", "image"); intent222.putExtra("key_pick_local_media_choose_type", JsApiChooseImage.NAME); Log.i("MicroMsg.MsgHandler", "doChooseImage: realScene: %d, count: %d, querySourceType: %d, sendRaw: %b", Integer.valueOf(i15), Integer.valueOf(i1722), Integer.valueOf(i18222), bool3); if (Util.isNullOrNil(str2)) { } if (!str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { } if (str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { } } } else { bool2 = bool; } String nullAsNil2222 = Util.nullAsNil((String) h1Var.f247819a.get("camera")); int i182222 = 7; if (!bool.booleanValue() && !bool2.booleanValue()) { bool3 = Boolean.TRUE; } else if (!bool.booleanValue() || !bool2.booleanValue()) { i182222 = 8; bool3 = Boolean.FALSE; } else { bool3 = Boolean.FALSE; } Intent intent2222 = new Intent(); intent2222.putExtra("key_pick_local_pic_count", i1722); intent2222.putExtra("key_pick_local_pic_query_source_type", i182222); intent2222.putExtra("key_pick_local_pic_send_raw", bool3); intent2222.putExtra("query_media_type", 3); intent2222.putExtra("key_pick_local_media_video_type", 2); intent2222.putExtra("key_pick_local_media_sight_type", "image"); intent2222.putExtra("key_pick_local_media_choose_type", JsApiChooseImage.NAME); Log.i("MicroMsg.MsgHandler", "doChooseImage: realScene: %d, count: %d, querySourceType: %d, sendRaw: %b", Integer.valueOf(i15), Integer.valueOf(i1722), Integer.valueOf(i182222), bool3); if (Util.isNullOrNil(str2)) { str2 = "album|camera"; } if (!str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM) && str2.contains("camera")) { new y0(this.f167360d).b(null, new MsgHandler$$z(this), new MsgHandler$$a0(this, nullAsNil2222, intent2222), new MsgHandler$$b0(this, h1Var)); return true; } else if (str2.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { t5(intent2222, 14); return true; } else if (str2.contains("camera")) { u5(nullAsNil2222, intent2222, 14, "image"); return true; } else { q5(h1Var, "chooseImage:fail_sourceType_error", null); return true; } } public final String D6(h1 h1Var) { c.b w25; String q65 = q6(); if (A6() == 27) { return this.f167369p; } if (z6() != 8 && z6() != -1) { String str = this.f167368o; if (str != null) { return str; } if (Util.isNullOrNil(q65)) { return null; } Log.i("MicroMsg.MsgHandler", "BrandUsername in H5 is null, check if it is in hardBiz chat"); ih.c b15 = bg0.l.b(q65); if (b15 == null || (w25 = b15.w2(false)) == null || w25.e() == null || !w25.e().a()) { return null; } String str2 = (String) h1Var.f247819a.get("src_username"); Log.i("MicroMsg.MsgHandler", "HardBiz chat, key_src_username(%s)", (String) h1Var.f247819a.get("src_username")); return str2; } else if (h1Var == null) { return null; } else { String str3 = (String) h1Var.f247819a.get("src_username"); Log.i("MicroMsg.MsgHandler", "key_src_username(%s)", (String) h1Var.f247819a.get("src_username")); return str3; } } public final void E5(h1 h1Var) { Log.i("MicroMsg.MsgHandler", "real scene = %d", 1); boolean KK0 = ((xw.d) j.c(xw.d.class)).KK0((Activity) this.f167360d, new String[]{"android.permission.READ_EXTERNAL_STORAGE"}, 151, "", ""); Log.i("MicroMsg.MsgHandler", "checkPermission checkStorage[%b]", Boolean.valueOf(KK0)); if (KK0) { Intent intent = new Intent(); intent.putExtra("key_pick_local_pic_capture", 1); intent.putExtra("key_pick_local_pic_query_source_type", 8); intent.putExtra("query_media_type", 1); intent.putExtra("key_pick_local_pic_count", 1); Log.i("MicroMsg.MsgHandler", "doChooseImageIdCard: realScene: %d, querySourceType: %d", 1, 8); Context context = this.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(this); sv3.b.o(this.f167360d, "webview", ".ui.tools.OpenFileChooserUI", intent, 43, false); } } } /* JADX DEBUG: Multi-variable search result rejected for r1v1, resolved type: boolean */ /* JADX DEBUG: Multi-variable search result rejected for r1v2, resolved type: boolean */ /* JADX DEBUG: Multi-variable search result rejected for r1v23, resolved type: boolean */ /* JADX WARN: Multi-variable type inference failed */ public boolean E6(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { String str; h1 h1Var2; boolean z15; int i15; int i16; Exception e15; String str2; String str3; String str4; if (this.f167375u) { Log.w("MicroMsg.MsgHandler", "handleMsg, MsgHandler is busy, old msg will be overrided"); } Bundle bundle = this.f167367n; if (bundle != null) { bundle.setClassLoader(MsgHandler.class.getClassLoader()); } this.f167361e = h1Var; this.f167375u = true; if (h1Var.f247856b.equals("call")) { m mVar = this.f167378x; Set<String> set = o1.f248008a; boolean z16 = mVar == null; if (z16) { str2 = ""; } else { try { str2 = mVar.Al(); } catch (Exception e16) { Log.w("MicroMsg.WebViewSecurityUtil", "report, ex = " + e16.getMessage()); } } o1.f248009b = str2; if (z16) { str3 = ""; } else { str3 = mVar.getCurrentUrl(); } o1.f248010c = str3; if (z16) { str4 = ""; } else { str4 = mVar.U70(); } o1.f248011d = str4; String str5 = h1Var.f247863i; this.f167376v = str5; Log.i("MicroMsg.MsgHandler", "handleMsg function = %s", str5); Integer num = aq3.a.f7946d.get(h1Var.f247863i); if (num == null) { num = -1; } int intValue = num.intValue(); if (-1 != intValue) { q.INSTANCE.idkeyStat(157, (long) intValue, 1, false); } c.h b15 = yv3.c.b(Util.nullAsNil(this.f167376v)); if (b15 == null) { Bundle bundle2 = null; try { JSONObject jSONObject = h1Var.f247858d; if (jSONObject != null) { bundle2 = this.f167378x.n00(this.f167376v, jSONObject.toString()); } } catch (RemoteException e17) { Log.printErrStackTrace("MicroMsg.MsgHandler", e17, "proxy handleMsg:%s", this.f167376v); } if (bundle2 == null || !bundle2.getBoolean("handle")) { Log.e("MicroMsg.MsgHandler", "unknown function = %s", this.f167376v); r5(h1Var, "system:function_not_exist", null, true, false); return true; } r5(h1Var, bundle2.getString("handle_result", ""), null, true, false); Log.i("MicroMsg.MsgHandler", "proxy function = %s", this.f167376v); return true; } else if (this.G.a(b15.f349159c)) { Log.e("MicroMsg.MsgHandler", "isTooFrequent func: %s", b15.f349157a); r5(h1Var, "system:too_frequent", null, true, false); this.G.b(b15.f349159c, b15.f349157a, s6()); return true; } else { String str6 = b15.f349157a; if (str6 == "recordHistory") { Log.e("MicroMsg.MsgHandler", "handleMsg access denied func: %s", str6); r5(h1Var, "system:access_denied", null, true, false); return true; } else if (this.f167366j.contains(str6) || jsapiPermissionWrapper.d(b15.f349159c) != 0) { try { MsgHandler$$v msgHandler$$v = new MsgHandler$$v(this, h1Var, jsapiPermissionWrapper, b15); i16 = 0; i15 = 1; str = "MicroMsg.MsgHandler"; h1Var2 = h1Var; try { this.f167382z.e(jsapiPermissionWrapper, s6(), r6(), b15.f349159c, h1Var, m6(), msgHandler$$v); return msgHandler$$v.f167601a; } catch (Exception e18) { e15 = e18; Object[] objArr = new Object[i15]; objArr[i16] = e15.getMessage(); Log.e(str, "handleMsg excpetion %s", objArr); Log.printErrStackTrace(str, e15, "", new Object[i16]); z15 = i16; Log.e(str, "unknown type = " + h1Var2.f247856b); this.f167375u = z15; return z15; } } catch (Exception e19) { e15 = e19; i16 = 0; i15 = 1; str = "MicroMsg.MsgHandler"; h1Var2 = h1Var; Object[] objArr2 = new Object[i15]; objArr2[i16] = e15.getMessage(); Log.e(str, "handleMsg excpetion %s", objArr2); Log.printErrStackTrace(str, e15, "", new Object[i16]); z15 = i16; Log.e(str, "unknown type = " + h1Var2.f247856b); this.f167375u = z15; return z15; } } else { Log.e("MicroMsg.MsgHandler", "handleMsg access denied func: %s", b15.f349157a); r5(h1Var, "system:access_denied", null, true, false); if (h1Var.f247863i.equalsIgnoreCase(JsApiAddDownloadTask.NAME) && this.f167360d != null) { ((xc4.j) xc4.j.f338034d).z(new r1(this)); } return true; } } } else { z15 = 0; str = "MicroMsg.MsgHandler"; h1Var2 = h1Var; Log.e(str, "unknown type = " + h1Var2.f247856b); this.f167375u = z15; return z15; } } public final boolean F5(h1 h1Var) { Log.i("MicroMsg.MsgHandler", "doChooseMedia()"); String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("sourceType")); String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get("mediaType")); int i15 = 10; int min = Math.min(Util.getInt((String) h1Var.f247819a.get("maxDuration"), 10), 10); String nullAsNil3 = Util.nullAsNil((String) h1Var.f247819a.get("camera")); int i16 = Util.getInt((String) h1Var.f247819a.get("count"), 1); String nullAsNil4 = Util.nullAsNil((String) h1Var.f247819a.get("sizeType")); Log.i("MicroMsg.MsgHandler", "doChooseMedia sourceType:%s, mediaType:%s, maxDuration:%d, camera:%s, count:%d, sizeType:%s", nullAsNil, nullAsNil2, Integer.valueOf(min), nullAsNil3, Integer.valueOf(i16), nullAsNil4); Intent intent = new Intent(); intent.putExtra("key_pick_local_pic_count", i16); if (min > 0) { i15 = min; } intent.putExtra("key_pick_local_media_duration", i15); intent.putExtra("query_media_type", 3); intent.putExtra("key_pick_local_media_video_type", 2); intent.putExtra("key_pick_local_media_sight_type", nullAsNil2); intent.putExtra("key_pick_local_pic_query_source_type", nullAsNil4.contains("original") ^ nullAsNil4.contains("compressed") ? 7 : 8); Boolean valueOf = Boolean.valueOf(!nullAsNil4.contains("compressed")); if (!nullAsNil4.contains("original") && !nullAsNil4.contains("compressed")) { valueOf = Boolean.FALSE; } intent.putExtra("key_pick_local_pic_send_raw", valueOf); if (Util.isNullOrNil(nullAsNil)) { nullAsNil = "album|camera"; } if (nullAsNil.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM) && nullAsNil.contains("camera")) { new y0(this.f167360d).b(null, new MsgHandler$$c0(this), new MsgHandler$$d0(this, nullAsNil3, intent, nullAsNil2), new MsgHandler$$e0(this, h1Var)); return true; } else if (nullAsNil.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) { t5(intent, 47); return true; } else if (nullAsNil.contains("camera")) { u5(nullAsNil3, intent, 47, nullAsNil2); return true; } else { q5(h1Var, "chooseMedia:fail_sourceType_error", null); return true; } } public final boolean F6(boolean z15) { Log.e("MicroMsg.MsgHandler", "hideMenuEntry:" + z15); try { this.f167378x.Hh(z15); Log.e("MicroMsg.MsgHandler", "hideMenuEntry succ"); return true; } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); Log.e("MicroMsg.MsgHandler", "hideMenuEntry error"); Log.e("MicroMsg.MsgHandler", "hideMenuEntry succ"); return false; } catch (Throwable unused) { Log.e("MicroMsg.MsgHandler", "hideMenuEntry succ"); return true; } } public final boolean G5(h1 h1Var, int i15) { String nullAsNil = Util.nullAsNil((String) h1Var.f247819a.get("sourceType")); String nullAsNil2 = Util.nullAsNil((String) h1Var.f247819a.get("camera")); Log.i("MicroMsg.MsgHandler", "doChooseVideo sourceType = %s, camera = %s, isVideoType:%d", nullAsNil, nullAsNil2, Integer.valueOf(i15)); int i16 = 60; int i17 = Util.getInt((String) h1Var.f247819a.get("maxDuration"), 60); int i18 = nullAsNil.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM) ? 4096 : 0; if (nullAsNil.contains("camera")) { if (i17 <= 0) { q5(h1Var, "chooseVideo:fail", null); return true; } i18 = nullAsNil2.equals("front") ? i18 | 16 : i18 | 256; } if (i18 == 0) { i18 = 4352; } if (i18 == 16 || i18 == 256 || i18 == 4352) { if (i15 == 1) { if (!((xw.d) j.c(xw.d.class)).M1((Activity) this.f167360d, "android.permission.CAMERA", 117, "", "") || !((xw.d) j.c(xw.d.class)).M1((Activity) this.f167360d, "android.permission.RECORD_AUDIO", 118, "", "")) { return true; } } else if (!((xw.d) j.c(xw.d.class)).M1((Activity) this.f167360d, "android.permission.CAMERA", 115, "", "")) { return true; } } int i19 = Util.getInt((String) h1Var.f247819a.get("quality"), 1); if (!(i19 == 0 || i19 == 1)) { i19 = 1; } if (i17 <= 60) { i16 = i17; } Log.i("MicroMsg.MsgHandler", "doChooseVideo real scene = %d, select count = %d, video quality = %d, duration = %d", Integer.valueOf(i18), 1, Integer.valueOf(i19), Integer.valueOf(i16)); Intent intent = new Intent(); intent.putExtra("key_pick_local_pic_capture", i18); intent.putExtra("key_pick_local_pic_count", 1); intent.putExtra("key_pick_local_pic_query_source_type", 7); intent.putExtra("key_pick_local_media_quality", i19); intent.putExtra("key_pick_local_media_duration", i16); intent.putExtra("query_media_type", 2); intent.putExtra("key_pick_local_media_video_type", i15); Log.i("MicroMsg.MsgHandler", "doChooseVideo: realScene: %d, count: %d, querySourceType: %d", Integer.valueOf(i18), 1, 7); Context context = this.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(this); if (i15 == 1) { sv3.b.o(this.f167360d, "webview", ".ui.tools.OpenFileChooserUI", intent, 45, false); } else { sv3.b.o(this.f167360d, "webview", ".ui.tools.OpenFileChooserUI", intent, 32, false); } } return true; } public final boolean G6() { boolean z15 = !Util.isNullOrNil(this.X); if (z15) { Log.e("MicroMsg.MsgHandler", "in recording state."); } return z15; } public boolean H5(h1 h1Var) { try { this.f167378x.v6(39, new Bundle(0)); q5(h1Var, "clearBounceBackground:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doClearBounceBackground, exception = %s", e15); q5(h1Var, "clearBounceBackground:fail", null); } return true; } public final boolean H6(String str) { if (str.startsWith(Y0) || str.startsWith(Z0) || str.startsWith(f167347b1) || str.startsWith(f167348c1) || str.startsWith(f167349d1) || str.startsWith(f167346a1) || str.startsWith("https://security.wechat.com/security/") || str.startsWith("https://s0.security.wechat.com/") || str.startsWith("https://wx110.qq.com/") || str.startsWith("https://sec.wechat.com/") || str.startsWith("https://s0.sec.wechat.com/")) { return true; } return false; } public final void I5(Exception exc, Map<String, Object> map) { Log.w("MicroMsg.MsgHandler", "doCloseWindow, ex = " + exc.getMessage()); map.put("err_code", 1); map.put("err_msg", "fail"); q5(this.f167361e, "close window and next:fail", map); } /* JADX WARNING: Removed duplicated region for block: B:11:0x0038 A[RETURN] */ /* JADX WARNING: Removed duplicated region for block: B:12:0x0039 A[SYNTHETIC, Splitter:B:12:0x0039] */ public final boolean I6() { boolean z15; boolean z16; v.b bVar = com.tencent.mm.plugin.webview.core.v.f164638a; if (ih.n2.a()) { if (com.tencent.mm.plugin.webview.core.x.a().decodeInt("forcesharecard", 0) == 1) { z16 = true; } else { z16 = false; } Log.i("WebViewCommand", "forceShareCard = " + z16); if (z16) { z15 = true; if (!z15) { return false; } try { m mVar = this.f167378x; Bundle bundle = null; if (mVar != null) { bundle = mVar.v6(TinkerStatusReport.KVSTAT_TYPE_ID_TINKER_EXCEPTION, null); } if (bundle != null) { boolean z17 = bundle.getBoolean("k_text_url_share", false); Log.i("MicroMsg.MsgHandler", "isShareTypeText = %b", Boolean.valueOf(z17)); return z17; } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "isShareTypeText error : %s", e15.getMessage()); } return false; } } z15 = false; if (!z15) { } } public boolean J5(h1 h1Var) { String str = (String) h1Var.f247819a.get("place"); if (Util.isNullOrNil(str)) { q5(h1Var, "disableBounceScroll:fail", null); return true; } try { JSONArray jSONArray = new JSONArray(str); boolean z15 = false; for (int i15 = 0; i15 < jSONArray.length(); i15++) { if ("top".equalsIgnoreCase(jSONArray.getString(i15))) { z15 = true; } } if (!z15) { q5(h1Var, "disableBounceScroll:ok", null); return true; } try { Bundle bundle = new Bundle(1); bundle.putInt("webview_disable_bounce_scroll_top", 1); this.f167378x.v6(38, bundle); q5(h1Var, "disableBounceScroll:ok", null); } catch (Exception e15) { Log.i("MicroMsg.MsgHandler", "doDisableBounceScroll, exception = %s", e15); q5(h1Var, "disableBounceScroll:fail", null); } return true; } catch (JSONException unused) { Log.i("MicroMsg.MsgHandler", "doDisableBounceScroll, invalid json array, string = %s", str); q5(h1Var, "disableBounceScroll:fail", null); return true; } } public boolean K5() { try { this.f167378x.v6(47, Bundle.EMPTY); q5(this.f167361e, "disablePullDownRefresh:ok", null); return true; } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); q5(this.f167361e, "disablePullDownRefresh:fail", null); return true; } } public void K6(boolean z15) { this.f167377w = z15; Log.i("MicroMsg.MsgHandler", "markAwaitingProxyUI %d, %b", Integer.valueOf(this.A), Boolean.valueOf(z15)); } public boolean L5(h1 h1Var) { try { this.f167378x.v6(34, Bundle.EMPTY); q5(h1Var, "enablePullDownRefresh:ok", null); } catch (Exception e15) { Log.i("MicroMsg.MsgHandler", "doEnablePullDownRefresh, exception = %s", e15); q5(h1Var, "enablePullDownRefresh:fail", null); } return true; } public final void L6(boolean z15) { this.T0 = z15; if (!this.U0) { this.U0 = true; this.f167381y0.alive(); } } public final void M5() { Map<String, Object> map; String str = (String) ((HashMap) this.f167361e.f247819a).get("type"); if (Util.isNullOrNil(str) || X0.contains(str)) { mg0.b Zv = ((lt.c) j.c(lt.c.class)).Zv(); this.M = Zv; if (Zv == null) { Log.e("MicroMsg.MsgHandler", "doGeoLocation fail, iGetLocation is null"); q5(this.f167361e, "geo_location:fail", null); return; } String str2 = (String) ((HashMap) this.f167361e.f247819a).get("type"); long currentTimeMillis = System.currentTimeMillis(); com.tencent.mm.plugin.webview.core.f0 f0Var = com.tencent.mm.plugin.webview.core.f0.f164574a; if (!((Boolean) ((wg4.n) com.tencent.mm.plugin.webview.core.f0.f164578e).getValue()).booleanValue() || (map = this.S) == null || !Util.isEqual(map.get("type"), str2) || Math.abs(currentTimeMillis - this.T) >= ((long) ((Number) ((wg4.n) com.tencent.mm.plugin.webview.core.f0.f164579f).getValue()).intValue())) { this.T = currentTimeMillis; if (this.N == null) { this.N = new m2(this, str2); } if (this.P == null) { this.P = new MMHandler(Looper.getMainLooper()); } this.P.postDelayed(new n2(this), 20000); if (Util.isNullOrNil(str2) || str2.equalsIgnoreCase("gcj02")) { this.M.a(this.N, false); } else if (str2.equalsIgnoreCase("wgs84")) { this.M.b(this.N, false); } else { Log.e("MicroMsg.MsgHandler", "startGeoLocation, should not reach here !!!!!"); this.N = null; q5(this.f167361e, "geo_location:fail_unsupported_type_startgeo", null); } } else { Log.i("MicroMsg.MsgHandler", "startGeoLocation return cache location"); this.S.put("cached", Boolean.TRUE); q5(this.f167361e, "geo_location:ok", this.S); } } else { Log.e("MicroMsg.MsgHandler", "doGeoLocation fail, unsupported type = %s", str); q5(this.f167361e, "geo_location:fail_unsupported_type", null); } } public final Bundle M6(String str, int i15, Bundle bundle) { try { return this.f167378x.v6(i15, bundle); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "[NFC] " + str + " callback RemoteException!" + e15.toString()); return null; } } public boolean N5(h1 h1Var) { Log.i("MicroMsg.MsgHandler", "getGameCommInfo call"); int i15 = Util.getInt((String) h1Var.f247819a.get(FileReaderHelper.OPEN_FILE_FROM_CMD), 0); String str = (String) h1Var.f247819a.get("param"); if (i15 == 10002) { m mVar = this.f167378x; if (mVar == null) { return true; } try { Bundle v65 = mVar.v6(97, null); if (v65 == null) { return true; } int i16 = v65.getInt("web_page_count"); HashMap hashMap = new HashMap(); hashMap.put("webpageCount", Integer.valueOf(i16)); q5(h1Var, "getGameCommInfo:ok", hashMap); return true; } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "doGetGameCommInfo exception, " + e15.getMessage()); q5(h1Var, "getGameCommInfo:fail", null); return true; } } else { e04.a.a(new MsgHandler$$d(this, i15, str, h1Var)); return true; } } public final boolean N6(String str, int i15, Bundle bundle) { Bundle M6 = M6(str, i15, bundle); int i16 = -1; if (M6 != null) { i16 = M6.getInt("status", -1); } else { Log.w("MicroMsg.MsgHandler", "[NFC] " + str + " callback fail!"); } Log.i("MicroMsg.MsgHandler", "[NFC] " + str + " result status : " + i16); if (i16 == 0) { h1 h1Var = this.f167361e; q5(h1Var, str + ":nfc_not_support", null); return false; } else if (i16 != 1) { if (i16 == 2) { h1 h1Var2 = this.f167361e; q5(h1Var2, str + ":disconnect", null); } else if (i16 != 3) { if (i16 != 4) { h1 h1Var3 = this.f167361e; q5(h1Var3, str + ":fail", null); return false; } h1 h1Var4 = this.f167361e; q5(h1Var4, str + ":card_not_support", null); return false; } return true; } else { h1 h1Var5 = this.f167361e; q5(h1Var5, str + ":nfc_off", null); return false; } } public boolean O5(h1 h1Var) { String str; Log.i("MicroMsg.MsgHandler", "doIdCardRealnameVerify call"); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); try { str = this.f167378x.getCurrentUrl(); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); str = null; } if (!Util.isNullOrNil(str)) { intent.putExtra("appId", this.f167382z.c(str)); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); try { intent.putExtra("url", this.f167378x.getCurrentUrl()); } catch (RemoteException e16) { Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "", new Object[0]); } intent.putExtra("pay_channel", walletJsapiData.f173501v); intent.putExtra("real_name_verify_mode", 2); intent.setFlags(536870912); intent.putExtra("realname_scene", 1); ((MMActivity) this.f167360d).mmSetOnActivityResultCallback(this); sv3.b.n(this.f167360d, "wallet_core", ".id_verify.WalletRealNameProcessProxyUI", intent, 41); } return true; } public boolean O6(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { Log.i("MicroMsg.MsgHandler", "openMusicPage"); this.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); int nullAsInt = Util.nullAsInt(map.get("webview_instance_id"), -1); fTSWebViewLogic.f164231d.add(Integer.valueOf(nullAsInt)); JSONObject jSONObject = new JSONObject(); for (Map.Entry<String, Object> entry : map.entrySet()) { try { jSONObject.put(entry.getKey(), entry.getValue()); } catch (Exception unused) { } } Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "openMusicPage webviewID:%s", Integer.valueOf(nullAsInt)); ((z00.t) j.c(z00.t.class)).Xg0(jSONObject, true); return false; } public boolean P5(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { boolean z15 = false; int i15 = Util.getInt(Util.notNullToString(h1Var.f247819a.get("id")), 0); if (i15 <= 0) { q5(h1Var, "kvReport:fail", null); return true; } String notNullToString = Util.notNullToString(h1Var.f247819a.get("value")); boolean z16 = Util.getInt(Util.notNullToString(h1Var.f247819a.get("is_important")), 0) > 0; if (Util.getInt(Util.notNullToString(h1Var.f247819a.get("is_report_now")), 0) > 0) { z15 = true; } q.INSTANCE.c(i15, notNullToString, z15, z16); q5(h1Var, "kvReport:ok", null); return true; } public final boolean P6(Integer num, int i15, int i16, String str, Intent intent) { intent.putExtra("key_product_scene", i15); Log.e("MicroMsg.MsgHandler", "doOpenProductView, productType = %d", num); Context context = this.f167360d; if (context instanceof MMActivity) { ((MMActivity) context).mmSetOnActivityResultCallback(this); int intValue = num.intValue(); if (intValue != 0) { if (intValue == 10000 || intValue == 20000) { sv3.b.j(this.f167360d, "card", ".ui.CardProductUI", intent, null); q5(this.f167361e, "open_product_view:ok", null); } else { Log.e("MicroMsg.MsgHandler", "doOpenProductView fail, productType = %d", num); if (i15 == 8) { q5(this.f167361e, "open_product_view_with_id:fail", null); } else { q5(this.f167361e, "open_product_view:fail", null); } } } else if (i16 == 0) { sv3.b.j(this.f167360d, "product", ".ui.MallProductUI", intent, null); q5(this.f167361e, "open_product_view:ok", null); } else if (i16 != 1) { Log.e("MicroMsg.MsgHandler", "doOpenProductView fail, productType = %d, viewType = %d", num, Integer.valueOf(i16)); q5(this.f167361e, "open_product_view:fail", null); } else { intent.putExtra("key_Qrcode_Url", str); intent.putExtra("key_ProductUI_getProductInfoScene", 4); sv3.b.n(this.f167360d, "scanner", ".ui.ProductUI", intent, 10); } } else { q5(this.f167361e, "open_product_view:fail", null); } return true; } public final void Q5(String str, String str2, String str3, String str4) { try { Log.i("MicroMsg.MsgHandler", "doLaunch3RdAppImpl pkg:" + str); Intent launchIntentForPackage = MMApplicationContext.getContext().getPackageManager().getLaunchIntentForPackage(str); if (launchIntentForPackage != null) { Bundle bundle = new Bundle(); j0.i(bundle, str2); launchIntentForPackage.putExtras(bundle); launchIntentForPackage.addFlags(268435456).addFlags(134217728); Bundle bundle2 = new Bundle(); bundle2.putString("current_page_url", str3); bundle2.putString("current_page_appid", str4); ((ln.l) j.c(ln.l.class)).cB0(this.f167360d, launchIntentForPackage, null, new MsgHandler$$y(this, str), bundle2); return; } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doLaunch3RdAppImpl getLaunchIntentForPackage, %s", e15.getMessage()); } q5(this.f167361e, "launch_3rdApp:fail", null); } public boolean Q6(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { Log.i("MicroMsg.MsgHandler", "playMusic"); this.f167375u = false; jo3.o ka5 = com.tencent.mm.plugin.webview.modeltools.m.ka(); Map<String, Object> map = h1Var.f247819a; FTSWebViewLogic fTSWebViewLogic = (FTSWebViewLogic) ka5; fTSWebViewLogic.getClass(); int nullAsInt = Util.nullAsInt(map.get("webview_instance_id"), -1); fTSWebViewLogic.f164231d.add(Integer.valueOf(nullAsInt)); JSONObject jSONObject = new JSONObject(); for (Map.Entry<String, Object> entry : map.entrySet()) { try { jSONObject.put(entry.getKey(), entry.getValue()); } catch (Exception unused) { } } Log.i("MicroMsg.WebSearch.FTSWebViewLogic", "playMusic webviewID:%s", Integer.valueOf(nullAsInt)); ((z00.t) j.c(z00.t.class)).Xg0(jSONObject, false); return false; } public boolean R5(h1 h1Var) { if (zk.a.u(this.f167360d) || zk.a.e(this.f167360d)) { return false; } boolean M1 = ((xw.d) j.c(xw.d.class)).M1((Activity) this.f167360d, "android.permission.CAMERA", 18, "", ""); Log.i("MicroMsg.MsgHandler", "doOpenCamera checkPermission checkCamera[%b], stack[%s], activity[%s]", Boolean.valueOf(M1), Util.getStack(), this.f167360d); if (!M1) { return false; } int i15 = Util.getInt((String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE), 0); String str = (String) h1Var.f247819a.get("sessionId"); VideoTransPara videoTransPara = new SightParams(3, 0).f132983f; RecordConfigProvider e15 = RecordConfigProvider.e(videoTransPara, videoTransPara.f78868h * 1000, 16); Boolean bool = Boolean.TRUE; e15.f139937s = bool; e15.f139938t = Boolean.FALSE; e15.f139940v = bool; ((ox.m) j.c(ox.m.class)).Lc0((ComponentActivity) this.f167360d, e15, new MsgHandler$$x(this, h1Var, i15)); return true; } public boolean R6(String str) { boolean remove = this.f167366j.remove(str); Log.i("MicroMsg.MsgHandler", "removeInvokedJsApiFromMenu, functionName = %s, succ = %s.", str, Boolean.valueOf(remove)); return remove; } public boolean S5(h1 h1Var) { Log.i("MicroMsg.MsgHandler", "openGameRegion call"); Context context = this.f167360d; if (!(context instanceof MMActivity)) { return true; } ((MMActivity) context).mmSetOnActivityResultCallback(this); sv3.b.o(this.f167360d, "game", ".ui.GameRegionSelectUI", null, 42, false); return true; } public boolean T5(h1 h1Var) { String str = (String) h1Var.f247819a.get("latitude"); String str2 = (String) h1Var.f247819a.get("longitude"); String str3 = (String) h1Var.f247819a.get("destinationName"); if (Util.isNullOrNil(str) || Util.isNullOrNil(str2)) { q5(h1Var, "openMapNavigateMenu:fail", null); return true; } try { double parseDouble = Double.parseDouble(str); double parseDouble2 = Double.parseDouble(str2); int i15 = Util.getInt((String) h1Var.f247819a.get("preferMap"), 0); Context context = this.f167360d; if (context == null || !(context instanceof Activity) || ((Activity) context).isFinishing()) { q5(h1Var, "openMapNavigateMenu:fail", null); } else { MMHandlerThread.postToMainThread(new t0(this, i15, parseDouble, parseDouble2, str3, o5(h1Var))); } return true; } catch (Exception unused) { Log.e("MicroMsg.MsgHandler", "doOpenMapNavigateMenu, parse double, exception = %s"); q5(h1Var, "openMapNavigateMenu:fail", null); return true; } } public final void T6(h1 h1Var, boolean z15) { String str; m mVar; String[] stringArray; String str2; String str3; Object[] objArr; if (h1Var == null) { Log.e("MicroMsg.MsgHandler", "msg is null when report."); return; } String str4 = h1Var.f247863i; HashMap hashMap = (HashMap) h1Var.f247862h; hashMap.put("isSuccess", Boolean.valueOf(z15)); hashMap.put("report_initUrl", Util.nullAs((String) h1Var.f247819a.get("key_webview_init_url"), "")); hashMap.put("containerEnv", Util.nullAs((String) h1Var.f247819a.get("key_wxapp_id"), "")); hashMap.put("miniProgramPath", Util.nullAs((String) h1Var.f247819a.get("key_wxapp_path"), "")); o1.c(str4, hashMap); Bundle bundle = this.f167367n; if (bundle != null) { str = bundle.getString("key_webview_container_env"); } else { str = ""; } if ("miniProgram".equals(str) && (mVar = this.f167378x) != null) { try { Bundle v65 = mVar.v6(145, null); if (v65 != null && (stringArray = v65.getStringArray("key_webview_apbrand_jsapi_report_args")) != null && stringArray.length == 19) { stringArray[10] = str4; str4.getClass(); if (!str4.equals("getBrandWCPayRequest")) { str2 = ""; } else { str2 = h1Var.f247819a.get("package").toString(); } stringArray[11] = str2; if ("true".equals(f4.a(h1Var, "isSuccess"))) { str3 = "1"; } else { str3 = "2"; } stringArray[12] = str3; stringArray[13] = f4.a(h1Var, "permissionValue"); stringArray[14] = f4.a(h1Var, "jsapiErrorCode"); q qVar = q.INSTANCE; int i15 = 0; if (stringArray.length <= 0) { objArr = new Object[0]; } else { Object[] objArr2 = new Object[stringArray.length]; int length = stringArray.length; int i16 = 0; while (i15 < length) { String str5 = stringArray[i15]; if (str5 == null) { str5 = ""; } else if (str5.contains(",") || str5.contains("/")) { str5 = f4.b(str5); } objArr2[i16] = String.valueOf(str5); i15++; i16++; } objArr = objArr2; } qVar.g(14993, objArr); } } catch (Exception e15) { Log.e("kv_14993", "" + e15); } } } public boolean U5(String str, JsapiPermissionWrapper jsapiPermissionWrapper) { String str2; Map<String, Object> map; Map<String, Object> map2; Map<String, Object> map3; Map<String, Object> map4; Map<String, Object> map5; if (str == null || str.length() == 0) { Log.e("MicroMsg.MsgHandler", "doProfile fail, username is null"); this.f167375u = false; return false; } else if (Util.isNullOrNil(str)) { ak.a.makeText(MMApplicationContext.getContext(), hy3.h.a(this.f167360d).getString(R.string.fds, 3, -1), 0).show(); this.f167375u = false; return false; } else { h1 h1Var = this.f167361e; if (h1Var != null) { o1.a(h1Var.f247862h, u6(Scopes.PROFILE), str, null); } if (!d60.z.b().m()) { Log.e("MicroMsg.MsgHandler", "doProfile, hasLogin is false"); this.f167375u = false; return false; } z1 z1Var = ((k0) d60.z.q(k0.class)).Zx().get(str); if (z1Var == null || ((int) z1Var.V1) <= 0) { z1Var = ((k0) d60.z.q(k0.class)).Zx().R3(str); } Intent intent = new Intent(); h1 h1Var2 = this.f167361e; if (h1Var2 == null || (map5 = h1Var2.f247819a) == null || map5.get("profileReportInfo") == null) { str2 = ""; } else { str2 = (String) this.f167361e.f247819a.get("profileReportInfo"); } if (!Util.isNullOrNil(str2)) { intent.putExtra("key_add_contact_report_info", str2); } Bundle bundle = this.f167367n; if (bundle != null && bundle.getBoolean("KFromBizSearch")) { intent.putExtra("Contact_Ext_Args", this.f167367n.getBundle("KBizSearchExtArgs")); } h1 h1Var3 = this.f167361e; if (!(h1Var3 == null || (map4 = h1Var3.f247819a) == null || map4.get("channelSessionId") == null)) { intent.putExtra("key_channel_session_id", (String) this.f167361e.f247819a.get("channelSessionId")); } h1 h1Var4 = this.f167361e; if (!(h1Var4 == null || (map3 = h1Var4.f247819a) == null || map3.get("isFromFinder") == null)) { intent.putExtra("biz_profile_enter_from_finder", this.f167361e.f247819a.get("isFromFinder").equals("true")); } h1 h1Var5 = this.f167361e; if (!(h1Var5 == null || (map2 = h1Var5.f247819a) == null || map2.get("luckMoneySpringEventUrl") == null)) { intent.putExtra("biz_profile_enter_from_luck_money_spring_event_url", (String) this.f167361e.f247819a.get("luckMoneySpringEventUrl")); } h1 h1Var6 = this.f167361e; if (!(h1Var6 == null || (map = h1Var6.f247819a) == null || map.get("tabType") == null)) { if (Util.safeParseInt((String) this.f167361e.f247819a.get("tabType")) == 2) { intent.putExtra("biz_profile_tab_type", 1); } else { intent.putExtra("biz_profile_tab_type", 0); } } if (z1Var == null || ((int) z1Var.V1) <= 0) { if (this.f167373s != null) { b3.a().f(this.f167373s); } this.f167373s = str; b3.a().a(str, "", new MsgHandler$$c(this, intent)); try { Bundle bundle2 = new Bundle(); bundle2.putString("function", Scopes.PROFILE); bundle2.putString("username", str); this.f167378x.v6(198, bundle2); this.f167375u = false; } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "show dialog fail %s", e15.getMessage()); } return true; } intent.addFlags(268435456); intent.putExtra("Contact_User", z1Var.getUsername()); if (z1Var.u3()) { Bundle bundle3 = this.f167367n; int i15 = 42; if (bundle3 != null) { i15 = bundle3.getInt("Contact_Scene", 42); } q qVar = q.INSTANCE; qVar.kvStat(10298, z1Var.getUsername() + "," + i15); intent.putExtra("Contact_Scene", i15); } if (z1Var.z3()) { SetLocalQQMobileEvent setLocalQQMobileEvent = new SetLocalQQMobileEvent(); SetLocalQQMobileEvent.a aVar = setLocalQQMobileEvent.f64494d; aVar.f64496a = intent; aVar.f64497b = z1Var.getUsername(); setLocalQQMobileEvent.publish(); } j7(intent); q5(this.f167361e, "profile:ok", null); return false; } } public final void U6(SnsAdClick snsAdClick) { ReportAdClickEvent reportAdClickEvent = new ReportAdClickEvent(); reportAdClickEvent.f64208d.f64209a = snsAdClick; reportAdClickEvent.publish(); } public boolean V5(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { long j15; boolean z15 = false; int i15 = Util.getInt(Util.notNullToString(h1Var.f247819a.get("id")), 0); if (i15 <= 0) { q5(h1Var, "realtimeReport:fail", null); return true; } String notNullToString = Util.notNullToString(h1Var.f247819a.get("value")); int i16 = Util.getInt(Util.notNullToString(h1Var.f247819a.get("type")), 0); com.tencent.mm.plugin.webview.model.r rVar = r.b.f165769a; rVar.getClass(); if (!d60.z.a()) { Log.i("MicroMsg.WebView.JsLogHelper", "kvStat(), acc not ready, skip"); } else { com.tencent.mm.plugin.webview.model.q YN0 = com.tencent.mm.plugin.webview.modeltools.m.YN0(); Long l15 = YN0.f165752e.get(Integer.valueOf(i15)); if (l15 != null) { j15 = l15.longValue(); } else { Cursor rawQuery = YN0.f165751d.rawQuery(String.format("select %s from %s where %s=?", "liftTime", "JsLogBlockList", "logId"), new String[]{String.valueOf(i15)}, 2); if (rawQuery != null) { if (rawQuery.moveToFirst()) { j15 = rawQuery.getLong(0); rawQuery.close(); } else { rawQuery.close(); } } j15 = 0; } if (j15 != 0 && j15 < Util.nowSecond()) { YN0.f165752e.remove(Integer.valueOf(i15)); j15 = 0; } if (j15 == 0 || j15 < Util.nowSecond()) { e03 e032 = new e03(); e032.f19952d = i15; e032.f19953e = xv3.b.b(notNullToString); e032.f19956h = i16; ((LinkedList) rVar.f165766d).add(e032); z15 = true; } } if (z15) { q5(h1Var, "realtimeReport:ok", null); } else { q5(h1Var, "realtimeReport:fail", null); } return true; } public final void V6(String str, int i15, String str2) { GameWatchReportEvent gameWatchReportEvent = new GameWatchReportEvent(); GameWatchReportEvent.a aVar = gameWatchReportEvent.f63084d; aVar.f63085a = str; aVar.f63086b = 2; aVar.f63087c = i15; aVar.f63088d = str2; gameWatchReportEvent.publish(); } public final boolean W5(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { long j15 = Util.getLong((String) h1Var.f247819a.get("download_id"), -1); Log.i("MicroMsg.MsgHandler", "doResumeDownloadTask, downloadId = " + j15); if (j15 <= 0) { Log.e("MicroMsg.MsgHandler", "doResumeDownloadTask fail, invalid downloadId = " + j15); q5(h1Var, "resume_download_task:fail", null); return true; } c3 Uj = ((t) j.c(t.class)).Uj(j15); if (Uj != null && Uj.field_fromDownloadApp) { Uj.field_fromDownloadApp = false; Uj.field_showNotification = true; ((t) j.c(t.class)).A00(Uj); ((ab1.h) j.c(ab1.h.class)).q1(Uj.field_appId); } boolean w15 = ((com.tencent.mm.plugin.downloader.model.l) ((kq.y) j.c(kq.y.class)).fI0()).w(j15); Log.i("MicroMsg.MsgHandler", "doResumeDownloadTask, ret = " + w15); ((lv.i) j.c(lv.i.class)).yP(10, "MsgHandler_doResumeDownloadTask", hashCode()); if (!w15) { q5(h1Var, "resume_download_task:fail", null); } else { q5(h1Var, "resume_download_task:ok", null); } return true; } public final void W6(String str, String str2, String str3, int i15, int i16, Bundle bundle) { String str4; if (bundle != null) { String string = bundle.getString("share_report_pre_msg_url"); String string2 = bundle.getString("share_report_pre_msg_title"); String string3 = bundle.getString("share_report_pre_msg_desc"); String string4 = bundle.getString("share_report_pre_msg_icon_url"); String string5 = bundle.getString("share_report_pre_msg_appid"); int i17 = bundle.getInt("share_report_from_scene", 0); String string6 = bundle.getString("share_report_biz_username"); String string7 = bundle.getString("share_report_current_url"); String string8 = bundle.getString("share_report_current_title"); WXMediaMessage wXMediaMessage = this.f167362f; WXMediaMessage.IMediaObject iMediaObject = wXMediaMessage.mediaObject; if (iMediaObject instanceof WXWebpageObject) { str4 = ((WXWebpageObject) iMediaObject).webpageUrl; } else { str4 = ""; } String str5 = wXMediaMessage.title; String str6 = wXMediaMessage.description; q qVar = q.INSTANCE; qVar.g(14062, string, string2, string3, string4, string5, Integer.valueOf(i17), string6, string7, string8, str, str4, str5, str6, str2, Integer.valueOf(i15)); Bundle bundle2 = bundle.getBundle("ad_report_bundle"); String s65 = s6(); if (!Util.isNullOrNil(s65) && bundle2 != null) { String string9 = bundle2.getString("ad_report_ux_info"); if (!Util.isNullOrNil(string9)) { qVar.g(19214, Integer.valueOf((int) (System.currentTimeMillis() / 1000)), Integer.valueOf(i16), str3, string9, str, bundle2.getString("ad_report_mid", ""), bundle2.getString("ad_report_idx", ""), s65); } } if (I6() && i16 > 0 && i16 < 4) { int i18 = bundle.getInt("geta8key_scene", 0); int i19 = bundle.getInt("key_get_a8key_req_params_req_id", 0); String string10 = bundle.getString("rawUrl"); QueueWorkerThread queueWorkerThread = c2.f173194a; String doUrlEncode = WebViewUtilities.doUrlEncode(string10); String doUrlEncode2 = WebViewUtilities.doUrlEncode(string7); qVar.g(24710, str3, Integer.valueOf(i16), Integer.valueOf(i18), doUrlEncode, WebViewUtilities.doUrlEncode(C6(string7)), doUrlEncode2, Integer.valueOf(i19), bundle.getString("key_get_a8key_req_params_msg_id"), Integer.valueOf(bundle.getInt("key_get_a8key_req_params_ctrl_mode"))); } } } public boolean X5(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { Context context = this.f167360d; if (context == null || !(context instanceof MMActivity)) { Log.e("MicroMsg.MsgHandler", "context is null"); q5(h1Var, "selectPedometerSource:fail", null); return true; } ((MMActivity) context).mmSetOnActivityResultCallback(this); sv3.b.n(this.f167360d, "exdevice", ".ui.ExdeviceAddDataSourceUI", new Intent(), 26); return true; } public void X6(Context context, m mVar) { String str; Object[] objArr = new Object[1]; if (mVar == null) { str = "null"; } else { str = mVar.toString(); } objArr[0] = str; Log.i("MicroMsg.MsgHandler", "set context and callbacker, callbacker %s", objArr); this.f167360d = context; c cVar = this.f167382z; if (cVar != null) { cVar.f167593h = context; cVar.f167594i = mVar; } this.f167378x = mVar; } public final void Y5(com.tencent.mm.pluginsdk.model.app.j jVar, String str, String str2, String str3, String str4, String str5, String str6, String str7) { ((xc4.j) xc4.j.f338034d).f(new MsgHandler$$b(this, jVar, str, str2, str3, str4, str5, str6, str7)); } public void Y6(Context context, m mVar, m mVar2) { Log.i("MicroMsg.MsgHandler", "set context, callbacker and service callbacker"); this.f167360d = context; c cVar = this.f167382z; if (cVar != null) { cVar.f167593h = context; cVar.f167594i = mVar; } if (mVar2 == null) { k6(); } this.f167378x = mVar; this.f167380y = mVar2; } public boolean Z5(h1 h1Var) { Bundle bundle = new Bundle(); String d15 = c2.d((String) h1Var.f247819a.get("wxbackgroundColor")); if (Util.isNullOrNil(d15)) { d15 = (String) h1Var.f247819a.get("backgroundColor"); } bundle.putString("key_set_bounce_background_color", d15); try { this.f167378x.v6(72, bundle); q5(h1Var, "setBounceBackground:ok", null); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "setBounceBackground, exception = %s", e15); q5(h1Var, "setBounceBackground:fail", null); } return true; } public void Z6(boolean z15, String str) { Log.i("MicroMsg.MsgHandler", "setIsBusy: %b, function:%s", Boolean.valueOf(z15), str); this.f167375u = z15; } public final boolean a6(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { if (!com.tencent.mm.plugin.webview.stub.a.a(this.f167360d)) { Log.w("MicroMsg.MsgHandler", "Tencent QQ hasn't installed at all."); q5(h1Var, "shareQQ:fail", null); return true; } if (this.f167362f == null) { this.f167362f = w5(h1Var, false); } String str = (String) h1Var.f247819a.get("img_url"); String str2 = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String str3 = (String) h1Var.f247819a.get("desc"); String string = hy3.h.a(this.f167360d).getString(R.string.f367547wp); String str4 = (String) h1Var.f247819a.get("link"); try { if (Util.isNullOrNil(str4)) { str4 = this.f167378x.getCurrentUrl(); } } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "Get current url fail. exception : %s", e15.getMessage()); } String C6 = C6(str4); if (Util.isNullOrNil(str2)) { str2 = hy3.h.a(this.f167360d).getString(R.string.l6g); } if (Util.isNullOrNil(C6) || Util.isNullOrNil(str2)) { Log.w("MicroMsg.MsgHandler", "url(%s) or title(%s) or description(%s) is null or nil.", C6, str2, str3); q5(h1Var, "shareQQ:fail", null); return true; } HashMap hashMap = new HashMap(); hashMap.put("image_url", c2.c(str, 2)); hashMap.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, c2.c(str2, 2)); hashMap.put("description", c2.c(str3, 2)); hashMap.put("url", c2.c(C6, 2)); hashMap.put("app_name", c2.c(string, 2)); hashMap.put("req_type", c2.c(String.valueOf(1), 2)); if (h1Var.f247863i.equalsIgnoreCase("shareQZone")) { hashMap.put("cflag", c2.c(String.valueOf(1), 2)); } Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("mqqapi://share/to_fri?file_type=news&share_id=1103188687" + "&" + c2.b(hashMap))); intent.putExtra("pkg_name", "com.tencent.mm"); intent.getStringExtra("pkg_name"); intent.setFlags(268435456); int i15 = "shareQQ".equals(h1Var.f247863i) ? 5 : 6; this.E.a(i15, (String) h1Var.f247819a.get("use_update_jsapi_data")); if (!Util.isIntentAvailable(this.f167360d, intent, true) || !(this.f167360d instanceof Activity)) { k7(i15, 2); q5(h1Var, h1Var.f247863i + ":fail", null); } else { try { k7(i15, 1); Context context = this.f167360d; Activity activity = (Activity) context; k30.a aVar = new k30.a(); ThreadLocal<k30.a> threadLocal = k30.c.f244265a; aVar.c(44); aVar.c(intent); j30.a.j((Activity) context, aVar.b(), "com/tencent/mm/plugin/webview/ui/tools/jsapi/MsgHandler", "doShareQQ", "(Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;Lcom/tencent/mm/protocal/JsapiPermissionWrapper;)Z", "android/app/Activity", "startActivityForResult", "(Landroid/content/Intent;I)V"); q5(h1Var, h1Var.f247863i + ":ok", null); } catch (Exception e16) { Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "", new Object[0]); k7(i15, 2); q5(h1Var, h1Var.f247863i + ":fail", null); } } return true; } public final boolean a7(JsapiPermissionWrapper jsapiPermissionWrapper, h1 h1Var) { String str; Object obj = h1Var.f247819a.get("__jsapi_fw_ext_info"); String str2 = (String) h1Var.f247819a.get("link"); if (obj instanceof Bundle) { str = ((Bundle) obj).getString("__jsapi_fw_ext_info_key_current_url"); } else { str = null; } return b7(str2, str); } public boolean b6(h1 h1Var) { this.f167375u = false; try { Bundle v65 = this.f167378x.v6(79, new Bundle()); HashMap hashMap = new HashMap(); int i15 = v65.getInt("height", 0); if (i15 > 0) { hashMap.put("height", Integer.valueOf(gy3.a.c(MMApplicationContext.getContext(), i15))); p5(this.f167378x, h1Var, "showSmileyPanel:ok", hashMap, true, false, true); } else { p5(this.f167378x, h1Var, "showSmileyPanel:fail", null, true, false, true); } } catch (Exception e15) { Log.i("MicroMsg.MsgHandler", "doShowSmileyPanel, exception = %s", e15); p5(this.f167378x, h1Var, "showSmileyPanel:fail", null, true, false, true); } return true; } public final boolean b7(String str, String str2) { List<String> list; boolean z15; c.d d15 = this.f167382z.d(str2); if (d15 == null) { d15 = this.f167382z.d(r6()); } if (TextUtils.isEmpty(str) || d15 == null || (list = d15.f167603b) == null || ((LinkedList) list).size() <= 0) { return false; } LinkedList<String> linkedList = new LinkedList(); int indexOf = str.indexOf("://"); String substring = str.substring(indexOf + (indexOf == -1 ? 1 : 3)); Iterator<String> it = d15.f167603b.iterator(); while (true) { if (!it.hasNext()) { z15 = true; break; } String next = it.next(); Log.i("MicroMsg.MsgHandler", "now domain : %s", next); if (!TextUtils.isEmpty(next)) { int indexOf2 = next.indexOf("://"); String substring2 = next.substring(indexOf2 + (indexOf2 == -1 ? 1 : 3)); if (substring2.contains("/")) { if (substring.equals(substring2)) { break; } if (!substring2.endsWith("/")) { substring2 = substring2 + "/"; } if (substring.startsWith(substring2)) { break; } } else { linkedList.add(substring2); } } } z15 = false; if (z15 && !linkedList.isEmpty()) { URI create = URI.create(str); String host = create.getHost(); int port = create.getPort(); String str3 = host + ":" + port; Log.i("MicroMsg.MsgHandler", "share domain : %s", host); if (!Util.isNullOrNil(host)) { for (String str4 : linkedList) { if (host.equals(str4)) { return false; } if (host.endsWith("." + str4)) { return false; } if (port != -1) { if (str3.equals(str4)) { return false; } if (str3.endsWith("." + str4)) { return false; } } } } } return z15; } public boolean c6(h1 h1Var) { try { this.f167378x.v6(35, Bundle.EMPTY); q5(h1Var, "startPullDownRefresh:ok", null); } catch (Exception e15) { Log.i("MicroMsg.MsgHandler", "doStartPullDownRefresh, exception = %s", e15); q5(h1Var, "startPullDownRefresh:fail", null); } return true; } public final void c7(h1 h1Var, int i15, int i16) { String str = h1Var.f247863i; if (str.equals("requireSoterBiometricAuthentication") || str.equals("getSupportSoter")) { na3.r.INSTANCE.a(str, o6(s6()), i15, i16); } } public final boolean d6(h1 h1Var) { if (G6()) { try { this.f167378x.callback(2007, null); } catch (Exception unused) { Log.e("MicroMsg.MsgHandler", "callback start record failed"); } q5(h1Var, "startRecord:fail_recording", null); return true; } String str = (String) ((HashMap) h1Var.f247819a).get("appId"); if (Util.isNullOrNil(str)) { Log.e("MicroMsg.MsgHandler", "appId is null or nil."); q5(h1Var, "startRecord:fail_missing arguments", null); return true; } o1.a(h1Var.f247862h, false, null, str); if (!((xw.d) j.c(xw.d.class)).lo0(this.f167360d, "android.permission.RECORD_AUDIO")) { WebViewStubTempUI.T7(this.f167360d, this.f167378x, new String[]{"android.permission.RECORD_AUDIO"}, 116, this.A); return true; } HashMap<String, List<String>> hashMap = k2.f165621a; String str2 = "_USER_FOR_WEBVIEW_JSAPI" + nf0.t0.a(str, Util.nowMilliSecond()); WebViewJSSDKVoiceItem webViewJSSDKVoiceItem = new WebViewJSSDKVoiceItem(); webViewJSSDKVoiceItem.f165433j = str2; String th5 = ((qn.t) j.c(qn.t.class)).th(webViewJSSDKVoiceItem.f165433j); webViewJSSDKVoiceItem.f165430g = th5; webViewJSSDKVoiceItem.f165428e = j2.a(th5); long nowMilliSecond = Util.nowMilliSecond(); String str3 = webViewJSSDKVoiceItem.f165428e; webViewJSSDKVoiceItem.f165432i = com.tencent.mm.modelcdntran.w.b("jsupvoice", nowMilliSecond, str3, str3); webViewJSSDKVoiceItem.f165427d = str; com.tencent.mm.plugin.webview.modeltools.m.aO0().a(webViewJSSDKVoiceItem); Log.i("MicroMsg.MsgHandler", "start record appId : %s, voice file name : %s, voice file path : %s", str, str2, webViewJSSDKVoiceItem.f165430g); this.X = webViewJSSDKVoiceItem.f165428e; MMHandlerThread.postToMainThread(new MsgHandler$$m0(this, webViewJSSDKVoiceItem, h1Var)); try { this.f167378x.callback(2007, null); } catch (Exception unused2) { Log.e("MicroMsg.MsgHandler", "callback start record failed"); } q5(h1Var, "startRecord:ok", null); return true; } public final String d7(String str) { if (str.startsWith(HttpWrapperBase.PROTOCAL_HTTP)) { return str.substring(7); } if (str.startsWith(HttpWrapperBase.PROTOCAL_HTTPS)) { return str.substring(8); } return str; } public boolean e6(h1 h1Var) { try { this.f167378x.v6(36, Bundle.EMPTY); q5(h1Var, "stopPullDownRefresh:ok", null); } catch (Exception e15) { Log.i("MicroMsg.MsgHandler", "doStopPullDownRefresh, exception = %s", e15); q5(h1Var, "stopPullDownRefresh:fail", null); } return true; } public final MsgHandler$$q0 e7(int i15) { return (MsgHandler$$q0) ((HashMap) this.Z).get(Integer.valueOf(i15)); } public boolean f6(h1 h1Var) { Log.i("MicroMsg.MsgHandler", "doSwitchWalletCurrency call"); ((MMActivity) this.f167360d).mmSetOnActivityResultCallback(this); sv3.b.n(this.f167360d, "wallet_core", ".ui.WalletSwitchWalletCurrencyUI", null, 211); return true; } public final void f7(String str) { Bundle bundle; if (this.f167367n == null) { this.f167367n = new Bundle(); } int i15 = Util.getInt(str, 33); if (this.f167367n.getBoolean("KFromBizSearch") && (bundle = this.f167367n.getBundle("KBizSearchExtArgs")) != null) { i15 = bundle.getInt("Contact_Scene"); } if (this.f167367n.getInt("Contact_Scene", -1) < 0) { this.f167367n.putInt("Contact_Scene", i15); } } public boolean g6(h1 h1Var) { q5(h1Var, "uploadIdCardSuccess:ok", null); Log.i("MicroMsg.MsgHandler", "uploadIdCardSuccess"); WalletRealNameResultNotifyMoreEvent walletRealNameResultNotifyMoreEvent = new WalletRealNameResultNotifyMoreEvent(); walletRealNameResultNotifyMoreEvent.f65177d.f65178a = -1; walletRealNameResultNotifyMoreEvent.publish(); ((qv3.c) j.c(qv3.c.class)).notifyUploadCardSuccess(); return true; } public final void g7(h1 h1Var, String str, String str2, int i15, int i16, int i17, String str3, boolean z15) { String str4; MsgHandler$$f0 msgHandler$$f0 = new MsgHandler$$f0(this, str3, str2, h1Var); WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str2); if (b15 == null) { q5(h1Var, str3 + ":fail", null); return; } int i18 = !b15.f165440t ? 1 : 0; PString pString = new PString(); PInt pInt = new PInt(); PInt pInt2 = new PInt(); com.tencent.mm.plugin.webview.modeltools.m.aO0(); String str5 = b15.f165430g; String mD5String = MD5Util.getMD5String(str5); StringBuilder sb5 = new StringBuilder(); sb5.append(d60.z.s().f198643d + "jsapi_temp/"); sb5.append(mD5String); String sb6 = sb5.toString(); long d15 = u1.d(str5, sb6, false); if (d15 < 0) { Log.e("MicroMsg.WebViewJSSDKFileItemManager", "copyFile src: %s, target: %s, ret: %s", str5, sb6, Long.valueOf(d15)); } long KO = ((com.tencent.mm.modelimage.w) ((yt.j) j.c(yt.j.class)).ol()).KO("", b15.f165430g, i18, 0, 0, pString, pInt, pInt2); com.tencent.mm.modelimage.u jq4 = ((com.tencent.mm.modelimage.w) ((yt.j) j.c(yt.j.class)).ol()).jq(Long.valueOf(KO)); String Xv = ((com.tencent.mm.modelimage.w) ((yt.j) j.c(yt.j.class)).ol()).Xv(jq4.f79181e, "", "", true); b15.f165430g = Xv; Log.i("MicroMsg.MsgHandler", "Image Inserted, newPath: %s, origPath: %s, compressType: %s", Xv, sb6, Integer.valueOf(i18)); boolean c15 = com.tencent.mm.plugin.webview.modeltools.m.cO0().c(str, str2, i15, i16, i17, msgHandler$$f0); Log.i("MicroMsg.MsgHandler", str3 + ", add cdn upload task result : %b", Boolean.valueOf(c15)); if (!c15) { q5(h1Var, str3 + ":fail", null); str4 = sb6; } else if (z15) { Context context = this.f167360d; str4 = sb6; this.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(this.f167360d).getString(R.string.lbc), true, true, new MsgHandler$$g0(this, msgHandler$$f0, str2, h1Var, str3)); } else { str4 = sb6; Context context2 = this.f167360d; if (context2 instanceof Activity) { ((Activity) context2).finish(); this.f167378x = this.f167380y; } } b15.f165430g = str4; } public boolean h6(h1 h1Var) { String str; Log.i("MicroMsg.MsgHandler", "doWCPayRealnameVerify call"); WalletJsapiData walletJsapiData = new WalletJsapiData(h1Var.f247819a); Intent intent = new Intent(); try { str = this.f167378x.getCurrentUrl(); } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); str = null; } if (!Util.isNullOrNil(str)) { intent.putExtra("appId", this.f167382z.c(str)); intent.putExtra("timeStamp", walletJsapiData.f173490h); intent.putExtra("nonceStr", walletJsapiData.f173489g); intent.putExtra("packageExt", walletJsapiData.f173491i); intent.putExtra("signtype", walletJsapiData.f173488f); intent.putExtra("paySignature", walletJsapiData.f173495p); try { intent.putExtra("url", this.f167378x.getCurrentUrl()); } catch (RemoteException e16) { Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "", new Object[0]); } intent.setFlags(536870912); intent.putExtra("pay_channel", walletJsapiData.f173501v); intent.putExtra("realname_scene", 1); ((MMActivity) this.f167360d).mmSetOnActivityResultCallback(this); sv3.b.n(this.f167360d, "wallet_core", ".id_verify.WalletRealNameProcessProxyUI", intent, 34); } return true; } public final void h7(h1 h1Var, String str, String str2, int i15, int i16, int i17, String str3, boolean z15) { WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(str2); if (b15 == null || Util.isNullOrNil(b15.f165430g) || !u1.k(b15.f165430g)) { q5(h1Var, str3 + ":fail_file not exist", null); } else if (!com.tencent.mm.network.m0.a(this.f167360d)) { String sizeMB = Util.getSizeMB(u1.l(b15.f165430g)); Context context = this.f167360d; i14.j.H(context, hy3.h.a(context).getString(R.string.l6k, sizeMB), hy3.h.a(this.f167360d).getString(R.string.f367625yv), false, new MsgHandler$$h0(this, h1Var, str, str2, i15, i16, i17, str3, z15), new MsgHandler$$i0(this, h1Var, str3)); } else { i7(h1Var, str, str2, i15, i16, i17, str3, z15); } } public final boolean i6(h1 h1Var, String str, long j15) { JSONObject jSONObject = new JSONObject((String) h1Var.f247819a.get("data")); String optString = jSONObject.optString("link"); String optString2 = jSONObject.optString(FFmpegMetadataRetriever.METADATA_KEY_TITLE); String optString3 = jSONObject.optString("desc"); String optString4 = jSONObject.optString("imgUrl"); if (Util.isNullOrNil(optString2) && Util.isNullOrNil(optString3)) { q5(h1Var, "sendEnterpriseChat:fail_params error", null); return true; } else if (Util.isNullOrNil(optString)) { q5(h1Var, "sendEnterpriseChat:fail_params error", null); return true; } else { WXWebpageObject wXWebpageObject = new WXWebpageObject(); wXWebpageObject.webpageUrl = optString; WXMediaMessage wXMediaMessage = new WXMediaMessage(); this.f167362f = wXMediaMessage; wXMediaMessage.mediaObject = wXWebpageObject; wXMediaMessage.title = optString2; wXMediaMessage.description = optString3; String str2 = (String) h1Var.f247819a.get("appid"); if (this.f167367n != null && TextUtils.isEmpty(str2)) { str2 = this.f167367n.getString("jsapi_args_appid"); } com.tencent.mm.pluginsdk.model.app.j appInfo = ((ln.l) j.c(ln.l.class)).getAppInfo(str2); Context context = this.f167360d; if (context == null || context.getResources() == null) { Log.e("MicroMsg.MsgHandler", "showSendAppMsgDialog fail, context or context.getResources() is null"); q5(h1Var, "sendEnterpriseChat:fail", null); return true; } Context context2 = this.f167360d; if (!(context2 instanceof Activity)) { Log.e("MicroMsg.MsgHandler", "showsSendAppMsgDialog fail, context is not activity"); q5(h1Var, "sendEnterpriseChat:fail", null); return true; } g1.a.f203493a.yr0(((MMActivity) context2).getController(), optString2, optString4, optString3, null, true, hy3.h.a(this.f167360d).getString(R.string.f367604ya), new MsgHandler$$n0(this, optString4, j15, appInfo, str2, str, h1Var)); return true; } } public final void i7(h1 h1Var, String str, String str2, int i15, int i16, int i17, String str3, boolean z15) { MsgHandler$$j0 msgHandler$$j0 = new MsgHandler$$j0(this, str3, str2, h1Var); boolean c15 = com.tencent.mm.plugin.webview.modeltools.m.cO0().c(str, str2, i15, i16, i17, msgHandler$$j0); Log.i("MicroMsg.MsgHandler", str3 + ", add cdn upload task result : %b", Boolean.valueOf(c15)); if (!c15) { q5(h1Var, str3 + ":fail", null); return; } MsgHandler$$p0 msgHandler$$p0 = new MsgHandler$$p0(); msgHandler$$p0.f167481a = h1Var; msgHandler$$p0.f167482b = msgHandler$$j0; ((HashMap) this.W).put(str2, msgHandler$$p0); Bundle bundle = new Bundle(); bundle.putString("close_window_confirm_dialog_switch", "true"); bundle.putString("close_window_confirm_dialog_title_cn", hy3.h.a(this.f167360d).getString(R.string.l6l)); bundle.putString("close_window_confirm_dialog_title_eng", hy3.h.a(this.f167360d).getString(R.string.l6l)); bundle.putString("close_window_confirm_dialog_ok_cn", hy3.h.a(this.f167360d).getString(R.string.l6i)); bundle.putString("close_window_confirm_dialog_ok_eng", hy3.h.a(this.f167360d).getString(R.string.l6i)); bundle.putString("close_window_confirm_dialog_cancel_cn", hy3.h.a(this.f167360d).getString(R.string.l6j)); bundle.putString("close_window_confirm_dialog_cancel_eng", hy3.h.a(this.f167360d).getString(R.string.l6j)); try { this.f167378x.callback(13, bundle); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "doSetCloseWindowConfirmDialogInfo invoke callback failed : %s", e15.getMessage()); } if (z15) { Context context = this.f167360d; p64.i0 Q2 = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(this.f167360d).getString(R.string.lbc), true, true, new MsgHandler$$k0(this, msgHandler$$j0, str2, h1Var, str3)); this.f167363g = Q2; Q2.setOnKeyListener(new MsgHandler$$l0(this)); return; } Context context2 = this.f167360d; if (context2 instanceof Activity) { ((Activity) context2).finish(); this.f167378x = this.f167380y; } } public final boolean j6(h1 h1Var, String str, long j15) { boolean publish; String optString = new JSONObject((String) h1Var.f247819a.get("data")).optString("content"); if (Util.isNullOrNil(optString)) { q5(h1Var, "sendEnterpriseChat:fail_params error", null); return true; } cg0.c c05 = bg0.w0.bO0().c0(j15); synchronized (cg0.e.f49354d) { String j16 = cg0.e.j(); cg0.e.k(c05); SendMsgEvent sendMsgEvent = new SendMsgEvent(); SendMsgEvent.a aVar = sendMsgEvent.f64446d; aVar.f64447a = str; aVar.f64448b = optString; aVar.f64449c = w0.z(str); sendMsgEvent.f64446d.f64450d = 0; publish = sendMsgEvent.publish(); cg0.e.c(j16); } if (!publish) { q5(h1Var, "sendEnterpriseChat:fail", null); return true; } q5(h1Var, "sendEnterpriseChat:ok", null); Context context = this.f167360d; if (context != null) { i14.j.T(context, hy3.h.a(context).getString(R.string.f367612yi)); } return true; } public final void j7(Intent intent) { try { Bundle v65 = this.f167378x.v6(18, null); if (v65 != null) { String string = v65.getString("preChatName"); String string2 = v65.getString("preUsername"); int i15 = v65.getInt("preChatTYPE", 0); intent.putExtra("preChatName", string); intent.putExtra("preUsername", string2); intent.putExtra("preChatTYPE", i15); intent.putExtra("preChatTYPE", i15); intent.putExtra("url", v65.getString("url")); intent.putExtra("rawUrl", v65.getString("rawUrl")); } } catch (RemoteException e15) { Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); } catch (Exception e16) { Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "", new Object[0]); } com.tencent.mm.plugin.webview.ui.tools.v.e(intent.getExtras(), Scopes.PROFILE, ".ui.ContactInfoUI", this.f167378x, new MsgHandler$$i(this, intent)); } public void k6() { h1 h1Var; MsgHandler$$q0 e75; if (this.f167380y != null && (h1Var = this.f167361e) != null && (e75 = e7(h1Var.hashCode())) != null) { e75.f167494b = this.f167380y; Log.i("MicroMsg.MsgHandler", "blockMsg use persistentCallbacker fun = %s", this.f167361e.f247863i); } } /* JADX WARNING: Removed duplicated region for block: B:21:0x0065 A[RETURN] */ /* JADX WARNING: Removed duplicated region for block: B:22:0x0066 */ public void k7(int i15, int i16) { String str; String str2; String str3; WXMediaMessage wXMediaMessage; Exception e15; String str4; String str5 = ""; String str6 = " "; try { m mVar = this.f167378x; Bundle bundle = null; if (mVar != null) { bundle = mVar.v6(77, null); } if (bundle != null) { str = bundle.getString("KUrl"); try { if (TextUtils.isEmpty(str)) { Log.e("MicroMsg.MsgHandler", "url is empty"); return; } str6 = Util.nullAsNil(bundle.getString("KSessionId")); Log.i("MicroMsg.MsgHandler", "sessionId %s", str6); str4 = bundle.getString("geta8key_username"); } catch (Exception e16) { e15 = e16; Log.e("MicroMsg.MsgHandler", "get sessionId error, %s", e15); str2 = str6; str3 = str5; String nullAsNil = Util.nullAsNil(o6(str)); wXMediaMessage = this.f167362f; if (wXMediaMessage != null) { } } } else { str4 = str5; str = str4; } str2 = str6; str3 = str4; } catch (Exception e17) { e15 = e17; str = str5; Log.e("MicroMsg.MsgHandler", "get sessionId error, %s", e15); str2 = str6; str3 = str5; String nullAsNil2 = Util.nullAsNil(o6(str)); wXMediaMessage = this.f167362f; if (wXMediaMessage != null) { } } String nullAsNil22 = Util.nullAsNil(o6(str)); wXMediaMessage = this.f167362f; if (wXMediaMessage != null) { int type = wXMediaMessage.mediaObject.type(); int i17 = this.E.f165886c.remove(Integer.valueOf(i15)) ? 2 : 1; Log.i("MicroMsg.MsgHandler", "appId %s, type %d,publisher %s, opType %d", nullAsNil22, Integer.valueOf(type), str3, Integer.valueOf(i17)); if (type == 5) { long nowSecond = Util.nowSecond(); try { str5 = URLEncoder.encode(Util.nullAsNil(str), "UTF-8"); } catch (UnsupportedEncodingException e18) { Log.printErrStackTrace("MicroMsg.MsgHandler", e18, str5, new Object[0]); } q.INSTANCE.g(13377, Long.valueOf(nowSecond), nullAsNil22, str5, str2, Integer.valueOf(i15), Integer.valueOf(i16), Integer.valueOf(i17), str3); } } } public final int l6() { Bundle v65; try { m mVar = this.f167378x; if (mVar == null || (v65 = mVar.v6(99, null)) == null) { return 0; } return v65.getInt("geta8key_scene"); } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "invokeAsResult error.%s", e15); return 0; } } public byte[] l7() { int i15; try { String a15 = ck.b.a(this.f167360d); Log.i("MicroMsg.MsgHandler", "xml %s", a15); v95 v95 = new v95(); xv3.b a16 = xv3.b.a(vj.r.i().getBytes()); a16.d(16); v95.f39646d = a16; Log.i("MicroMsg.MsgHandler", Util.encodeHexString(a16.f341419a)); v95.f39647e = a15; SharedPreferences a17 = s3.a(); byte[] decodeHexString = Util.decodeHexString(a17.getString("_auth_key", "")); int i16 = a17.getInt("_auth_uin", 0); Log.i("MicroMsg.MsgHandler", "cpan aak string:%s md5:%s uin:%d", Util.encodeHexString(decodeHexString), gh.g.f(decodeHexString), Integer.valueOf(i16)); Object[] objArr = new Object[1]; if (decodeHexString == null) { i15 = -1; } else { i15 = decodeHexString.length; } objArr[0] = Integer.valueOf(i15); Log.i("MicroMsg.MsgHandler", "aat len:%d", objArr); v95.f39648f = xv3.b.a(decodeHexString); v95.f39649g = i16; yv3.c1 d15 = yv3.c1.d(); byte[] byteArray = v95.toByteArray(); PByteArray pByteArray = new PByteArray(); if (MMProtocalJni.rsaPublicEncrypt(byteArray, pByteArray, d15.f349167a.getBytes(), d15.f349168b.getBytes())) { byteArray = pByteArray.value; } Util.encodeHexString(byteArray); w95 w95 = new w95(); w95.f40818e = d15.f349169c; w95.f40817d = yv3.d.f349176g; w95.f40819f = vj.n.f327064a; w95.f40820g = xv3.b.a(byteArray); Log.i("MicroMsg.MsgHandler", "getdevice done"); return w95.toByteArray(); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "report error"); Log.printErrStackTrace("MicroMsg.MsgHandler", e15, "", new Object[0]); return null; } } public final int m6() { Bundle v65; try { m mVar = this.f167378x; if (mVar == null || (v65 = mVar.v6(1020, null)) == null) { return 0; } return v65.getInt("key_get_a8key_req_params_req_id"); } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "invokeAsResult error.%s", e15); return 0; } } /* JADX DEBUG: Multi-variable search result rejected for r25v0, resolved type: com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler */ /* JADX WARN: Multi-variable type inference failed */ @Override // com.tencent.mm.ui.MMActivity.d public void mmOnActivityResult(int i15, int i16, Intent intent) { int i17; Map map; JSONArray jSONArray; String str; SnsAdClick snsAdClick; Map map2; m mVar; Map map3; RemoteException e15; HashMap hashMap; char c15; boolean z15; int i18; int i19; SnsAdClick snsAdClick2; String str2; Log.i("MicroMsg.MsgHandler", "mmOnActivityResult, requestCode = " + i15 + ", resultCode = " + i16); if (i15 == 1) { if (this.f167362f == null) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult fail, appmsg is null"); k7(1, 2); q5(this.f167361e, "send_app_msg:fail", null); return; } String str3 = (String) ((HashMap) this.f167361e.f247819a).get("appid"); Bundle bundle = this.f167367n; if (bundle != null) { snsAdClick2 = (SnsAdClick) bundle.getParcelable("KSnsAdTag"); if (TextUtils.isEmpty(str3)) { str3 = this.f167367n.getString("jsapi_args_appid"); } } else { snsAdClick2 = null; } Object obj = ((HashMap) this.f167361e.c()).get("Internal@AsyncReport"); String str4 = (String) ((HashMap) this.f167361e.f247819a).get("link"); if (i16 == -1) { if (snsAdClick2 != null) { snsAdClick2.f79448g = 7; U6(snsAdClick2); } com.tencent.mm.pluginsdk.model.app.j appInfo = ((ln.l) j.c(ln.l.class)).getAppInfo(str3); String stringExtra = intent == null ? null : intent.getStringExtra("Select_Conv_User"); if (stringExtra == null || stringExtra.length() == 0) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult fail, toUser is null"); k7(1, 2); q5(this.f167361e, "send_app_msg:fail", null); return; } String str5 = (String) ((HashMap) this.f167361e.f247819a).get("img_url"); String str6 = (String) ((HashMap) this.f167361e.f247819a).get("desc"); String str7 = (String) ((HashMap) this.f167361e.f247819a).get("src_username"); String str8 = (String) ((HashMap) this.f167361e.f247819a).get("src_displayname"); String t65 = t6(); o1.a(this.f167361e.c(), u6("sendAppMessage"), stringExtra, str3); if (obj != null && (obj instanceof Boolean) && ((Boolean) obj).booleanValue()) { T6(this.f167361e, true); } int i25 = 0; int i26 = 0; for (String str9 : stringExtra.split(",")) { if (str9.endsWith("@chatroom")) { i25++; } else { i26++; } } HashMap hashMap2 = new HashMap(); if (((HashMap) this.f167361e.f247819a).get("share_callback_with_scene") != null && ((Boolean) ((HashMap) this.f167361e.f247819a).get("share_callback_with_scene")).booleanValue()) { hashMap2.put("groupCount", Integer.valueOf(i25)); hashMap2.put("singleCount", Integer.valueOf(i26)); } if (Util.isNullOrNil(t65)) { if (intent == null) { str2 = null; } else { str2 = intent.getStringExtra("custom_send_text"); } if (Util.isNullOrNil(str3)) { str3 = ""; } Y5(null, str3, stringExtra, str5, str7, str8, str2, t65); Context context = this.f167360d; if (context != null) { i14.j.T(context, hy3.h.a(context).getString(R.string.f367612yi)); } k7(1, 1); q5(this.f167361e, "send_app_msg:ok", hashMap2); } else if (Util.isNullOrNil(str5)) { Y5(null, "", stringExtra, str5, str7, str8, null, t65); Context context2 = this.f167360d; i14.j.T(context2, hy3.h.a(context2).getString(R.string.f367601y7)); q5(this.f167361e, "send_app_msg:ok", hashMap2); } else { Context context3 = this.f167360d; ((yt.h) j.c(yt.h.class)).JA(str5, new MsgHandler$$k(this, i14.j.Q(context3, "", context3.getResources().getString(R.string.f367605yb), true, true, new MsgHandler$$j(this, str5)), appInfo, str3, stringExtra, str5, str7, str8, t65, hashMap2)); } } else if (i16 == 0) { if (snsAdClick2 != null) { snsAdClick2.f79448g = 8; U6(snsAdClick2); } o1.a(this.f167361e.c(), u6("sendAppMessage"), null, str3); if (obj != null && (obj instanceof Boolean) && ((Boolean) obj).booleanValue()) { T6(this.f167361e, true); } k7(1, 3); q5(this.f167361e, "send_app_msg:ok", null); } } else if (i15 == 2) { if (i16 == -1) { Context context4 = this.f167360d; i14.j.T(context4, hy3.h.a(context4).getString(R.string.f367612yi)); q5(this.f167361e, "share_weibo:ok", null); } else if (i16 == 0) { q5(this.f167361e, "share_weibo:cancel", null); } else if (i16 != 1) { q5(this.f167361e, "share_weibo:fail_" + intent.getIntExtra("err_code", 0), null); Log.e("MicroMsg.MsgHandler", "unknown resultCode"); } else { q5(this.f167361e, "share_weibo:fail_" + intent.getIntExtra("err_code", 0), null); } } else if (i15 == 3) { Log.i("MicroMsg.MsgHandler", "get callback address, result code = %d", Integer.valueOf(i16)); if (i16 == -1 && intent != null) { String nullAs = Util.nullAs(intent.getStringExtra("nationalCode"), ""); String nullAs2 = Util.nullAs(intent.getStringExtra("userName"), ""); String nullAs3 = Util.nullAs(intent.getStringExtra("telNumber"), ""); String nullAs4 = Util.nullAs(intent.getStringExtra("addressPostalCode"), ""); String nullAs5 = Util.nullAs(intent.getStringExtra("proviceFirstStageName"), ""); String nullAs6 = Util.nullAs(intent.getStringExtra("addressCitySecondStageName"), ""); String nullAs7 = Util.nullAs(intent.getStringExtra("addressCountiesThirdStageName"), ""); String nullAs8 = Util.nullAs(intent.getStringExtra("addressCountiesFourStageName"), ""); String nullAs9 = Util.nullAs(intent.getStringExtra("addressDetailInfo"), ""); String format = (TextUtils.isEmpty(nullAs8) || nullAs9.startsWith(nullAs8)) ? nullAs9 : String.format("%s%s", nullAs8, nullAs9); Log.i("MicroMsg.MsgHandler", "first = " + nullAs5 + " ; detail =" + nullAs9 + "; second = " + nullAs6 + " ; tel = " + nullAs3 + "; third = " + nullAs7 + "; fourth = " + nullAs8 + "; fullDetail = " + format); if (!Util.isNullOrNil(nullAs2)) { HashMap hashMap3 = new HashMap(); hashMap3.put("nationalCode", (nullAs == null || nullAs.length() <= 6) ? nullAs : nullAs.substring(0, 6)); hashMap3.put("nationalCodeFull", nullAs); hashMap3.put("userName", nullAs2); hashMap3.put("telNumber", nullAs3); hashMap3.put("addressPostalCode", nullAs4); hashMap3.put("proviceFirstStageName", nullAs5); hashMap3.put("addressCitySecondStageName", nullAs6); hashMap3.put("addressCountiesThirdStageName", nullAs7); hashMap3.put("addressStreetFourthStageName", nullAs8); hashMap3.put("addressDetailInfo", format); hashMap3.put("addressDetailInfoNew", nullAs9); new c.a(1, n6(), "editAddress", "", 1).h(); q5(this.f167361e, "edit_address:ok", hashMap3); return; } } if (i16 == 0) { q5(this.f167361e, "edit_address:cancel", null); } else { q5(this.f167361e, "edit_address:fail", null); } } else if (i15 == 4) { Log.i("MicroMsg.MsgHandler", "request pay, resultCode = " + i16); int i27 = this.K; if (!(i27 == -1 || e7(i27) == null)) { this.f167361e = e7(this.K).f167493a; this.f167378x = e7(this.K).f167494b; } this.K = -1; h1 h1Var = this.f167361e; if (h1Var == null || !Util.isEqual("getBrandWCPayRequest", h1Var.f247863i)) { Log.i("MicroMsg.MsgHandler", "request pay, wrong function"); } else if (i16 == -1) { HashMap hashMap4 = new HashMap(); if (intent != null) { int intExtra = intent.getIntExtra("key_is_clear_failure", -1); if (intExtra == 0) { hashMap4.put("pay_status", "pending"); } else if (intExtra == 1) { hashMap4.put("pay_status", "fail"); } m mVar2 = this.f167378x; q5(this.f167361e, "get_brand_wcpay_request:ok", hashMap4); int intExtra2 = intent.getIntExtra("key_jsapi_close_page_after_pay", 0); Log.i("MicroMsg.MsgHandler", "closePage: %s", Integer.valueOf(intExtra2)); if (intExtra2 == 1) { try { Context context5 = this.f167360d; if (context5 != null && (context5 instanceof Activity)) { ((Activity) context5).finish(); } if (mVar2 != null) { mVar2.Va0(); mVar2.d(null); } } catch (Exception e16) { Log.printErrStackTrace("MicroMsg.MsgHandler", e16, "", new Object[0]); } ((xc4.j) xc4.j.f338034d).i(new MsgHandler$$l(this), 1000); return; } return; } q5(this.f167361e, "get_brand_wcpay_request:ok", hashMap4); } else if (i16 == 5) { HashMap hashMap5 = new HashMap(); if (intent != null) { int intExtra3 = intent.getIntExtra("key_jsapi_pay_err_code", 0); String nullAsNil = Util.nullAsNil(intent.getStringExtra("key_jsapi_pay_err_msg")); hashMap5.put("err_code", Integer.valueOf(intExtra3)); hashMap5.put("err_desc", nullAsNil); Log.e("MicroMsg.MsgHandler", "hy: pay jsapi failed. errCode: %d, errMsg: %s", Integer.valueOf(intExtra3), nullAsNil); } q5(this.f167361e, "get_brand_wcpay_request:fail", hashMap5); } else { HashMap hashMap6 = new HashMap(); if (intent != null) { int intExtra4 = intent.getIntExtra("key_is_clear_failure", -1); if (intExtra4 == 0) { hashMap6.put("pay_status", "pending"); } else if (intExtra4 == 1) { hashMap6.put("pay_status", "fail"); } } q5(this.f167361e, "get_brand_wcpay_request:cancel", hashMap6); } } else if (i15 == 69) { Map<String, Object> a15 = intent != null ? kp3.a.a(intent.getExtras()) : null; if (i16 == -1) { q5(this.f167361e, this.f167361e.f247863i + ":ok", a15); } else if (i16 == 5) { q5(this.f167361e, this.f167361e.f247863i + ":fail", a15); } else if (i16 == 0) { q5(this.f167361e, this.f167361e.f247863i + ":cancel", a15); } } else if (i15 == 68) { Log.i("MicroMsg.MsgHandler", "request joint pay, resultCode = " + i16); int i28 = this.K; if (!(i28 == -1 || e7(i28) == null)) { this.f167361e = e7(this.K).f167493a; this.f167378x = e7(this.K).f167494b; } this.K = -1; h1 h1Var2 = this.f167361e; if (h1Var2 == null || !Util.isEqual(com.tencent.mm.plugin.appbrand.jsapi.pay.h0.NAME, h1Var2.f247863i)) { Log.i("MicroMsg.MsgHandler", "request joint pay, wrong function"); } else if (i16 == -1) { HashMap hashMap7 = new HashMap(); if (intent != null) { int intExtra5 = intent.getIntExtra("key_jsapi_close_page_after_pay", 0); Log.i("MicroMsg.MsgHandler", "closePage: %s", Integer.valueOf(intExtra5)); if (intExtra5 == 1) { try { Context context6 = this.f167360d; if (context6 != null && (context6 instanceof Activity)) { ((Activity) context6).finish(); } m mVar3 = this.f167378x; if (mVar3 != null) { mVar3.Va0(); this.f167378x.d(null); } } catch (Exception e17) { Log.printErrStackTrace("MicroMsg.MsgHandler", e17, "", new Object[0]); } } int intExtra6 = intent.getIntExtra("key_is_clear_failure", -1); if (intExtra6 == 0) { hashMap7.put("pay_status", "pending"); } else if (intExtra6 == 1) { hashMap7.put("pay_status", "fail"); } } q5(this.f167361e, "requestJointPayment:ok", hashMap7); } else if (i16 == 5) { HashMap hashMap8 = new HashMap(); if (intent != null) { int intExtra7 = intent.getIntExtra("key_jsapi_pay_err_code", 0); String nullAsNil2 = Util.nullAsNil(intent.getStringExtra("key_jsapi_pay_err_msg")); hashMap8.put("err_code", Integer.valueOf(intExtra7)); hashMap8.put("err_desc", nullAsNil2); Log.e("MicroMsg.MsgHandler", "hy: pay jsapi failed. errCode: %d, errMsg: %s", Integer.valueOf(intExtra7), nullAsNil2); } q5(this.f167361e, "requestJointPayment:fail", hashMap8); } else { HashMap hashMap9 = new HashMap(); if (intent != null) { int intExtra8 = intent.getIntExtra("key_is_clear_failure", -1); if (intExtra8 == 0) { hashMap9.put("pay_status", "pending"); } else if (intExtra8 == 1) { hashMap9.put("pay_status", "fail"); } } q5(this.f167361e, "requestJointPayment:cancel", hashMap9); } } else if (i15 == 27) { Log.i("MicroMsg.MsgHandler", "request ibg prepay request, resultCode = " + i16); int i29 = this.K; if (i29 != -1) { this.f167361e = e7(i29).f167493a; this.f167378x = e7(this.K).f167494b; this.K = -1; } if (i16 == -1) { if (intent != null && intent.hasExtra("url")) { try { this.f167378x.tC(intent.getStringExtra("url"), intent.hasExtra("view_port_code") ? intent.getStringExtra("view_port_code") : null); } catch (RemoteException e18) { Log.e("MicroMsg.MsgHandler", "loadUrl ex: %s", e18.getMessage()); } q5(this.f167361e, "get_h5_prepay_request:ok", null); } else if (intent == null || !intent.hasExtra("is_from_native")) { q5(this.f167361e, "get_h5_prepay_request:ok", null); } else { HKCashierJSApiPayResultEvent hKCashierJSApiPayResultEvent = new HKCashierJSApiPayResultEvent(); hKCashierJSApiPayResultEvent.f63256d.f63257a = 1; hKCashierJSApiPayResultEvent.publish(); if (hKCashierJSApiPayResultEvent.f63256d.f63258b == 1) { try { this.f167378x.d(new Bundle()); } catch (RemoteException e19) { Log.w("MicroMsg.MsgHandler", "get_h5_prepay_request doCloseWindow, ex = " + e19.getMessage()); } } HashMap hashMap10 = new HashMap(); hashMap10.put("is_from_native", "1"); q5(this.f167361e, "get_h5_prepay_request:ok", hashMap10); } } else if (intent == null || !intent.hasExtra("is_from_native")) { q5(this.f167361e, "get_h5_prepay_request:cancel", null); } else { HashMap hashMap11 = new HashMap(); hashMap11.put("is_from_native", "1"); q5(this.f167361e, "get_h5_prepay_request:cancel", hashMap11); } } else if (i15 == 5) { Log.i("MicroMsg.MsgHandler", "request jump to mall, resultCode = " + i16); if (i16 == -1) { q5(this.f167361e, "jump_wcmall:ok", null); } else { q5(this.f167361e, "jump_wcmall:fail", null); } } else if (i15 == 6) { Log.i("MicroMsg.MsgHandler", "request jump to product view, resultCode = " + i16); if (i16 == -1) { q5(this.f167361e, "open_product_view:ok", null); } else { q5(this.f167361e, "open_product_view:fail", null); } } else if (i15 == 7) { Log.i("MicroMsg.MsgHandler", "request bind card, resultCode = " + i16); if (i16 == -1) { q5(this.f167361e, "get_brand_wcpay_bind_card_request:ok", null); q.INSTANCE.g(14954, qv3.h.b(), "get_brand_wcpay_bind_card_request:ok"); } else { q5(this.f167361e, "get_brand_wcpay_bind_card_request:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "get_brand_wcpay_bind_card_request:fail"); } } if (!qv3.h.c()) { qv3.h.a(); } } else if (i15 == 9) { Log.i("MicroMsg.MsgHandler", "request open wxcredit, resultCode = " + i16); if (i16 == -1) { q5(this.f167361e, "get_wcpay_create_credit_card_request:ok", null); } else { q5(this.f167361e, "get_wcpay_create_credit_card_request:fail", null); } } else if (i15 == 8) { Log.i("MicroMsg.MsgHandler", "request jumpToBizProfile, resultCode = " + i16); if (i16 == -1) { q5(this.f167361e, "jump_to_biz_profile:ok", null); } else if (i16 == 0) { q5(this.f167361e, "jump_to_biz_profile:cancel", null); } else if (i16 == 2 || i16 == 3) { q5(this.f167361e, "jump_to_biz_profile:check_fail", null); } else { q5(this.f167361e, "jump_to_biz_profile:fail", null); Log.e("MicroMsg.MsgHandler", "unknown resultCode"); } } else if (i15 == 10) { if (i16 == 0) { Log.i("MicroMsg.MsgHandler", "open scan product ui back"); q5(this.f167361e, "open_scan_product_view:ok", null); } } else if (i15 == 11) { Log.i("MicroMsg.MsgHandler", "request transfer_money, resultCode = " + i16); if (i16 == -1) { q5(this.f167361e, "get_transfer_money_request:ok", null); WebViewEventReporter.a(wq3.m.FINISH_PAY); q.INSTANCE.g(14954, qv3.h.b(), "get_transfer_money_request:ok"); } else { q5(this.f167361e, "get_transfer_money_request:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "get_transfer_money_request:fail"); } } if (!qv3.h.c()) { qv3.h.a(); } } else if (i15 == 17) { Log.i("MicroMsg.MsgHandler", "request open_wcpay_specific_view, resultCode = " + i16); if (intent != null && "1".equals(intent.getStringExtra("closeWebView"))) { Log.i("MicroMsg.MsgHandler", "close web view"); try { this.f167378x.Va0(); this.f167378x.d(null); } catch (RemoteException e25) { Log.e("MicroMsg.MsgHandler", "REQUEST_OPEN_WCPAY_SPECIFIC_VIEW ex: %s", e25.getMessage()); } } if (i16 == -1) { q5(this.f167361e, "open_wcpay_specific_view:ok", null); q.INSTANCE.g(14954, qv3.h.b(), "open_wcpay_specific_view:ok"); } else { q5(this.f167361e, "open_wcpay_specific_view:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "open_wcpay_specific_view:fail"); } } if (!qv3.h.c()) { qv3.h.a(); } } else if (i15 == 210) { Log.i("MicroMsg.MsgHandler", "request request_wcpay_send_c2c_msg, resultCode = " + i16); if (i16 == -1) { q5(this.f167361e, "get_send_c2c_message_request:ok", null); q.INSTANCE.g(14954, qv3.h.b(), "get_send_c2c_message_request:ok"); } else if (i16 == 0) { q5(this.f167361e, "get_send_c2c_message_request:cancel", null); q.INSTANCE.g(14954, qv3.h.b(), "get_send_c2c_message_request:cancel"); } else { q5(this.f167361e, "get_send_c2c_message_request:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "get_send_c2c_message_request:fail"); } } if (!qv3.h.c()) { qv3.h.a(); } } else if (i15 == 13) { HashMap hashMap12 = new HashMap(); if (i16 == -1) { if (intent != null) { hashMap12.put("choose_card_info", Util.nullAs(intent.getStringExtra("choose_card_info"), "")); } new c.a(1, n6(), "chooseCard", "", 1).h(); q5(this.f167361e, "choose_card:ok", hashMap12); } else if (i16 == 0) { q5(this.f167361e, "choose_card:cancel", hashMap12); } else { q5(this.f167361e, "choose_card:fail", hashMap12); } } else if (i15 == 36) { HashMap hashMap13 = new HashMap(); if (i16 == -1) { if (intent != null) { hashMap13.put("choose_invoice_info", Util.nullAs(intent.getStringExtra("choose_invoice_info"), "")); } new c.a(1, n6(), com.tencent.mm.plugin.appbrand.jsapi.h2.NAME, "", 1).h(); q5(this.f167361e, "choose_invoice:ok", hashMap13); } else if (i16 == 0) { q5(this.f167361e, "choose_invoice:cancel", hashMap13); } else { q5(this.f167361e, "choose_invoice:fail", hashMap13); } } else if (i15 == 16) { HashMap hashMap14 = new HashMap(); if (intent != null) { hashMap14.put("card_list", Util.nullAs(intent.getStringExtra("card_list"), "")); } if (i16 == -1) { q5(this.f167361e, "batch_add_card:ok", hashMap14); return; } if (intent != null) { i18 = 2; i19 = intent.getIntExtra("result_code", 2); } else { i18 = 2; i19 = 2; } if (i19 == i18) { q5(this.f167361e, "batch_add_card:fail", hashMap14); } else { q5(this.f167361e, "batch_add_card:cancel", hashMap14); } } else if (i15 == 23) { if (i16 == -1) { q5(this.f167361e, "batch_view_card:ok", null); } else { q5(this.f167361e, "batch_view_card:fail", null); } } else if (i15 == 15) { h1 h1Var3 = this.f167361e; if (h1Var3 == null || Util.isNullOrNil(h1Var3.f247863i)) { Log.e("MicroMsg.MsgHandler", "msg is null"); return; } Log.i("MicroMsg.MsgHandler", "request to scan qr code, result code = %d, function is %s", Integer.valueOf(i16), this.f167361e.f247863i); if (!this.f167361e.f247863i.equals("scanQRCode")) { return; } if (i16 == -1) { HashMap hashMap15 = new HashMap(); if (intent != null) { String stringExtra2 = intent.getStringExtra("key_scan_result_code_name"); String stringExtra3 = intent.getStringExtra("key_scan_result"); if (!com.tencent.mm.plugin.scanner.z.c(stringExtra2)) { stringExtra3 = stringExtra2 + "," + stringExtra3; } hashMap15.put("resultStr", stringExtra3); } q5(this.f167361e, "scanQRCode:ok", hashMap15); } else if (i16 != 0) { q5(this.f167361e, "scanQRCode:fail", null); } else { q5(this.f167361e, "scanQRCode:cancel", null); } } else if (i15 == 14) { if (intent == null) { z15 = false; c15 = 0; } else { c15 = 0; z15 = intent.getBooleanExtra("key_pick_local_media_show_memory_warning", false); } Object[] objArr = new Object[2]; objArr[c15] = Integer.valueOf(i16); objArr[1] = Boolean.valueOf(z15); Log.i("MicroMsg.MsgHandler", "request to open file chooser, result code = %d, hasShowMemoryWarning = %b", objArr); HashMap hashMap16 = new HashMap(); if (z15) { hashMap16.put("memoryWarning", Boolean.TRUE); } if (i16 == -1) { String stringExtra4 = intent.getStringExtra("key_pick_local_media_local_ids"); Log.i("MicroMsg.MsgHandler", "localIds = %s", stringExtra4); if (Util.isNullOrNil(stringExtra4)) { q5(this.f167361e, "chooseImage:fail", hashMap16); return; } hashMap16.put("localIds", stringExtra4); String stringExtra5 = intent.getStringExtra("key_pick_local_pic_source_type"); if (stringExtra5 != null) { hashMap16.put("sourceType", stringExtra5); } new c.a(1, n6(), JsApiChooseImage.NAME, "", 1).h(); q5(this.f167361e, "chooseImage:ok", hashMap16); } else if (i16 == 0) { q5(this.f167361e, "chooseImage:cancel", hashMap16); } else if (i16 != 1) { q5(this.f167361e, "chooseImage:fail", hashMap16); } else { String stringExtra6 = intent.getStringExtra("key_pick_local_pic_fail_reason"); q5(this.f167361e, !Util.isNullOrNil(stringExtra6) ? "chooseImage:fail, " + stringExtra6 : "chooseImage:fail", hashMap16); } } else if (i15 == 32) { if (i16 == -1) { String stringExtra7 = intent.getStringExtra("key_pick_local_media_local_id"); if (Util.isNullOrNil(stringExtra7)) { q5(this.f167361e, "chooseVideo:fail", null); return; } WebViewJSSDKFileItem b15 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(stringExtra7); if (b15 == null || !(b15 instanceof WebViewJSSDKVideoItem)) { q5(this.f167361e, "chooseVideo:fail", null); return; } WebViewJSSDKVideoItem webViewJSSDKVideoItem = (WebViewJSSDKVideoItem) b15; HashMap hashMap17 = new HashMap(); hashMap17.put(l3.COL_LOCALID, stringExtra7); hashMap17.put("duration", Integer.valueOf(webViewJSSDKVideoItem.f165446w)); hashMap17.put("height", Integer.valueOf(webViewJSSDKVideoItem.f165437q)); hashMap17.put("size", Integer.valueOf(webViewJSSDKVideoItem.f165435o)); hashMap17.put("width", Integer.valueOf(webViewJSSDKVideoItem.f165436p)); new c.a(1, n6(), JsApiChooseImage.NAME, "", 1).h(); q5(this.f167361e, "chooseVideo:ok", hashMap17); } else if (i16 != 0) { q5(this.f167361e, "chooseVideo:fail", null); } else { q5(this.f167361e, "chooseVideo:cancel", null); } } else if (i15 == 45) { if (i16 == -1) { String stringExtra8 = intent.getStringExtra("key_pick_local_media_local_id"); String stringExtra9 = intent.getStringExtra("key_pick_local_media_thumb_local_id"); Log.i("MicroMsg.MsgHandler", "localId:%s", stringExtra8); Log.i("MicroMsg.MsgHandler", "thumbLocalId:%s", stringExtra9); if (Util.isNullOrNil(stringExtra8)) { q5(this.f167361e, "recordVideo:fail", null); return; } WebViewJSSDKFileItem b16 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(stringExtra8); if (b16 == null || !(b16 instanceof WebViewJSSDKVideoItem)) { q5(this.f167361e, "recordVideo:fail", null); return; } WebViewJSSDKVideoItem webViewJSSDKVideoItem2 = (WebViewJSSDKVideoItem) b16; HashMap hashMap18 = new HashMap(); hashMap18.put(l3.COL_LOCALID, stringExtra8); hashMap18.put("duration", Integer.valueOf(webViewJSSDKVideoItem2.f165446w)); hashMap18.put("height", Integer.valueOf(webViewJSSDKVideoItem2.f165437q)); hashMap18.put("size", Integer.valueOf(webViewJSSDKVideoItem2.f165435o)); hashMap18.put("width", Integer.valueOf(webViewJSSDKVideoItem2.f165436p)); hashMap18.put("thumbLocalId", stringExtra9); new c.a(1, n6(), JsApiChooseImage.NAME, "", 1).h(); q5(this.f167361e, "recordVideo:ok", hashMap18); } else if (i16 != 0) { q5(this.f167361e, "recordVideo:fail", null); } else { q5(this.f167361e, "recordVideo:cancel", null); } } else if (i15 == 47) { if (i16 != -1) { if (i16 != 0) { q5(this.f167361e, "chooseMedia:fail", null); } else { q5(this.f167361e, "chooseMedia:cancel", null); } } else if (intent == null) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult REQUEST_CHOOSE_MEDIA data is null,"); q5(this.f167361e, "chooseMedia:fail", null); } else { int intExtra9 = intent.getIntExtra("key_pick_local_media_callback_type", 0); if (intExtra9 == 1) { String stringExtra10 = intent.getStringExtra("key_pick_local_media_local_id"); String stringExtra11 = intent.getStringExtra("key_pick_local_media_thumb_local_id"); Log.i("MicroMsg.MsgHandler", "video localId:%s", stringExtra10); Log.i("MicroMsg.MsgHandler", "video thumbLocalId:%s", stringExtra11); if (Util.isNullOrNil(stringExtra10)) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult REQUEST_CHOOSE_MEDIA video localId is null"); q5(this.f167361e, "chooseMedia:fail", null); return; } WebViewJSSDKFileItem b17 = com.tencent.mm.plugin.webview.modeltools.m.aO0().b(stringExtra10); if (b17 == null || !(b17 instanceof WebViewJSSDKVideoItem)) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult REQUEST_CHOOSE_MEDIA nor the videoitem"); q5(this.f167361e, "chooseMedia:fail", null); return; } WebViewJSSDKVideoItem webViewJSSDKVideoItem3 = (WebViewJSSDKVideoItem) b17; String i35 = k2.i(stringExtra10, stringExtra11, webViewJSSDKVideoItem3.f165446w, webViewJSSDKVideoItem3.f165437q, webViewJSSDKVideoItem3.f165436p, webViewJSSDKVideoItem3.f165435o); Log.i("MicroMsg.MsgHandler", "after parse to json data : %s", i35); HashMap hashMap19 = new HashMap(); hashMap19.put("type", 1); hashMap19.put("localIds", i35); new c.a(1, n6(), JsApiChooseImage.NAME, "", 1).h(); q5(this.f167361e, "chooseMedia:ok", hashMap19); } else if (intExtra9 == 2) { String stringExtra12 = intent.getStringExtra("key_pick_local_media_local_ids"); Log.i("MicroMsg.MsgHandler", "chooseMedia localIds:%s", stringExtra12); if (Util.isNullOrNil(stringExtra12)) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult REQUEST_CHOOSE_MEDIA image localIds is null"); q5(this.f167361e, "chooseMedia:fail", null); return; } HashMap hashMap20 = new HashMap(); hashMap20.put("type", 2); hashMap20.put("localIds", stringExtra12); new c.a(1, n6(), JsApiChooseImage.NAME, "", 1).h(); q5(this.f167361e, "chooseMedia:ok", hashMap20); } else { Log.e("MicroMsg.MsgHandler", "type:%d is error", Integer.valueOf(intExtra9)); q5(this.f167361e, "chooseMedia:fail", null); } } } else if (i15 == 46) { if (i16 == -1) { q5(this.f167361e, "previewVideo:ok", null); } else if (i16 != 0) { q5(this.f167361e, "previewVideo:fail", null); } else { q5(this.f167361e, "previewVideo:cancel", null); } } else if (i15 == 19) { Log.i("MicroMsg.MsgHandler", "request to config exdevice wifi connection, result code = " + i16); if (i16 == -1) { q5(this.f167361e, "configWXDeviceWiFi:ok", null); } else if (i16 == 0) { if (intent == null || intent.getBooleanExtra("is_wifi_connected", true)) { hashMap = null; } else { hashMap = new HashMap(); hashMap.put("desc", "wifi_not_connected"); } q5(this.f167361e, "configWXDeviceWiFi:cancel", hashMap); } else if (i16 == 1) { q5(this.f167361e, "configWXDeviceWiFi:fail", null); } } else if (i15 == 20) { Log.i("MicroMsg.MsgHandler", "request request_verify_wcpay_password, resultCode = " + i16); HashMap hashMap21 = new HashMap(); if (i16 == -1) { String str10 = ""; if (intent != null) { str10 = Util.nullAs(intent.getStringExtra(XWalkReaderBasePlugin.PARAM_KEY_TOKEN), ""); } if (!TextUtils.isEmpty(str10)) { hashMap21.put(XWalkReaderBasePlugin.PARAM_KEY_TOKEN, str10); q5(this.f167361e, "verifyWCPayPassword:ok", hashMap21); q.INSTANCE.g(14954, qv3.h.b(), "verifyWCPayPassword:ok"); Log.i("MicroMsg.MsgHandler", "checkPwdToken is valid, verifyWCPayPassword:ok"); } else { Log.i("MicroMsg.MsgHandler", "checkPwdToken is empty, verifyWCPayPassword:fail"); q5(this.f167361e, "verifyWCPayPassword:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "verifyWCPayPassword:fail"); } } } else { Log.i("MicroMsg.MsgHandler", "resultCode is canlcel, verifyWCPayPassword:fail"); q5(this.f167361e, "verifyWCPayPassword:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "verifyWCPayPassword:fail"); } } if (!qv3.h.c()) { qv3.h.a(); } } else if (21 == i15) { q5(this.f167361e, "see_order_ok", null); } else if (i15 == 22) { Log.i("MicroMsg.MsgHandler", "request get_recevie_biz_hongbao_request, resultCode = " + i16); if (i16 == -1) { q5(this.f167361e, "get_recevie_biz_hongbao_request:ok", null); } else if (i16 == 0) { q5(this.f167361e, "get_recevie_biz_hongbao_request:cancel", null); } else { q5(this.f167361e, "get_recevie_biz_hongbao_request:fail", null); } } else if (i15 == 24) { Bundle bundle2 = this.f167367n; SnsAdClick snsAdClick3 = bundle2 != null ? (SnsAdClick) bundle2.getParcelable("KSnsAdTag") : null; if (i16 == -1) { if (snsAdClick3 != null) { snsAdClick3.f79448g = 9; U6(snsAdClick3); } k7(2, 1); if (Util.getInt((String) ((HashMap) this.f167361e.f247819a).get("open_from_scene"), 0) == 4) { ((nr.j) j.c(nr.j.class)).PM(this.f167367n.getLong("favlocalid", 0), 0, 0); } try { if (this.f167378x != null) { String str11 = (String) ((HashMap) this.f167361e.f247819a).get("appId"); if (TextUtils.isEmpty(str11)) { str11 = (String) ((HashMap) this.f167361e.f247819a).get("appid"); } try { map3 = null; try { W6(str11, (String) ((HashMap) this.f167361e.f247819a).get("img_url"), "", 1, 3, this.f167378x.v6(85, null)); } catch (RemoteException e26) { e15 = e26; } } catch (RemoteException e27) { e15 = e27; map3 = null; Log.e("MicroMsg.MsgHandler", "invokeAsResult : %s", e15); q5(this.f167361e, "share_timeline:ok", map3); return; } } else { map3 = null; } } catch (RemoteException e28) { e15 = e28; map3 = null; Log.e("MicroMsg.MsgHandler", "invokeAsResult : %s", e15); q5(this.f167361e, "share_timeline:ok", map3); return; } q5(this.f167361e, "share_timeline:ok", map3); return; } if (snsAdClick3 != null) { snsAdClick3.f79448g = 10; U6(snsAdClick3); } k7(2, 3); q5(this.f167361e, "share_timeline:ok", null); } else if (i15 == 26) { if (i16 == -1) { q5(this.f167361e, "selectPedometerSource:ok", null); } else if (i16 == 0) { Log.i("MicroMsg.MsgHandler", "selectPedometerSource result cancel"); q5(this.f167361e, "selectPedometerSource:cancel", null); } else { Log.e("MicroMsg.MsgHandler", "selectPedometerSource result fail"); q5(this.f167361e, "selectPedometerSource:fail", null); } } else if (i15 == 25) { Log.i("MicroMsg.MsgHandler", "hy: get ibg order finish. result code: %d", Integer.valueOf(i16)); if (this.J == 1 && (mVar = this.f167378x) != null) { try { mVar.Va0(); this.f167378x.d(null); } catch (RemoteException e29) { Log.printErrStackTrace("MicroMsg.MsgHandler", e29, "", new Object[0]); } } if (i16 == -1) { q5(this.f167361e, "get_h5_transaction_request:ok", null); } else { q5(this.f167361e, "get_h5_transaction_request:cancel", null); } } else if (i15 == 28) { Log.i("MicroMsg.MsgHandler", "get web pay checkout counter request finish. result code: %d", Integer.valueOf(i16)); boolean booleanExtra = intent != null ? intent.getBooleanExtra("is_new_cashier", false) : false; if (i16 == -1) { HashMap hashMap22 = new HashMap(); String nullAs10 = Util.nullAs(intent.getStringExtra(XWalkReaderBasePlugin.PARAM_KEY_TOKEN), ""); String nullAs11 = Util.nullAs(intent.getStringExtra("bind_serial"), ""); hashMap22.put(XWalkReaderBasePlugin.PARAM_KEY_TOKEN, nullAs10); hashMap22.put("bind_serial", nullAs11); hashMap22.put("is_new_cashier", booleanExtra ? "1" : "0"); q5(this.f167361e, "getWebPayCheckoutCounterRequst:ok", hashMap22); q.INSTANCE.g(14954, qv3.h.b(), "getWebPayCheckoutCounterRequst:ok"); } else { HashMap hashMap23 = new HashMap(); hashMap23.put("is_new_cashier", booleanExtra ? "1" : "0"); q5(this.f167361e, "getWebPayCheckoutCounterRequst:fail", hashMap23); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "getWebPayCheckoutCounterRequst:fail"); } } if (!qv3.h.c()) { qv3.h.a(); } } else if (i15 == 31) { if (i16 != -1) { q5(this.f167361e, "openEnterpriseContact:ok", null); return; } Bundle bundleExtra = intent.getBundleExtra("result_data"); if (bundleExtra != null) { String string = bundleExtra.getString("result"); HashMap hashMap24 = new HashMap(); hashMap24.put("result", string); q5(this.f167361e, "openEnterpriseContact:ok", hashMap24); return; } q5(this.f167361e, "openEnterpriseContact:ok", null); } else if (i15 == 53) { if (i16 != -1) { q5(this.f167361e, "selectEnterpriseContact:ok", null); return; } Bundle bundleExtra2 = intent.getBundleExtra("result_data"); if (bundleExtra2 != null) { String string2 = bundleExtra2.getString("result"); HashMap hashMap25 = new HashMap(); hashMap25.put("result", string2); q5(this.f167361e, "selectEnterpriseContact:ok", hashMap25); return; } q5(this.f167361e, "selectEnterpriseContact:ok", null); } else if (i15 == 29) { if (i16 == -1) { q5(this.f167361e, "consumedShareCard:ok", null); } else { q5(this.f167361e, "consumedShareCard:fail", null); } } else if (i15 != 150 && i15 != 149) { if (i15 == 152 || i15 == 151) { map = null; i17 = -1; } else if (i15 == 113) { i17 = -1; map = null; } else if (i15 == 116) { if (i16 == -1) { d6(this.f167361e); return; } else { q5(this.f167361e, "startRecord:fail_android_permission_denied", null); return; } } else if (i15 == 115) { if (i16 == -1) { G5(this.f167361e, 0); return; } else { q5(this.f167361e, "chooseVideo:fail_android_permission_denied", null); return; } } else if (i15 == 117) { if (i16 == -1) { G5(this.f167361e, 1); return; } else { q5(this.f167361e, "recordVideo:fail_android_permission_denied", null); return; } } else if (i15 == 118) { if (i16 == -1) { G5(this.f167361e, 1); return; } else { q5(this.f167361e, "recordVideo:fail_android_permission_denied", null); return; } } else if (i15 == 119) { if (i16 == -1) { F5(this.f167361e); return; } Log.e("MicroMsg.MsgHandler", "chooseMedia:fail_android_permission_denied:CAMERA"); q5(this.f167361e, "chooseMedia:fail_android_permission_denied", null); return; } else if (i15 == 120) { if (i16 == -1) { F5(this.f167361e); return; } Log.e("MicroMsg.MsgHandler", "chooseMedia:fail_android_permission_denied:MICROPHONE"); q5(this.f167361e, "chooseMedia:fail_android_permission_denied", null); return; } else if (i15 == 30) { Log.i("MicroMsg.MsgHandler", "doSelectSingleContact activtiy callback"); String str12 = (String) ((HashMap) this.f167361e.f247819a).get("appId"); if (this.f167367n != null && TextUtils.isEmpty(str12)) { str12 = this.f167367n.getString("jsapi_args_appid"); } int i36 = Util.getInt((String) ((HashMap) this.f167361e.f247819a).get("selectMode"), 0); String str13 = (String) ((HashMap) this.f167361e.f247819a).get("busiId"); Log.i("MicroMsg.MsgHandler", "select single contact : appId:%s, busiId:%s, selectedMode:%d", str12, str13, Integer.valueOf(i36)); if (i16 == -1) { String stringExtra13 = intent == null ? null : intent.getStringExtra("Select_Conv_User"); if (stringExtra13 == null || stringExtra13.length() == 0) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult,selectSingleContact fail, user is null"); q5(this.f167361e, "selectSingleContact:fail", null); return; } else if (i36 == 0) { com.tencent.mm.plugin.webview.model.b0 b0Var = new com.tencent.mm.plugin.webview.model.b0(str12, stringExtra13); d60.z.d().a(1566, new MsgHandler$$m(this)); d60.z.d().f(b0Var); Context context7 = this.f167360d; this.f167363g = i14.j.Q(context7, hy3.h.a(context7).getString(R.string.f367625yv), hy3.h.a(this.f167360d).getString(R.string.f367656zq), true, true, new MsgHandler$$n(this, b0Var)); return; } else if (i36 == 1) { com.tencent.mm.plugin.webview.model.h0 h0Var = new com.tencent.mm.plugin.webview.model.h0(str12, str13, stringExtra13); d60.z.d().a(1177, new MsgHandler$$o(this)); d60.z.d().f(h0Var); Context context8 = this.f167360d; this.f167363g = i14.j.Q(context8, hy3.h.a(context8).getString(R.string.f367625yv), hy3.h.a(this.f167360d).getString(R.string.f367656zq), true, true, new MsgHandler$$p(this, h0Var)); return; } else { return; } } else if (i16 == 0) { q5(this.f167361e, "selectSingleContact:cancel", null); return; } else { return; } } else if (i15 == 34) { if (i16 == -1) { q5(this.f167361e, "get_wcpay_realname_verify:ok", null); q.INSTANCE.g(14954, qv3.h.b(), "get_wcpay_realname_verify:ok"); } else if (i16 == 1) { q5(this.f167361e, "get_wcpay_realname_verify:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "get_wcpay_realname_verify:fail"); } } else { q5(this.f167361e, "get_wcpay_realname_verify:cancel", null); q.INSTANCE.g(14954, qv3.h.b(), "get_wcpay_realname_verify:cancel"); } if (!qv3.h.c()) { qv3.h.a(); return; } return; } else if (i15 == 211) { if (i16 == -1) { RequestEnterWalletEvent requestEnterWalletEvent = new RequestEnterWalletEvent(); requestEnterWalletEvent.f64256d.f64257a = this.f167360d; requestEnterWalletEvent.publish(); try { this.f167378x.Va0(); this.f167378x.d(null); return; } catch (RemoteException e35) { Log.printErrStackTrace("MicroMsg.MsgHandler", e35, "", new Object[0]); return; } } else { q5(this.f167361e, "selectWalletCurrency:cancel", null); return; } } else if (i15 == 37) { if (this.f167362f == null) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult fail, appmsg is null"); q5(this.f167361e, "send_app_msg:fail", null); return; } String str14 = (String) ((HashMap) this.f167361e.f247819a).get("appid"); Bundle bundle3 = this.f167367n; if (bundle3 != null) { snsAdClick = (SnsAdClick) bundle3.getParcelable("KSnsAdTag"); if (TextUtils.isEmpty(str14)) { str14 = this.f167367n.getString("jsapi_args_appid"); } } else { snsAdClick = null; } Object obj2 = ((HashMap) this.f167361e.c()).get("Internal@AsyncReport"); if (i16 == -1) { if (snsAdClick != null) { snsAdClick.f79448g = 7; U6(snsAdClick); } com.tencent.mm.pluginsdk.model.app.j appInfo2 = ((ln.l) j.c(ln.l.class)).getAppInfo(str14); if (intent != null) { String stringExtra14 = intent.getStringExtra("enterprise_biz_name"); long longExtra = intent.getLongExtra("key_biz_chat_id", -1); String stringExtra15 = intent.getStringExtra("enterprise_share_append_text"); if (stringExtra14 == null || stringExtra14.length() == 0) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult fail, toUser is null"); q5(this.f167361e, "send_app_msg:fail", null); return; } String str15 = (String) ((HashMap) this.f167361e.f247819a).get("img_url"); String str16 = (String) ((HashMap) this.f167361e.f247819a).get("desc"); String str17 = (String) ((HashMap) this.f167361e.f247819a).get("src_username"); String str18 = (String) ((HashMap) this.f167361e.f247819a).get("src_displayname"); String t66 = t6(); o1.a(this.f167361e.c(), u6("sendAppMessage"), stringExtra14, str14); if (obj2 != null && (obj2 instanceof Boolean) && ((Boolean) obj2).booleanValue()) { T6(this.f167361e, true); } if (Util.isNullOrNil(str15)) { if (longExtra >= 0) { cg0.c c05 = bg0.w0.bO0().c0(longExtra); synchronized (cg0.e.f49354d) { String j15 = cg0.e.j(); cg0.e.k(c05); Y5(appInfo2, str14, stringExtra14, str15, str17, str18, stringExtra15, t66); cg0.e.c(j15); } map2 = null; } else { map2 = null; Y5(appInfo2, str14, stringExtra14, str15, str17, str18, stringExtra15, t66); } Context context9 = this.f167360d; i14.j.T(context9, hy3.h.a(context9).getString(R.string.f367891bb2)); q5(this.f167361e, "send_app_msg:ok", map2); return; } ((yt.h) j.c(yt.h.class)).JA(str15, new MsgHandler$$q(this, longExtra, appInfo2, str14, stringExtra14, str15, str17, str18, stringExtra15, t66)); return; } return; } else if (i16 == 0) { if (snsAdClick != null) { snsAdClick.f79448g = 8; U6(snsAdClick); } o1.a(this.f167361e.c(), u6("sendAppMessage"), null, str14); if (obj2 != null && (obj2 instanceof Boolean) && ((Boolean) obj2).booleanValue()) { T6(this.f167361e, true); } q5(this.f167361e, "send_app_msg:cancel", null); return; } else { return; } } else if (i15 == 38) { if (i16 == -1) { Log.i("MicroMsg.MsgHandler", "hy: soter auth ok"); q5(this.f167361e, "soter_biometric_authentication:ok", kp3.a.a(intent.getExtras())); return; } else if (i16 == 1) { Log.w("MicroMsg.MsgHandler", "hy: soter auth failed"); q5(this.f167361e, "soter_biometric_authentication:fail", kp3.a.a(intent.getExtras())); return; } else { Log.e("MicroMsg.MsgHandler", "hy: soter user cancelled"); q5(this.f167361e, "soter_biometric_authentication:cancel", kp3.a.a(intent.getExtras())); return; } } else if (i15 != 39) { int i37 = 49; if (i15 == 40) { if (i16 == -1) { Bundle bundle4 = new Bundle(); if (intent != null) { ArrayList<f4> p65 = p6(intent.getLongArrayExtra("k_outside_expose_proof_item_list")); int size = p65.size(); String[] strArr = new String[size]; String[] strArr2 = new String[size]; String[] strArr3 = new String[size]; int[] iArr = new int[size]; int[] iArr2 = new int[size]; String[] strArr4 = new String[size]; int i38 = 0; while (i38 < size) { f4 f4Var = p65.get(i38); strArr[i38] = String.valueOf(f4Var.E2()); if (intent.getBooleanExtra("k_is_group_chat", false)) { if (f4Var.o4()) { strArr2[i38] = nf0.f4.u(f4Var.F2()); } else { strArr2[i38] = nf0.f4.u(f4Var.getContent()); } strArr3[i38] = nf0.f4.s(f4Var.getContent()); } else { if (f4Var.o4()) { strArr2[i38] = f4Var.F2(); } else { strArr2[i38] = f4Var.getContent(); } if (z1.f5(f4Var.i())) { strArr3[i38] = ((f5) j.c(f5.class)).o(f4Var.i()); } else if (z1.O5(f4Var.i())) { strArr3[i38] = ((qd3.w) j.c(qd3.w.class)).o(f4Var.i()); } else { strArr3[i38] = f4Var.i(); } } if (f4Var.y2() == 1) { if (z1.f5(f4Var.i())) { strArr3[i38] = ((f5) j.c(f5.class)).w3(f4Var.i()); } else { strArr3[i38] = u0.r(); } } if (strArr2[i38] == null) { strArr2[i38] = ""; } if (strArr3[i38] == null) { strArr3[i38] = ""; } if (f4Var.B3()) { iArr[i38] = i37; } else { iArr[i38] = f4Var.getType(); } iArr2[i38] = (int) (f4Var.getCreateTime() / 1000); if (f4Var.j4() || f4Var.W3() || f4Var.o4()) { Map<String, String> parseXml = XmlParser.parseXml(f4Var.C2(), "msgsource", null); if (!(parseXml == null || parseXml.get(".msgsource.signature") == null)) { strArr4[i38] = parseXml.get(".msgsource.signature"); if (parseXml.get(".msgsource.realcreatetime") != null) { iArr2[i38] = Util.getInt(parseXml.get(".msgsource.realcreatetime"), (int) (f4Var.getCreateTime() / 1000)); i38++; strArr = strArr; i37 = 49; } } } else { strArr4[i38] = ""; } i38++; strArr = strArr; i37 = 49; } bundle4.putStringArray("msgIds", strArr); bundle4.putStringArray("contents", strArr2); bundle4.putStringArray("senders", strArr3); bundle4.putIntArray("msgTypes", iArr); bundle4.putIntArray("msgTimes", iArr2); bundle4.putStringArray("msgSignature", strArr4); try { m mVar4 = this.f167378x; if (mVar4 != null) { mVar4.callback(48, bundle4); } q5(this.f167361e, "select chat record:ok", null); return; } catch (RemoteException e36) { Log.w("MicroMsg.MsgHandler", "onGetMsgProofItems exception" + e36.getMessage()); q5(this.f167361e, "select chat record:fail", null); return; } } else { q5(this.f167361e, "select chat record:fail", null); return; } } else { q5(this.f167361e, "select chat record:cancel", null); return; } } else if (i15 == 41) { if (i16 == -1) { q5(this.f167361e, "id_card_realname_verify:ok", null); q.INSTANCE.g(14954, qv3.h.b(), "id_card_realname_verify:ok"); } else if (i16 == 1) { q5(this.f167361e, "id_card_realname_verify:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "id_card_realname_verify:fail"); } } else { q5(this.f167361e, "id_card_realname_verify:cancel", null); q.INSTANCE.g(14954, qv3.h.b(), "id_card_realname_verify:cancel"); } if (!qv3.h.c()) { qv3.h.a(); return; } return; } else if (i15 == 42) { if (i16 == -1) { if (intent != null) { String nullAs12 = Util.nullAs(intent.getStringExtra("gameRegionName"), ""); HashMap hashMap26 = new HashMap(); hashMap26.put("gameRegionName", nullAs12); q5(this.f167361e, "get game region:ok", hashMap26); return; } q5(this.f167361e, "get game region:fail", null); return; } else if (i16 == 1) { q5(this.f167361e, "get game region:fail", null); return; } else { q5(this.f167361e, "get game region:cancel", null); return; } } else if (i15 == 43) { Log.i("MicroMsg.MsgHandler", "request to open file chooser for id card image, result code = " + i16); if (i16 == -1) { HashMap hashMap27 = new HashMap(); String stringExtra16 = intent.getStringExtra("key_pick_local_pic_callback_local_ids"); Log.i("MicroMsg.MsgHandler", "localIds = %s", stringExtra16); if (Util.isNullOrNil(stringExtra16)) { s5(f167351f1, f167353h1); q5(this.f167361e, "chooseIdCard:fail", null); return; } try { JSONArray jSONArray2 = new JSONArray(stringExtra16); if (jSONArray2.length() > 0) { hashMap27.put(l3.COL_LOCALID, jSONArray2.get(0).toString()); if (intent.getStringExtra("key_pick_local_pic_source_type") != null) { hashMap27.put("sourceType", FFmpegMetadataRetriever.METADATA_KEY_ALBUM); } s5(f167351f1, f167355j1); q5(this.f167361e, "chooseIdCard:ok", hashMap27); return; } s5(f167351f1, f167353h1); q5(this.f167361e, "chooseImage:fail", null); return; } catch (Exception e37) { Log.printErrStackTrace("MicroMsg.MsgHandler", e37, "", new Object[0]); s5(f167351f1, f167353h1); q5(this.f167361e, "chooseImage:fail", null); return; } } else if (i16 != 0) { s5(f167351f1, f167353h1); q5(this.f167361e, "chooseImage:fail", null); return; } else { s5(f167351f1, f167354i1); q5(this.f167361e, "chooseIdCard:cancel", null); return; } } else if (i15 == 48) { Log.i("MicroMsg.MsgHandler", "alvinluo: requestWxFacePictureVerify resultCode: %d", Integer.valueOf(i16)); if (i16 == -1) { q5(this.f167361e, "requestWxFacePictureVerify:ok", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 1) { q5(this.f167361e, "requestWxFacePictureVerify:fail", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 0) { q5(this.f167361e, "requestWxFacePictureVerify:cancel", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else { return; } } else if (i15 == 49) { Log.i("MicroMsg.MsgHandler", "hy: REQUEST_FACE_DETECT_WITH_VIDEO resultCode: %d", Integer.valueOf(i16)); if (i16 == -1) { q5(this.f167361e, "requestWxFacePictureVerifyUnionVideo:ok", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 1) { q5(this.f167361e, "requestWxFacePictureVerifyUnionVideo:fail", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 0) { q5(this.f167361e, "requestWxFacePictureVerifyUnionVideo:cancel", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else { return; } } else if (i15 == 52) { Log.i("MicroMsg.MsgHandler", "share emmotion resultCode: %d", Integer.valueOf(i16)); if (i16 == -1) { String nullAs13 = Util.nullAs(intent.getStringExtra("Select_Conv_User"), ""); String nullAs14 = Util.nullAs(intent.getStringExtra("emoji_thumb_path"), ""); String nullAs15 = Util.nullAs(intent.getStringExtra("emoji_activity_id"), ""); IEmojiInfo F2 = ((q0) j.c(q0.class)).F2(nullAs14); if (F2 == null) { String s702 = ((com.tencent.mm.feature.emoji.api.s0) j.c(com.tencent.mm.feature.emoji.api.s0.class)).s70(((e1) j.c(e1.class)).RN0(), "", nullAs14); if (u1.k(s702)) { int i39 = ImgUtil.isGif(s702) ? 2 : 1; IEmojiInfo PK = ((q0) j.c(q0.class)).PK(); PK.setMd5(nullAs14); PK.g2(65); PK.setType(i39); PK.q1((int) u1.l(s702)); PK.v0(1); if (!Util.isNullOrNil(nullAs15)) { PK.c1(nullAs15); } F2 = ((q0) j.c(q0.class)).PJ0(PK); } } for (String str19 : Util.stringsToList(Util.nullAs(nullAs13, "").split(","))) { if (F2 != null) { ((t0) j.c(t0.class)).li0(str19, F2, null); } } String stringExtra17 = intent.getStringExtra("custom_send_text"); if (!Util.isNullOrNil(stringExtra17)) { SendMsgEvent sendMsgEvent = new SendMsgEvent(); SendMsgEvent.a aVar = sendMsgEvent.f64446d; aVar.f64447a = nullAs13; aVar.f64448b = stringExtra17; aVar.f64449c = w0.z(nullAs13); sendMsgEvent.f64446d.f64450d = 0; sendMsgEvent.publish(); } Context context10 = this.f167360d; i14.j.T(context10, hy3.h.a(context10).getString(R.string.f367612yi)); q5(this.f167361e, "shareEmoticon:ok", null); return; } else if (i16 != 0) { q5(this.f167361e, "shareEmoticon:fail", null); return; } else { q5(this.f167361e, "shareEmoticon:cancel", null); return; } } else if (i15 == 50) { Log.i("MicroMsg.MsgHandler", "hy: requestWxFaceRegisterInternal resultCode: %d", Integer.valueOf(i16)); if (i16 == -1) { q5(this.f167361e, "requestWxFaceRegisterInternal:ok", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 1) { q5(this.f167361e, "requestWxFaceRegisterInternal:fail", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 0) { q5(this.f167361e, "requestWxFaceRegisterInternal:cancel", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else { return; } } else if (i15 == 51) { Log.i("MicroMsg.MsgHandler", "hy: requestWxFaceVerifyInternal resultCode: %d", Integer.valueOf(i16)); if (i16 == -1) { q5(this.f167361e, "requestWxFaceVerifyInternal:ok", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 1) { q5(this.f167361e, "requestWxFaceVerifyInternal:fail", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 0) { q5(this.f167361e, "requestWxFaceVerifyInternal:cancel", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else { return; } } else if (i15 == 54) { if (i16 != -1 || intent == null) { q5(this.f167361e, "selectContact:fail", null); return; } String stringExtra18 = intent.getStringExtra("Select_Contact"); String displayName = ((hh2.j) j.c(hh2.j.class)).getDisplayName(stringExtra18); Bundle bundle5 = new Bundle(); bundle5.putString("username", stringExtra18); bundle5.putString("nickname", displayName); bundle5.putInt("ret", 0); try { m mVar5 = this.f167378x; if (mVar5 != null) { mVar5.callback(126, bundle5); } } catch (RemoteException e38) { Log.w("MicroMsg.MsgHandler", "onSearchDataReady exception" + e38.getMessage()); } q5(this.f167361e, "selectContact:succ", null); return; } else if (i15 == 65) { if (i16 != -1 || intent == null) { q5(this.f167361e, "selectContact:fail", null); return; } String stringExtra19 = intent.getStringExtra("Select_Contact"); String displayName2 = ((hh2.j) j.c(hh2.j.class)).getDisplayName(stringExtra19); HashMap hashMap28 = new HashMap(); hashMap28.put("username", stringExtra19); hashMap28.put("nickname", displayName2); com.tencent.mm.modelavatar.n Sa = ((com.tencent.mm.modelavatar.o) ((yn.g) j.c(yn.g.class)).Ci()).Sa(stringExtra19); if (Sa != null) { hashMap28.put("headurl", Sa.f()); } z1 z1Var = ((k0) d60.z.q(k0.class)).Zx().get(stringExtra19); if (z1Var != null && !Util.isNullOrNil(z1Var.q2())) { hashMap28.put("alias", z1Var.q2()); } q5(this.f167361e, "selectContact:ok", hashMap28); return; } else if (i15 == 55) { Log.i("MicroMsg.MsgHandler", "hy: REQUEST_SET_RESET_WALLET_PWD_REQUEST resultCode: %d", Integer.valueOf(i16)); if (i16 == -1) { q5(this.f167361e, "setWCPayPassword:ok", kp3.a.a(intent != null ? intent.getExtras() : null)); q.INSTANCE.g(14954, qv3.h.b(), "setWCPayPassword:ok"); } else if (i16 == 0) { q5(this.f167361e, "setWCPayPassword:cancel", kp3.a.a(intent != null ? intent.getExtras() : null)); q.INSTANCE.g(14954, qv3.h.b(), "setWCPayPassword:cancel"); } else { q5(this.f167361e, "setWCPayPassword:fail", kp3.a.a(intent != null ? intent.getExtras() : null)); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "setWCPayPassword:fail"); } } if (!qv3.h.c()) { qv3.h.a(); return; } return; } else if (i15 == 56) { Log.i("MicroMsg.MsgHandler", "request choose invoice title, resultCode = " + i16); HashMap hashMap29 = new HashMap(); if (i16 == -1) { if (intent != null) { hashMap29.put("choose_invoice_title_info", Util.nullAs(intent.getStringExtra("choose_invoice_title_info"), "")); } new c.a(1, n6(), com.tencent.mm.plugin.appbrand.jsapi.j2.NAME, "", 1).h(); q5(this.f167361e, "chooseInvoiceTitle:ok", hashMap29); return; } else if (i16 == 0) { q5(this.f167361e, "chooseInvoiceTitle:cancel", hashMap29); return; } else { q5(this.f167361e, "chooseInvoiceTitle:fail", hashMap29); return; } } else if (i15 == 57) { Log.i("MicroMsg.MsgHandler", "request voice login verify, resultCode: %d", Integer.valueOf(i16)); HashMap hashMap30 = new HashMap(); if (i16 == -1) { hashMap30.put("err_code", 0); hashMap30.put("err_msg", "verify ok"); q5(this.f167361e, "request voice login verify:ok", hashMap30); return; } else if (i16 == 0) { hashMap30.put("err_code", 1); hashMap30.put("err_msg", "verify cancel"); q5(this.f167361e, "request voice login verify:cancel", hashMap30); return; } else { hashMap30.put("err_code", 2); hashMap30.put("err_msg", "verify error"); q5(this.f167361e, "request voice login verify:error", hashMap30); return; } } else if (i15 == 59) { Log.i("MicroMsg.MsgHandler", "hy: REQUEST_OPEN_CARD_LIST resultCode: %d", Integer.valueOf(i16)); if (i16 == -1) { q5(this.f167361e, "openWCPayCardList:ok", kp3.a.a(intent != null ? intent.getExtras() : null)); q.INSTANCE.g(14954, qv3.h.b(), "openWCPayCardList:ok"); } else if (i16 == 0) { q5(this.f167361e, "openWCPayCardList:fail", kp3.a.a(intent != null ? intent.getExtras() : null)); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "openWCPayCardList:fail"); } } else { q5(this.f167361e, "openWCPayCardList:fail", kp3.a.a(intent != null ? intent.getExtras() : null)); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "openWCPayCardList:fail"); } } if (!qv3.h.c()) { qv3.h.a(); return; } return; } else if (i15 == 60) { if (intent != null) { String stringExtra20 = intent.getStringExtra("key_callback"); Log.i("MicroMsg.MsgHandler", "open offline pay view callback: %s", stringExtra20); q5(this.f167361e, String.format("openOfflinePayView:%s", stringExtra20), null); q.INSTANCE.g(14954, qv3.h.b(), "openOfflinePayView:ok"); } else { q5(this.f167361e, "openOfflinePayView:fail", null); if (!qv3.h.c()) { q.INSTANCE.g(14954, qv3.h.b(), "openOfflinePayView:fail"); } } if (!qv3.h.c()) { qv3.h.a(); return; } return; } else if (i15 == 58) { Log.i("MicroMsg.MsgHandler", "request bind email, resultCode %d", Integer.valueOf(i16)); if (i16 == -1) { q5(this.f167361e, "bindEmail:ok", null); return; } else { q5(this.f167361e, "bindEmail:cancel", null); return; } } else if (i15 == 62) { Log.i("MicroMsg.MsgHandler", "[openRealnameAuth]resultCode:%d", Integer.valueOf(i16)); HashMap hashMap31 = new HashMap(); if (i16 == -1) { Log.i("MicroMsg.MsgHandler", "openRealnameAuth ok"); String stringExtra21 = intent.getStringExtra("intent_auth_token"); if (!Util.isNullOrNil(stringExtra21)) { hashMap31.put("err_code", 0); hashMap31.put("auth_token", stringExtra21); q5(this.f167361e, "openRealnameAuth:ok", hashMap31); return; } q5(this.f167361e, "openRealnameAuth:fail", hashMap31); return; } else if (i16 == 0) { Log.i("MicroMsg.MsgHandler", "openRealnameAuth cancel"); q5(this.f167361e, "openRealnameAuth:cancel", hashMap31); return; } else if (i16 == 1) { Log.i("MicroMsg.MsgHandler", "openRealnameAuth fail"); if (intent != null) { int intExtra10 = intent.getIntExtra("intent_err_code", -1); String stringExtra22 = intent.getStringExtra("intent_err_msg"); hashMap31.put("err_code", Integer.valueOf(intExtra10)); hashMap31.put("err_msg", stringExtra22); q5(this.f167361e, "openRealnameAuth:fail", hashMap31); Log.i("MicroMsg.MsgHandler", "openRealnameAuth errCode:%d, errMsg:%s", Integer.valueOf(intExtra10), stringExtra22); return; } q5(this.f167361e, "openRealnameAuth:fail", hashMap31); return; } else { return; } } else if (i15 == 61) { if (this.f167362f == null) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult fail, appmsg is null"); q5(this.f167361e, "sendSingleAppMessage:fail", null); return; } else if (i16 == -1) { if (intent == null) { str = null; } else { str = intent.getStringExtra("Select_Conv_User"); } if (str == null || str.length() == 0) { Log.e("MicroMsg.MsgHandler", "mmOnActivityResult fail, toUser is null"); q5(this.f167361e, "sendSingleAppMessage:fail", null); return; } Object obj3 = ((HashMap) this.f167361e.f247819a).get("__jsapi_fw_ext_info"); String c16 = this.f167382z.c(obj3 instanceof Bundle ? ((Bundle) obj3).getString("__jsapi_fw_ext_info_key_current_url") : null); if (Util.isNullOrNil(c16)) { c16 = (String) ((HashMap) this.f167361e.f247819a).get("appId"); } com.tencent.mm.plugin.webview.model.h0 h0Var2 = new com.tencent.mm.plugin.webview.model.h0(c16, "", str); d60.z.d().a(1177, new MsgHandler$$r(this, intent, str)); d60.z.d().f(h0Var2); Context context11 = this.f167360d; this.f167363g = i14.j.Q(context11, hy3.h.a(context11).getString(R.string.f367625yv), hy3.h.a(this.f167360d).getString(R.string.f367656zq), true, true, new MsgHandler$$s(this, h0Var2)); return; } else if (i16 != 0) { q5(this.f167361e, "sendSingleAppMessage:fail", null); return; } else { q5(this.f167361e, "sendSingleAppMessage:cancel", null); return; } } else if (i15 == 75) { if (i16 == -1) { M5(); return; } else { q5(this.f167361e, "geo_location:fail permission", null); return; } } else if (i15 == 63) { Log.i("MicroMsg.MsgHandler", "REQUEST_FACE_VERIFY_FOR_PAY resultCode: %d", Integer.valueOf(i16)); int intExtra11 = intent != null ? intent.getIntExtra("err_code", 0) : 0; if (intent != null) { intent.getStringExtra("err_msg"); } int intExtra12 = intent != null ? intent.getIntExtra(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 0) : 0; int intExtra13 = intent != null ? intent.getIntExtra("countFace", 0) : 0; long longExtra2 = intent != null ? intent.getLongExtra("totalTime", 0) : 0; int intExtra14 = intent != null ? intent.getIntExtra("err_type", 6) : 6; Log.i("MicroMsg.MsgHandler", "errCode:%s , scene:%s , countFace:%s ,totalTime:%s ,errorType:%s otherVerifyTitle:%s otherVerifyTitleFront:%s", Integer.valueOf(intExtra11), Integer.valueOf(intExtra12), Integer.valueOf(intExtra13), Long.valueOf(longExtra2), Integer.valueOf(intExtra14), intent != null ? intent.getStringExtra("click_other_verify_btn") : "", intent != null ? intent.getStringExtra("click_other_verify_btn_front") : ""); if (i16 == -1) { q.INSTANCE.g(15711, Integer.valueOf(intExtra12), 0, Integer.valueOf(intExtra13), Long.valueOf(longExtra2), 2, 0, Integer.valueOf(intExtra11)); q5(this.f167361e, "faceVerifyForPay:ok", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 1) { q.INSTANCE.g(15711, Integer.valueOf(intExtra12), 3, Integer.valueOf(intExtra13), Long.valueOf(longExtra2), 2, Integer.valueOf(intExtra14), Integer.valueOf(intExtra11)); q5(this.f167361e, "faceVerifyForPay:fail", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else if (i16 == 0) { q.INSTANCE.g(15711, Integer.valueOf(intExtra12), 2, Integer.valueOf(intExtra13), Long.valueOf(longExtra2), 2, 1, Integer.valueOf(intExtra11)); q5(this.f167361e, "faceVerifyForPay:cancel", kp3.a.a(intent != null ? intent.getExtras() : null)); return; } else { return; } } else if (i15 == 64) { Log.i("MicroMsg.MsgHandler", "REQUEST_FACE_VERIFY resultCode: %d", Integer.valueOf(i16)); Bundle bundle6 = new Bundle(); if (intent != null) { String stringExtra23 = intent.getStringExtra("err_msg"); String stringExtra24 = intent.getStringExtra("k_bio_id"); String stringExtra25 = intent.getStringExtra("key_pic_cdn_id"); String stringExtra26 = intent.getStringExtra("key_cdn_aes_key"); int intExtra15 = intent.getIntExtra("check_alive_type", 0); bundle6.putString("err_msg", stringExtra23); bundle6.putInt("check_alive_type", intExtra15); bundle6.putString("bioid", stringExtra24); bundle6.putString("fileid", stringExtra25); bundle6.putString("aeskey", stringExtra26); Log.i("MicroMsg.MsgHandler", "errMsg: %s ,bioID:%s ,fileID: %s ,aesKey: %s ,check_alive_type: %d", stringExtra23, stringExtra24, stringExtra25, stringExtra26, Integer.valueOf(intExtra15)); } if (i16 == -1) { q5(this.f167361e, "internelWxFaceVerify:ok", kp3.a.a(bundle6)); return; } else if (i16 == 1) { q5(this.f167361e, "internelWxFaceVerify:fail", kp3.a.a(bundle6)); return; } else if (i16 == 0) { q5(this.f167361e, "internelWxFaceVerify:cancel", kp3.a.a(bundle6)); return; } else { return; } } else if (i15 == 66) { if (i16 == -1) { HashMap hashMap32 = new HashMap(); String stringExtra27 = intent.getStringExtra("key_video_info"); if (!Util.isNullOrNil(stringExtra27)) { Log.i("MicroMsg.MsgHandler", "video, result: %s", stringExtra27); hashMap32.put("type", 2); if (intent.getBooleanExtra("key_game_video_encode_json_array", false)) { try { jSONArray = new JSONArray(stringExtra27); } catch (JSONException e39) { Log.printErrStackTrace("MicroMsg.MsgHandler", e39, "CHOOSE_HAOWAN_MEDIA:JSONException", new Object[0]); jSONArray = null; } hashMap32.put("localIds", jSONArray); } else { hashMap32.put("localIds", stringExtra27); } hashMap32.put("localIds", stringExtra27); hashMap32.put("appId", intent.getStringExtra("key_game_video_appid")); hashMap32.put("appName", intent.getStringExtra("key_game_video_appname")); hashMap32.put("transInfo", intent.getStringExtra("key_game_trans_info")); hashMap32.put("pageType", Integer.valueOf(intent.getIntExtra("key_game_video_page_type", 0))); q5(this.f167361e, "chooseHaowanMedia:ok", hashMap32); return; } ArrayList<String> stringArrayListExtra = intent.getStringArrayListExtra("CropImage_OutputPath_List"); if (!Util.isNullOrNil(stringArrayListExtra)) { x5(this.f167360d, stringArrayListExtra, intent); return; } else if (intent.getBooleanExtra("key_game_haowan_text", false)) { hashMap32.put("type", 3); hashMap32.put("appId", intent.getStringExtra("key_game_video_appid")); hashMap32.put("appName", intent.getStringExtra("key_game_video_appname")); q5(this.f167361e, "chooseHaowanMedia:ok", hashMap32); return; } else { q5(this.f167361e, "chooseHaowanMedia:cancel", null); return; } } else { q5(this.f167361e, "chooseHaowanMedia:cancel", null); a.b(MMApplicationContext.getContext(), 87, 8761, 1, 2, 0, a.a(4, null)); return; } } else if (i15 == 67) { if (i16 == -1) { int intExtra16 = intent.getIntExtra("webview_callback_err", 0); if (intExtra16 == 0) { HashMap hashMap33 = new HashMap(); try { hashMap33.put("videoInfo", new JSONArray(intent.getStringExtra("key_video_info")).getJSONObject(0)); } catch (JSONException e45) { Log.e("MicroMsg.MsgHandler", "json_err:%s", e45.getMessage()); } q5(this.f167361e, "launchGameVideoEditor:ok", hashMap33); return; } else if (intExtra16 == 1) { q5(this.f167361e, "launchGameVideoEditor:cancel", null); return; } else if (intExtra16 == 2) { q5(this.f167361e, "launchGameVideoEditor:fail_download_err", null); return; } else { return; } } else { q5(this.f167361e, "launchGameVideoEditor:cancel", null); return; } } else if (i15 == 70) { if (i16 != -1) { q5(this.f167361e, "openCamera:cancel", null); return; } else if (((ie1.h) j.c(ie1.h.class)).Lk0(h.c.Ud, true)) { q5(this.f167361e, "openCamera:cancel", null); return; } else { SightCaptureResult sightCaptureResult = (SightCaptureResult) intent.getParcelableExtra("key_req_result"); if (sightCaptureResult == null) { q5(this.f167361e, "openCamera:fail", null); return; } String str20 = sightCaptureResult.f132980p; try { jo3.v vVar = new jo3.v(); vVar.f242514b = this.f167360d; vVar.f242519g = str20; vVar.f242521i = 83; vVar.f242516d = 11; ((jo3.p) j.c(jo3.p.class)).G8(vVar); q5(this.f167361e, "doOpenCamera:success", null); return; } catch (Exception e46) { Log.e("MicroMsg.MsgHandler", "doOpenCamera fail, ex = ", e46); q5(this.f167361e, "doOpenCamera:fail", null); return; } } } else { return; } } else if (i16 == -1) { q5(this.f167361e, "unbind_bank_card:ok", null); return; } else if (i16 == 1) { q5(this.f167361e, "unbind_bank_card:fail", null); return; } else { q5(this.f167361e, "unbind_bank_card:cancel", null); return; } if (i16 == i17) { E5(this.f167361e); } else { q5(this.f167361e, "doChooseIdCard:fail_android_permission_denied", map); } } else if (i16 == -1) { D5(this.f167361e); } else { q5(this.f167361e, "chooseImage:fail_android_permission_denied", null); } } public String n6() { String o65 = o6(s6()); if (!Util.isNullOrNil(o65)) { return o65; } return (String) this.f167361e.f247819a.get("appId"); } public final int o5(h1 h1Var) { int hashCode = h1Var.hashCode(); ((HashMap) this.Z).put(Integer.valueOf(hashCode), new MsgHandler$$q0(this, h1Var, this.f167378x)); this.f167375u = false; try { this.f167378x.IT(); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "blockMsg, dealNext ex = %s", e15.getMessage()); } return hashCode; } public String o6(String str) { c cVar = this.f167382z; if (cVar == null) { Log.i("MicroMsg.MsgHandler", "getCachedAppId, jsVerifyHelper is null, return null"); return null; } String c15 = cVar.c(str); if (Util.isNullOrNil(c15)) { c15 = this.f167382z.c(r6()); } if (this.f167367n == null || !Util.isNullOrNil(c15)) { return c15; } return this.f167367n.getString("jsapi_args_appid"); } public final void p5(m mVar, h1 h1Var, String str, Map<String, Object> map, boolean z15, @Deprecated boolean z16, boolean z17) { String str2; if (!z17) { this.f167375u = false; Log.i("MicroMsg.MsgHandler", "callback ret:%s, make isBusy=false", str); } if (h1Var == null) { str2 = null; } else { try { str2 = h1Var.f247857c; } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "onHandleEnd, ex = " + e15.getMessage()); return; } } mVar.fl0(str2, str, h1.b(map), z15); } public void q5(h1 h1Var, String str, Map<String, Object> map) { r5(h1Var, str, map, true, true); } public final String q6() { Bundle v65; try { m mVar = this.f167378x; if (mVar == null || (v65 = mVar.v6(18, null)) == null) { return null; } return v65.getString("preChatName"); } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "invokeAsResult error.%s", e15); return null; } } public final void r5(h1 h1Var, String str, Map<String, Object> map, boolean z15, @Deprecated boolean z16) { String str2; this.f167375u = false; Log.i("MicroMsg.MsgHandler", "callback ret:%s, make isBusy=false", str); try { m mVar = this.f167378x; if (mVar != null) { if (h1Var == null) { str2 = null; } else { str2 = h1Var.f247857c; } mVar.fl0(str2, str, h1.b(map), z15); } } catch (Exception e15) { Log.w("MicroMsg.MsgHandler", "onHandleEnd, ex = " + e15.getMessage()); } } public String r6() { m mVar = this.f167378x; if (mVar == null) { Log.i("MicroMsg.MsgHandler", "getCommitUrl, callbacker is null"); return null; } try { return mVar.x3(); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "getCommitUrl, exception = %s", e15); return null; } } public final void s5(int i15, int i16) { int i17; if (((ie1.h) j.c(ie1.h.class)).Xj0(h.c.f232339sa, 0) == 1) { i17 = 1; } else { i17 = 0; } q.INSTANCE.c(22269, "" + i15 + "," + i16 + "," + (i17 ^ 1), false, false); } public String s6() { m mVar = this.f167378x; if (mVar == null) { Log.i("MicroMsg.MsgHandler", "getCurrentUrl, callbacker is null"); return null; } try { return mVar.getCurrentUrl(); } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "getCurrentUrl, exception = %s", e15); return null; } } public final void t5(Intent intent, int i15) { Log.i("MicroMsg.MsgHandler", "chooseMediaFromAlbum"); intent.putExtra("key_pick_local_pic_capture", 4096); Context context = this.f167360d; if (!(context instanceof MMActivity)) { Log.e("MicroMsg.MsgHandler", "chooseMediaFromCamera context invalid"); return; } ((MMActivity) context).mmSetOnActivityResultCallback(this); sv3.b.o(this.f167360d, "webview", ".ui.tools.OpenFileChooserUI", intent, i15, false); } public final String t6() { String string = w6().getString("connector_local_report"); w6().remove("connector_local_report"); return string; } public final void u5(String str, Intent intent, int i15, String str2) { if (((xw.d) j.c(xw.d.class)).M1((Activity) this.f167360d, "android.permission.CAMERA", 150, "", "")) { if (i15 == 47 && Util.nullAsNil(str2).contains("video")) { boolean M1 = ((xw.d) j.c(xw.d.class)).M1((Activity) this.f167360d, "android.permission.RECORD_AUDIO", 120, "", ""); Log.i("MicroMsg.MsgHandler", " checkPermission checkMicroPhone[%b]", Boolean.valueOf(M1)); if (!M1) { return; } } Log.i("MicroMsg.MsgHandler", "chooseMediaFromCamera"); int i16 = str.equals("front") ? 16 : 256; if (!(this.f167360d instanceof MMActivity)) { Log.e("MicroMsg.MsgHandler", "chooseMediaFromCamera context invalid"); return; } intent.putExtra("key_pick_local_pic_capture", i16); ((MMActivity) this.f167360d).mmSetOnActivityResultCallback(this); sv3.b.o(this.f167360d, "webview", ".ui.tools.OpenFileChooserUI", intent, i15, false); } } public boolean u6(String str) { Log.i("MicroMsg.MsgHandler", "getFromMenu, functionName = " + str); if (!this.f167365i.contains(str)) { return false; } this.f167365i.remove(str); return true; } public final void v5(h1 h1Var) { Bundle b15 = h1.b(h1Var.f247819a); try { this.f167378x.Va0(); this.f167378x.d(b15); } catch (RemoteException e15) { Log.w("MicroMsg.MsgHandler", "SendServiceAppMsg doCloseWindow, ex = " + e15.getMessage()); } } public final Map<String, String> v6(h1 h1Var) { if (this.f167360d instanceof MMActivity) { String str = (String) h1Var.f247819a.get("appId"); String str2 = (String) h1Var.f247819a.get("sessionid"); String str3 = (String) h1Var.f247819a.get("url"); if (str2 == null || str == null || str2.isEmpty() || str.isEmpty()) { q5(h1Var, h1Var.f247863i + ":fail", new MsgHandler$$w(this)); } else { HashMap hashMap = new HashMap(); hashMap.put("appId", str); hashMap.put("sessionId", str2); hashMap.put("JSAPIFunc", h1Var.f247863i); if (str3 != null) { hashMap.put("webViewUrl", str3); } return hashMap; } } return null; } public final WXMediaMessage w5(h1 h1Var, boolean z15) { String str = (String) h1Var.f247819a.get("link"); if (str == null || str.length() == 0) { Log.e("MicroMsg.MsgHandler", "convert fail, link is null"); return null; } if (!Util.isNullOrNil((String) h1Var.f247819a.get("appid"))) { try { Bundle v65 = this.f167378x.v6(207, null); if (v65 != null && !v65.getBoolean("webview_allow_msg_tail", false)) { h1Var.f247819a.put("appid", ""); } } catch (Exception e15) { Log.e("MicroMsg.MsgHandler", "invokeAsResult ex %s", e15.getMessage()); } } String C6 = C6(str); Log.i("MicroMsg.MsgHandler", "rawurl:[%s], shareurl:[%s]", str, C6); WXMediaMessage wXMediaMessage = new WXMediaMessage(); if (z15) { WXTextObject wXTextObject = new WXTextObject(); wXTextObject.text = C6; wXMediaMessage.mediaObject = wXTextObject; } else { WXWebpageObject wXWebpageObject = new WXWebpageObject(); wXWebpageObject.webpageUrl = C6; wXWebpageObject.extInfo = (String) h1Var.f247819a.get("review_data"); wXMediaMessage.mediaObject = wXWebpageObject; } wXMediaMessage.title = (String) h1Var.f247819a.get(FFmpegMetadataRetriever.METADATA_KEY_TITLE); wXMediaMessage.description = (String) h1Var.f247819a.get("desc"); return wXMediaMessage; } public Bundle w6() { if (this.f167367n == null) { this.f167367n = new Bundle(); } return this.f167367n; } public final void x5(Context context, ArrayList<String> arrayList, Intent intent) { ArrayList arrayList2 = new ArrayList(); this.f167363g = i14.j.Q(context, hy3.h.a(context).getString(R.string.f367625yv), hy3.h.a(context).getString(R.string.g6v), true, false, new d1(this)); ((xc4.j) xc4.j.f338034d).f(new MsgHandler$$t(this, arrayList, com.tencent.mm.plugin.game.commlib.util.f.b(f.a.f125105g) + "haowan/", arrayList2, intent)); } public a0.b x6(String str) { boolean z15; String a15 = h2.a(str); a0 a0Var = this.E; if (!a0Var.f165887d.containsKey(a15) || a0Var.f165887d.get(a15) == null) { z15 = false; } else { z15 = true; } if (!z15) { return null; } return this.E.f165887d.get(a15); } public final boolean y5(JsapiPermissionWrapper jsapiPermissionWrapper, h1 h1Var, boolean z15) { Object obj = h1Var.f247819a.get("__jsapi_fw_ext_info"); String str = (String) h1Var.f247819a.get("link"); String string = obj instanceof Bundle ? ((Bundle) obj).getString("__jsapi_fw_ext_info_key_current_url") : null; if (b7(str, string) || !z15) { try { Bundle v65 = this.f167378x.v6(84, null); if (v65 != null) { if (TextUtils.isEmpty(string)) { string = C6(v65.getString("webview_current_url")); } h1Var.f247819a.put("img_url", ""); h1Var.f247819a.put("link", string); h1Var.f247819a.put("desc", v65.getString("webview_current_desc")); h1Var.f247819a.put(FFmpegMetadataRetriever.METADATA_KEY_TITLE, v65.getString("webview_current_title")); return true; } } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "invokeAsResult error : %s", e15); } } return false; } public final boolean y6(h1 h1Var) { boolean z15; n b15 = d.b(); String n65 = n6(); String str = (String) h1Var.f247819a.get("url"); String c15 = !Util.isNullOrNil(str) ? up3.b.c(str) : null; if (b15 != null) { String str2 = b15.f12717t; String c16 = up3.b.c(b15.f12713p); String str3 = b15.C; Log.i("MicroMsg.MsgHandler", "app_id:%s, musicAppId:%s", n65, str2); Log.i("MicroMsg.MsgHandler", "domain: %s, songWebDomain: %s, jsWebDomain: %s, with no port", c15, c16, str3); z15 = !TextUtils.isEmpty(n65) && n65.equalsIgnoreCase(str2); if (!TextUtils.isEmpty(c15) && c15.equalsIgnoreCase(c16)) { z15 = true; } if (!TextUtils.isEmpty(c15) && c15.equalsIgnoreCase(str3)) { z15 = true; } } else { Log.e("MicroMsg.MsgHandler", "currentWrapper is null"); z15 = false; } int i15 = z15 ? 1 : 0; int i16 = z15 ? 1 : 0; int i17 = z15 ? 1 : 0; int i18 = z15 ? 1 : 0; int i19 = z15 ? 1 : 0; Log.i("MicroMsg.MsgHandler", "getMusicPermission hasPermmision:%d", Integer.valueOf(i15)); return z15; } public final boolean z5(h1 h1Var, JsapiPermissionWrapper jsapiPermissionWrapper) { int i15; String str = (String) h1Var.f247819a.get("webtype"); String str2 = (String) h1Var.f247819a.get("username"); String str3 = (String) h1Var.f247819a.get(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE); String str4 = (String) h1Var.f247819a.get("scenenote"); String str5 = (String) h1Var.f247819a.get("profileReportInfo"); Log.i("MicroMsg.MsgHandler", "doAddContact scene = %s, sceneNote = %s", str3, str4); if (str == null || str.length() == 0 || str2 == null || str2.length() == 0) { Log.e("MicroMsg.MsgHandler", "doAddContact fail, invalid arguments, webType = " + str + ", username = " + str2); q5(h1Var, "add_contact:fail", null); return true; } f7(str3); int i16 = Util.getInt(str, -1); if (i16 == -1) { Log.e("MicroMsg.MsgHandler", "doAddContact fail, parseInt fail, str = " + str); q5(h1Var, "add_contact:fail", null); return true; } else if (!(this.f167360d instanceof Activity)) { Log.e("MicroMsg.MsgHandler", "doAddContact invalid context"); q5(h1Var, "add_contact:fail", null); return false; } else { o1.a(h1Var.f247862h, false, str2, null); if (i16 != 1) { Log.e("MicroMsg.MsgHandler", "unknown addScene = " + i16); q5(h1Var, "add_contact:fail", null); return true; } Bundle bundle = this.f167367n; if (bundle == null) { i15 = 33; } else { i15 = bundle.getInt("Contact_Scene", 33); } cu3.a aVar = new cu3.a(); aVar.f193992a = str5; aVar.f193993b = 4; aVar.f193994c = str4; aVar.f193995d = (String) h1Var.f247819a.get("finderBuffer"); ((dv3.b) ((cu3.v) j.c(cu3.v.class)).Hb(this.f167360d, str2, i15, new MsgHandler$$u(this, h1Var), aVar)).f(); return true; } } public final int z6() { Bundle v65; try { m mVar = this.f167378x; if (mVar == null || (v65 = mVar.v6(22, null)) == null) { return -1; } return v65.getInt("pay_channel"); } catch (RemoteException e15) { Log.e("MicroMsg.MsgHandler", "invokeAsResult error.%s", e15); return -1; } } }