package com.tencent.mm.plugin.emoji.model;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.a.g;
import com.tencent.mm.g.a.gb;
import com.tencent.mm.plugin.emoji.b.d;
import com.tencent.mm.sdk.b.b;
import com.tencent.mm.sdk.b.c;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.storage.emotion.EmojiInfo;
import com.tencent.mm.vfs.e;
import com.tencent.mm.vfs.j;

class g$1 extends c<gb> {
    final /* synthetic */ g kVy;

    g$1(g gVar) {
        this.kVy = gVar;
        AppMethodBeat.i(53049);
        this.xxI = gb.class.getName().hashCode();
        AppMethodBeat.o(53049);
    }

    public final /* synthetic */ boolean a(b bVar) {
        AppMethodBeat.i(53050);
        gb gbVar = (gb) bVar;
        EmojiInfo emojiInfo = new EmojiInfo();
        emojiInfo.field_designerID = gbVar.cAm.cAo;
        emojiInfo.field_name = gbVar.cAm.name;
        emojiInfo.field_aeskey = gbVar.cAm.aeskey;
        emojiInfo.field_encrypturl = gbVar.cAm.cAp;
        emojiInfo.field_thumbUrl = gbVar.cAm.thumbUrl;
        emojiInfo.field_md5 = gbVar.cAm.cvZ;
        emojiInfo.field_groupId = gbVar.cAm.cwg;
        EmojiInfo aqi = j.getEmojiStorageMgr().xYn.aqi(emojiInfo.Aq());
        if (gbVar.cAm.cuy == 3) {
            String dve = emojiInfo.dve();
            if (aqi == null || (aqi.field_reserved4 & EmojiInfo.yaB) != EmojiInfo.yaB) {
                gbVar.cAn.path = dve;
            } else {
                String w = j.w(new com.tencent.mm.vfs.b(ah.getContext().getCacheDir(), g.x(gbVar.cAm.cvZ.getBytes())).dMD());
                if (e.ct(dve) && !e.ct(w)) {
                    byte[] l = ((d) com.tencent.mm.kernel.g.M(d.class)).getEmojiMgr().l(aqi);
                    e.a(w, l, l.length);
                }
                gbVar.cAn.path = w;
            }
            ab.i("MicroMsg.FTS.FTSEmojiLogic", "gen path: %s", new Object[]{gbVar.cAn.path});
        } else if (gbVar.cAm.cuy == 1) {
            ab.i("MicroMsg.FTS.FTSEmojiLogic", "emoji download: %s", new Object[]{emojiInfo.Aq()});
            this.kVy.kVv.add(emojiInfo.Aq());
            j.bkh().s(emojiInfo);
        }
        AppMethodBeat.o(53050);
        return false;
    }
}
