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


package ej;

import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import bj.d0;
import com.tencent.mm.app.y0;
import com.tencent.mm.chatroom.storage.GroupToolItem;
import com.tencent.mm.chatroom.ui.RoomAccessVerifyApplicationUI;
import com.tencent.mm.message.l;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.sdk.storage.sql.MultiCondition;
import com.tencent.mm.sdk.storage.sql.SingleTable;
import com.tencent.mm.storage.f4;
import com.tencent.mm.storage.g4;
import com.tencent.mm.storage.z1;
import d60.z;
import hj.c;
import hj.f;
import java.util.LinkedList;
import java.util.List;
import jh2.k0;
import k30.a;
import mi.j8;
import om0.o;
import yz3.e;
import yz3.j;
import zz3.b;

@b(onProcess = {y0.MATCH_APPBRAND, y0.MATCH_MM})
public class d extends e implements c {

    /* renamed from: d  reason: collision with root package name */
    public hj.d f207690d = null;

    /* renamed from: e  reason: collision with root package name */
    public aj.e f207691e = null;

    /* renamed from: f  reason: collision with root package name */
    public f f207692f = null;

    /* renamed from: g  reason: collision with root package name */
    public volatile aj.d f207693g = null;

    /* renamed from: h  reason: collision with root package name */
    public hj.b f207694h = null;

    @Override // ej.c
    public int Cp0(String str, long j15) {
        SingleTable singleTable = j8.f262242o;
        LinkedList linkedList = new LinkedList();
        LinkedList linkedList2 = new LinkedList();
        LinkedList linkedList3 = new LinkedList();
        MultiCondition and = new MultiCondition(j8.f262244q.equal(str)).and(j8.f262247t.equal((Number) 0).and(j8.f262246s.equal((Number) 0)));
        linkedList2.add(j8.f262248u.orderDesc());
        List multiQuery = j8.f262242o.select(linkedList).where(and).orderBy(linkedList2).groupBy(linkedList3).build().multiQuery(z.s().f198648i, j8.class);
        if (multiQuery.size() <= 0 || ((j8) multiQuery.get(0)).field_updateTime <= j15) {
            return 0;
        }
        return multiQuery.size();
    }

    public void VN0(o oVar, c cVar) {
        f4 ZB;
        String content;
        l.b v15;
        if (cVar != null) {
            String str = cVar.field_shareKey;
            String str2 = cVar.field_shareName;
            if (!(!TextUtils.isEmpty(str) || !TextUtils.isEmpty(str2) || cVar.r2() == 0 || (content = (ZB = ((g4) ((k0) z.q(k0.class)).WU()).ZB(cVar.field_roomname, cVar.r2())).getContent()) == null || (v15 = l.b.v(nf0.f4.l(true, content, ZB.y2()), null)) == null)) {
                str = v15.f76877k2;
                str2 = cVar.field_roomname;
            }
            oVar.f277614x = str;
            oVar.f277615y = str2;
        }
    }

    public hj.b WN0() {
        z.b().c();
        if (this.f207694h == null) {
            z.h();
            this.f207694h = new hj.b(z.s().f198648i);
        }
        return this.f207694h;
    }

    /* JADX WARNING: Code restructure failed: missing block: B:17:0x0037, code lost:
        if ((r0.f76866i == 44) != false) goto L_0x0039;
     */
    @Override // ej.c
    public void XM0(f4 f4Var) {
        hj.e c15;
        if (z1.U5(f4Var.i())) {
            GroupToolItem groupToolItem = null;
            l.b v15 = l.b.v(f4Var.getContent(), null);
            if (v15 != null && (c15 = d0.c(f4Var.i())) != null && c15.field_queryState != 0) {
                if (!uf0.c.a(v15)) {
                }
                groupToolItem = d0.b(f4Var);
                if (d0.d(f4Var)) {
                    groupToolItem = new GroupToolItem("roomaa@app.origin", "", f4Var.getCreateTime());
                }
                if (groupToolItem != null) {
                    c15.q2(groupToolItem);
                    Log.i("MicroMsg.roomtools.PluginChatroomUI", "handleGroupToolByReceiverAppMsg room:%s result:%s", f4Var.i(), Boolean.valueOf(((d) j.c(d.class)).YN0().update(c15, new String[0])));
                }
            }
        }
    }

    public hj.d XN0() {
        z.b().c();
        if (this.f207690d == null) {
            z.h();
            this.f207690d = new hj.d(z.s().f198648i);
        }
        return this.f207690d;
    }

    public f YN0() {
        z.b().c();
        if (this.f207692f == null) {
            z.h();
            this.f207692f = new f(z.s().f198648i);
        }
        return this.f207692f;
    }

    public aj.d ZN0() {
        z.b().c();
        if (this.f207693g == null) {
            synchronized (this) {
                if (this.f207693g == null) {
                    this.f207693g = new aj.d();
                }
            }
        }
        return this.f207693g;
    }

    @Override // ej.c
    public void Zj0(String str) {
        RoomAccessVerifyApplicationUI.f73332i.a(str);
    }

    public aj.e aO0() {
        z.b().c();
        if (this.f207691e == null) {
            this.f207691e = new aj.e();
        }
        return this.f207691e;
    }

    @Override // ej.c
    public void ej0(Context context, String str, boolean z15) {
        Intent intent = new Intent(context, RoomAccessVerifyApplicationUI.class);
        intent.putExtra("intent_chatroom_username", str);
        intent.putExtra("intent_from_chattingui", z15);
        a aVar = new a();
        aVar.c(intent);
        j30.a.d(context, aVar.b(), "com/tencent/mm/chatroom/plugin/PluginChatroomUI", "gotoRoomAccessVerifyApplicationUI", "(Landroid/content/Context;Ljava/lang/String;Z)V", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
        context.startActivity((Intent) aVar.a(0));
        j30.a.e(context, "com/tencent/mm/chatroom/plugin/PluginChatroomUI", "gotoRoomAccessVerifyApplicationUI", "(Landroid/content/Context;Ljava/lang/String;Z)V", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
    }

    @Override // ej.c
    public void kx(f4 f4Var) {
        l.b v15;
        String str;
        if (z1.U5(f4Var.i()) && (v15 = l.b.v(f4Var.getContent(), null)) != null) {
            com.tencent.mm.message.a aVar = (com.tencent.mm.message.a) v15.x(com.tencent.mm.message.a.class);
            if (Util.isNullOrNil(aVar.f76727r)) {
                str = "related_msgid_" + f4Var.E2();
            } else {
                str = aVar.f76727r;
            }
            if (((d) j.c(d.class)).XN0().Sa(f4Var.i(), str) != null) {
                f4 tz4 = ((g4) ((k0) z.q(k0.class)).WU()).tz(f4Var.getMsgId());
                tz4.W2(str);
                ((g4) ((k0) z.q(k0.class)).WU()).CA0(tz4.getMsgId(), tz4);
            }
        }
    }
}