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


package com.tencent.mm.plugin.webview.stub;

import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import ap3.a;
import bg0.l;
import bg0.q;
import bg0.r;
import bg0.s;
import bg0.w0;
import com.tencent.mm.R;
import com.tencent.mm.app.w1;
import com.tencent.mm.autogen.events.NotifyStartWebViewParamsEvent;
import com.tencent.mm.autogen.mmdata.rpt.ChatImageWebSearchActionStruct;
import com.tencent.mm.booter.notification.MMNotification;
import com.tencent.mm.plugin.webview.stub.WebViewStubService;
import com.tencent.mm.plugin.webview.ui.tools.WebViewLongClickHelper;
import com.tencent.mm.plugin.webview.ui.tools.jsapi.MsgHandler;
import com.tencent.mm.plugin.webview.ui.tools.jsapi.y3;
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.Util;
import com.tencent.mm.storage.f4;
import com.tencent.mm.storage.g4;
import com.tencent.mm.storage.h2;
import com.tencent.mm.storage.i2;
import com.tencent.wechat.aff.ting.TingProto;
import cu3.m;
import d60.z;
import eo0.f;
import i14.y0;
import ih.c;
import java.util.HashSet;
import jh2.k0;
import jo3.l1;
import jo3.p;
import jo3.v;
import ms.e;
import np2.d;
import sv3.b;
import yv3.h;
import yz3.j;

public class WebViewStubService$a$$b implements Runnable {

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

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

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

    /* renamed from: g  reason: collision with root package name */
    public final /* synthetic */ WebViewStubService.a f166045g;

    public WebViewStubService$a$$b(WebViewStubService.a aVar, int i15, Bundle bundle, int i16) {
        this.f166045g = aVar;
        this.f166042d = i15;
        this.f166043e = bundle;
        this.f166044f = i16;
    }

    public void run() {
        h2 M;
        int i15 = this.f166042d;
        if (i15 == 20) {
            this.f166043e.setClassLoader(WebViewStubService$a$$b.class.getClassLoader());
            y3.a(this.f166044f).f167367n = this.f166043e.getBundle("jsapiargs");
            String str = (String) this.f166043e.getCharSequence("bizofstartfrom");
            Bundle bundle = this.f166043e.getBundle("startwebviewparams");
            if (!(str == null || bundle == null)) {
                NotifyStartWebViewParamsEvent notifyStartWebViewParamsEvent = new NotifyStartWebViewParamsEvent();
                NotifyStartWebViewParamsEvent.a aVar = notifyStartWebViewParamsEvent.f63690d;
                aVar.f63691a = str;
                aVar.f63692b = bundle;
                notifyStartWebViewParamsEvent.publish();
            }
            WebViewStubService.this.f166037w = this.f166043e.getInt("screen_orientation", -1);
        } else if (i15 != 21) {
            boolean z15 = false;
            if (i15 == 29) {
                String string = this.f166043e.getString("srcUsername");
                w0.gO0().getClass();
                if (!Util.isNullOrNil(string) && l.n(string)) {
                    c b15 = l.b(string);
                    if (b15.w2(false) != null && b15.w2(false).d() != null && !Util.isNullOrNil(b15.u2()) && (M = ((i2) ((k0) z.q(k0.class)).SM()).M(b15.u2())) != null && M.getUsername().equals(string) && M.M2() > 0) {
                        ((i2) ((k0) z.q(k0.class)).SM()).q0(b15.u2());
                    }
                    Cursor ZL = ((g4) ((k0) z.q(k0.class)).WU()).ZL(string);
                    ZL.moveToFirst();
                    while (!ZL.isAfterLast()) {
                        f4 f4Var = new f4();
                        f4Var.convertFrom(ZL);
                        f4Var.c(4);
                        ZL.moveToNext();
                        z15 = true;
                    }
                    ZL.close();
                    if (z15) {
                        ((i2) ((k0) z.q(k0.class)).SM()).q0(string);
                        ((g4) ((k0) z.q(k0.class)).WU()).mF0(string);
                    }
                }
                w0.gO0().getClass();
                if (!Util.isNullOrNil(string) && l.n(string)) {
                    ((MMNotification) ((d) j.c(d.class)).BF()).f72897b = string;
                    ((MMNotification) ((d) j.c(d.class)).BF()).e();
                }
                w0.dO0().getClass();
                if (!Util.isNullOrNil(string) && l.n(string)) {
                    q dO0 = w0.dO0();
                    dO0.getClass();
                    ((xc4.j) xc4.j.f338034d).f(new r(dO0, null, string, null, 0));
                }
            } else if (i15 == 30) {
                String string2 = this.f166043e.getString("srcUsername");
                w0.gO0().getClass();
                if (!Util.isNullOrNil(string2) && l.n(string2)) {
                    ((MMNotification) ((d) j.c(d.class)).BF()).f72897b = "";
                }
                w0.dO0().getClass();
                if (!Util.isNullOrNil(string2) && l.n(string2)) {
                    q dO02 = w0.dO0();
                    dO02.getClass();
                    ((xc4.j) xc4.j.f338034d).f(new s(dO02, null, string2));
                }
            } else if (i15 == 53) {
                v vVar = new v();
                vVar.f242514b = WebViewStubService.this;
                vVar.f242519g = this.f166043e.getString("web_search_data_ui_image_path");
                vVar.f242516d = this.f166043e.getInt("KWebSearchSendDataImagePath_from_source");
                vVar.f242521i = 83;
                vVar.f242513a = WebViewLongClickHelper.f166395s;
                WebViewLongClickHelper.f166395s = 0;
                ((p) j.c(p.class)).G8(vVar);
            } else if (i15 != 54) {
                switch (i15) {
                    case 1:
                        WebViewStubService.a(WebViewStubService.this, 2, this.f166043e, this.f166044f);
                        return;
                    case 2:
                        y0.i(WebViewStubService.this, null);
                        return;
                    case 3:
                        Bundle bundle2 = new Bundle();
                        bundle2.putInt("stat_scene", 4);
                        MsgHandler a15 = y3.a(this.f166044f);
                        if (a15 != null) {
                            bundle2.putString("stat_url", a15.s6());
                        }
                        WebViewStubService.a aVar2 = this.f166045g;
                        WebViewStubService.this.f166028n.post(new e(aVar2, this.f166043e, bundle2));
                        return;
                    case 4:
                        WebViewStubService.a(WebViewStubService.this, 3, this.f166043e, this.f166044f);
                        return;
                    case 5:
                        int i16 = this.f166043e.getInt("scene_end_type", 0);
                        int i17 = this.f166043e.getInt("scene_end_listener_hash_code", -1);
                        if (i17 != -1) {
                            ((HashSet) WebViewStubService.this.f166036v).add(Integer.valueOf(i17));
                        }
                        Log.i("MicroMsg.WebViewStubService", "add Scene end, type:[%d] hashCode:[%d], set_size:[%d], before_inc_count[%d]", Integer.valueOf(i16), Integer.valueOf(i17), Integer.valueOf(((HashSet) WebViewStubService.this.f166036v).size()), Integer.valueOf(WebViewStubService.this.f166027j));
                        if (i16 > 0) {
                            WebViewStubService.this.f166027j++;
                            Log.i("MicroMsg.WebViewStubService", "real add Scene end, hashCode:[%d]", Integer.valueOf(i17));
                            z.d().a(TingProto.TingScene.TingScene_SingerWikiHalfScreen_VALUE, WebViewStubService.this);
                            z.d().a(673, WebViewStubService.this);
                            z.d().a(f.CTRL_INDEX, WebViewStubService.this);
                            return;
                        }
                        return;
                    case 6:
                        int i18 = this.f166043e.getInt("scene_end_type", 0);
                        int i19 = this.f166043e.getInt("scene_end_listener_hash_code", -1);
                        if (i19 != -1) {
                            ((HashSet) WebViewStubService.this.f166036v).remove(Integer.valueOf(i19));
                        }
                        Log.i("MicroMsg.WebViewStubService", "remove Scene end, type:[%d] hashCode:[%d], set_size:[%d], before_dec_count:[%d]", Integer.valueOf(i18), Integer.valueOf(i19), Integer.valueOf(((HashSet) WebViewStubService.this.f166036v).size()), Integer.valueOf(WebViewStubService.this.f166027j));
                        if (i18 > 0) {
                            WebViewStubService webViewStubService = WebViewStubService.this;
                            int i25 = webViewStubService.f166027j - 1;
                            webViewStubService.f166027j = i25;
                            if (i25 < 0) {
                                Log.e("MicroMsg.WebViewStubService", "remove Scene end, type:[%d] hashCode:[%d], set size:[%d], unexpected_count[%d]", Integer.valueOf(i18), Integer.valueOf(i19), Integer.valueOf(((HashSet) WebViewStubService.this.f166036v).size()), Integer.valueOf(WebViewStubService.this.f166027j));
                                WebViewStubService.this.f166027j = 0;
                            }
                            WebViewStubService webViewStubService2 = WebViewStubService.this;
                            if (webViewStubService2.f166027j <= 0 && ((HashSet) webViewStubService2.f166036v).size() <= 0) {
                                Log.i("MicroMsg.WebViewStubService", "real remove Scene end, hashCode:[%d]", Integer.valueOf(i19));
                                if (z.a()) {
                                    z.d().p(TingProto.TingScene.TingScene_SingerWikiHalfScreen_VALUE, WebViewStubService.this);
                                    z.d().p(673, WebViewStubService.this);
                                    z.d().p(f.CTRL_INDEX, WebViewStubService.this);
                                    return;
                                }
                                return;
                            }
                            return;
                        }
                        return;
                    case 7:
                        Intent intent = new Intent();
                        intent.putExtra("MMActivity.OverrideEnterAnimation", 0);
                        intent.putExtra("MMActivity.OverrideExitAnimation", R.anim.f357341dd);
                        intent.addFlags(268435456);
                        cu3.z zVar = a.f7840a;
                        WebViewStubService webViewStubService3 = WebViewStubService.this;
                        ((w1) zVar).getClass();
                        Intent intent2 = new Intent();
                        intent2.putExtras(intent.getExtras());
                        if (intent.getFlags() != 0) {
                            intent2.addFlags(intent.getFlags());
                        }
                        String str2 = m.f194043a;
                        if (!nf0.w0.V()) {
                            m.i(webViewStubService3, h.a());
                            return;
                        } else {
                            m.j(MMApplicationContext.getContext(), h.a());
                            return;
                        }
                    case 8:
                        Intent intent3 = new Intent();
                        intent3.putExtras(this.f166043e);
                        intent3.addFlags(268435456);
                        cu3.z zVar2 = a.f7840a;
                        WebViewStubService webViewStubService4 = WebViewStubService.this;
                        ((w1) zVar2).getClass();
                        if (webViewStubService4 != null) {
                            Intent intent4 = new Intent();
                            intent4.putExtras(intent3.getExtras());
                            if (intent3.getFlags() != 0) {
                                intent4.addFlags(intent3.getFlags());
                            }
                            b.j(webViewStubService4, "subapp", ".ui.pluginapp.ContactSearchUI", intent4, null);
                            return;
                        }
                        return;
                    default:
                        Log.e("MicroMsg.WebViewStubService", "not support action code:[%d]", Integer.valueOf(i15));
                        return;
                }
            } else {
                String string3 = this.f166043e.getString("web_search_data_ui_image_path_origin_url");
                String string4 = this.f166043e.getString("web_search_data_ui_image_path");
                long Gy0 = ((e) j.c(e.class)).Gy0(67);
                WebViewLongClickHelper.f166395s = Gy0;
                String c15 = b62.h.c(Gy0);
                int i26 = (Util.isNullOrNil(string3) || (!string3.startsWith("http://mp.weixin.qq.com/s?") && !string3.startsWith("https://mp.weixin.qq.com/s?") && !string3.startsWith("http://mp.weixin.qq.com/s/") && !string3.startsWith("https://mp.weixin.qq.com/s/"))) ? 14 : 11;
                ChatImageWebSearchActionStruct chatImageWebSearchActionStruct = new ChatImageWebSearchActionStruct();
                chatImageWebSearchActionStruct.w(c15);
                chatImageWebSearchActionStruct.u("");
                chatImageWebSearchActionStruct.f65879f = i26;
                chatImageWebSearchActionStruct.f65878e = 1;
                chatImageWebSearchActionStruct.f65880g = 83;
                chatImageWebSearchActionStruct.t("");
                chatImageWebSearchActionStruct.s("");
                chatImageWebSearchActionStruct.f65883j = 0;
                chatImageWebSearchActionStruct.v(MD5Util.getMD5String(string4));
                chatImageWebSearchActionStruct.f65886m = System.currentTimeMillis();
                chatImageWebSearchActionStruct.n();
                l1.l(chatImageWebSearchActionStruct);
            }
        } else {
            y3.a(this.f166044f).w6().putAll(this.f166043e);
        }
    }
}