package com.tencent.mm.plugin.appbrand.ui; import android.app.Activity; import android.content.Context; import android.content.Intent; import ck.q; import com.tencent.mm.R; import com.tencent.mm.plugin.appbrand.service.d1; import com.tencent.mm.plugin.appbrand.shortlink.AbsWxaShortLinkLauncher; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MMHandlerThread; import java.lang.ref.WeakReference; import java.util.Arrays; import kv3.h0; import lw0.l; import lw0.m; import mw0.a; import om0.o; import p64.i0; import sv3.b; import wg4.b0; import yz3.j; public final class w extends AbsWxaShortLinkLauncher { /* renamed from: b reason: collision with root package name */ public final /* synthetic */ h0.b f96184b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ int f96185c; /* renamed from: d reason: collision with root package name */ public final /* synthetic */ String f96186d; /* renamed from: e reason: collision with root package name */ public final /* synthetic */ AppBrandCheckWxaShortLinkUI f96187e; /* renamed from: f reason: collision with root package name */ public final /* synthetic */ WeakReference<AppBrandCheckWxaShortLinkUI> f96188f; public w(h0.b bVar, int i15, String str, AppBrandCheckWxaShortLinkUI appBrandCheckWxaShortLinkUI, WeakReference<AppBrandCheckWxaShortLinkUI> weakReference) { this.f96184b = bVar; this.f96185c = i15; this.f96186d = str; this.f96187e = appBrandCheckWxaShortLinkUI; this.f96188f = weakReference; } @Override // com.tencent.mm.plugin.appbrand.shortlink.AbsWxaShortLinkLauncher public l a() { return m.f256869a; } @Override // com.tencent.mm.plugin.appbrand.shortlink.AbsWxaShortLinkLauncher public void b(Context context, AbsWxaShortLinkLauncher.WxaShortLinkLaunchParams wxaShortLinkLaunchParams, kh4.l<? super Boolean, b0> lVar) { lh4.m.g(context, "ctx"); lh4.m.g(wxaShortLinkLaunchParams, "params"); lh4.m.g(lVar, "launchResultCallback"); o oVar = new o(); h0.b bVar = this.f96184b; int i15 = this.f96185c; String str = this.f96186d; oVar.f277592b = wxaShortLinkLaunchParams.f94812d; oVar.f277596f = wxaShortLinkLaunchParams.f94813e; oVar.f277594d = wxaShortLinkLaunchParams.f94814f; oVar.f277593c = wxaShortLinkLaunchParams.f94815g; oVar.I = wxaShortLinkLaunchParams.f94816h; oVar.f277601k = bVar.f249451d; oVar.f277603m = bVar.f249452e; oVar.J = i15; oVar.f277602l = str; Log.i("MicroMsg.AppBrandCheckWxaShortLinkUI", "launchWxa appId=" + oVar.f277592b + " \nenterPath=" + oVar.f277596f + " \nversion=" + oVar.f277594d + " \nversionType=" + oVar.f277593c + " \nshortLink=" + oVar.I + " \nscene=" + oVar.f277601k + " \nprescene=" + oVar.f277603m + '\n'); ((d1) j.c(d1.class)).r80(context, oVar); lVar.invoke(Boolean.TRUE); } @Override // com.tencent.mm.plugin.appbrand.shortlink.AbsWxaShortLinkLauncher public boolean d(Activity activity, boolean z15) { lh4.m.g(activity, "ctx"); AppBrandCheckWxaShortLinkUI appBrandCheckWxaShortLinkUI = this.f96188f.get(); if (appBrandCheckWxaShortLinkUI == null) { return false; } if (appBrandCheckWxaShortLinkUI.f95177g.get()) { Log.i("MicroMsg.AppBrandCheckWxaShortLinkUI", "CgiCheckWxaShortLink callback , timeout, ignore cgi result"); return false; } Runnable runnable = this.f96187e.f95176f; if (runnable != null) { MMHandlerThread.removeRunnable(runnable); } i0 i0Var = this.f96187e.f95175e; if (i0Var != null) { i0Var.dismiss(); } if (!z15) { Log.i("MicroMsg.AppBrandCheckWxaShortLinkUI", "CgiCheckWxaShortLink CGI fail , go to fail H5 page"); Intent intent = new Intent(); String format = String.format("https://mp.weixin.qq.com/mp/waerrpage?appid=wx40f8626ddf43d362&type=tips&title=%s&msg=%s#wechat_redirect", Arrays.copyOf(new Object[]{q.b(activity.getString(R.string.f367691a50), "UTF-8"), q.b(activity.getString(R.string.a4z), "UTF-8")}, 2)); lh4.m.f(format, "format(format, *args)"); intent.putExtra("rawUrl", format); intent.putExtra("forceHideShare", true); b.j(this.f96187e.getContext(), "webview", ".ui.tools.WebViewUI", intent, null); } return true; } public a f() { return this.f96187e.U7(this.f96184b); } }