package com.tencent.mm.emoji.loader.e;

import a.f.b.j;
import a.l;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.emoji.loader.d.h;
import com.tencent.mm.storage.emotion.EmojiInfo;

@l(dWo = {1, 1, 13}, dWp = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\u0018\u00002\u00020\u00012\u00020\u0002B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\n\u001a\u00020\tH\u0016J\u0010\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u000eH\u0016J\b\u0010\u000f\u001a\u00020\fH\u0016R\u0014\u0010\u0006\u001a\b\u0012\u0002\b\u0003\u0018\u00010\u0007X\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\tX\u0004¢\u0006\u0002\n\u0000¨\u0006\u0010"}, dWq = {"Lcom/tencent/mm/emoji/loader/task/EmojiCoverTask;", "Lcom/tencent/mm/emoji/loader/task/IEmojiLoadTask;", "Ljava/lang/Runnable;", "emojiInfo", "Lcom/tencent/mm/storage/emotion/EmojiInfo;", "(Lcom/tencent/mm/storage/emotion/EmojiInfo;)V", "dependRequest", "Lcom/tencent/mm/emoji/loader/request/Request;", "taskKey", "", "getTaskKey", "onResult", "", "success", "", "run", "plugin-emojisdk_release"})
public final class a extends c implements Runnable {
    private final String eyl;
    private h<?> eym;

    public a(EmojiInfo emojiInfo) {
        j.p(emojiInfo, "emojiInfo");
        super(emojiInfo);
        AppMethodBeat.i(63220);
        this.eyl = emojiInfo.Aq() + "_cover";
        AppMethodBeat.o(63220);
    }

    public final String OA() {
        return this.eyl;
    }

    /* JADX WARNING: Missing block: B:31:0x00f4, code skipped:
            if (r1 == null) goto L_0x00e1;
     */
    public final void run() {
        /*
        r10 = this;
        r2 = 0;
        r9 = 63218; // 0xf6f2 float:8.8587E-41 double:3.1234E-319;
        r3 = 1;
        r4 = 0;
        r8 = 120; // 0x78 float:1.68E-43 double:5.93E-322;
        com.tencent.matrix.trace.core.AppMethodBeat.i(r9);
        super.run();
        r0 = new com.tencent.mm.emoji.loader.c.b;
        r0.<init>();
        r5 = r10.exP;
        r0 = new com.tencent.mm.emoji.loader.e.a$a;
        r0.<init>(r10);
        r0 = (a.f.a.b) r0;
        r1 = "emojiInfo";
        a.f.b.j.p(r5, r1);
        r1 = com.tencent.mm.emoji.loader.a.b.exB;
        r1 = r5.Aq();
        r1 = com.tencent.mm.emoji.loader.a.b.kR(r1);
        if (r1 == 0) goto L_0x0057;
    L_0x002e:
        r1 = r3;
    L_0x002f:
        if (r1 == 0) goto L_0x00f7;
    L_0x0031:
        r1 = "MicroMsg.EmojiCoverFetcher";
        r3 = new java.lang.StringBuilder;
        r4 = "fetch: from cache ";
        r3.<init>(r4);
        r4 = r5.Aq();
        r3 = r3.append(r4);
        r3 = r3.toString();
        com.tencent.mm.sdk.platformtools.ab.i(r1, r3);
        r1 = java.lang.Boolean.TRUE;
        r0.am(r1);
    L_0x0050:
        r0 = r2;
    L_0x0051:
        r10.eym = r0;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r9);
        return;
    L_0x0057:
        r6 = r5.awa();
        r7 = com.tencent.mm.storage.emotion.EmojiGroupInfo.yac;
        r7 = java.lang.String.valueOf(r7);
        r6 = a.f.b.j.j(r6, r7);
        if (r6 != 0) goto L_0x007f;
    L_0x0067:
        r6 = r5.getGroup();
        r7 = com.tencent.mm.storage.emotion.EmojiGroupInfo.yad;
        if (r6 == r7) goto L_0x007f;
    L_0x006f:
        r6 = r5.getGroup();
        r7 = com.tencent.mm.storage.emotion.EmojiInfo.yak;
        if (r6 == r7) goto L_0x007f;
    L_0x0077:
        r6 = r5.getGroup();
        r7 = com.tencent.mm.storage.emotion.EmojiInfo.yaj;
        if (r6 != r7) goto L_0x00c4;
    L_0x007f:
        r6 = r5.getName();
        r7 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r6);
        if (r7 != 0) goto L_0x00b6;
    L_0x0089:
        r1 = "name";
        a.f.b.j.o(r6, r1);
        r1 = ".png";
        r7 = "";
        r1 = a.k.m.i(r6, r1, r7, r4);
        r6 = com.tencent.mm.sdk.platformtools.ah.getContext();
        r7 = "MMApplicationContext.getContext()";
        a.f.b.j.o(r6, r7);
        r6 = r6.getResources();
        r7 = "drawable";
        r8 = com.tencent.mm.sdk.platformtools.ah.getPackageName();
        r1 = r6.getIdentifier(r1, r7, r8);
        r1 = com.tencent.mm.graphics.MMBitmapFactory.decodeResource(r6, r1);
    L_0x00b6:
        if (r1 == 0) goto L_0x00e1;
    L_0x00b8:
        r4 = com.tencent.mm.emoji.loader.a.b.exB;
        r4 = r5.Aq();
        com.tencent.mm.emoji.loader.a.b.c(r4, r1);
        r1 = r3;
        goto L_0x002f;
    L_0x00c4:
        r6 = r5.dvf();
        r6 = com.tencent.mm.vfs.e.ct(r6);
        if (r6 == 0) goto L_0x00b6;
    L_0x00ce:
        r1 = new android.graphics.BitmapFactory$Options;
        r1.<init>();
        r1.outWidth = r8;
        r1.outHeight = r8;
        r6 = r5.dvf();
        r1 = com.tencent.mm.sdk.platformtools.d.decodeFile(r6, r1);
        if (r1 != 0) goto L_0x00e4;
    L_0x00e1:
        r1 = r4;
        goto L_0x002f;
    L_0x00e4:
        r6 = r1.getWidth();
        if (r6 > r8) goto L_0x00f0;
    L_0x00ea:
        r6 = r1.getHeight();
        if (r6 <= r8) goto L_0x00b6;
    L_0x00f0:
        r1 = com.tencent.mm.sdk.platformtools.d.a(r1, r8, r8, r4, r3);
        if (r1 != 0) goto L_0x00b6;
    L_0x00f6:
        goto L_0x00e1;
    L_0x00f7:
        r1 = r5.field_thumbUrl;
        r1 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r1);
        if (r1 != 0) goto L_0x0152;
    L_0x00ff:
        r1 = "MicroMsg.EmojiCoverFetcher";
        r3 = new java.lang.StringBuilder;
        r4 = "loadDataImp: load by url ";
        r3.<init>(r4);
        r4 = r5.Aq();
        r3 = r3.append(r4);
        r3 = r3.toString();
        com.tencent.mm.sdk.platformtools.ab.i(r1, r3);
        r1 = new com.tencent.mm.plugin.emoji.d.a;
        r1.<init>();
        r3 = r5.field_thumbUrl;
        r3 = r1.sE(r3);
        if (r3 == 0) goto L_0x0149;
    L_0x0126:
        r1 = r3.data;
    L_0x0128:
        if (r1 == 0) goto L_0x014b;
    L_0x012a:
        r1 = r3.data;
        r1 = com.tencent.mm.sdk.platformtools.d.bQ(r1);
        r4 = com.tencent.mm.emoji.loader.a.b.exB;
        r4 = r5.Aq();
        com.tencent.mm.emoji.loader.a.b.c(r4, r1);
        r1 = r5.dvf();
        r3 = r3.data;
        com.tencent.mm.vfs.e.q(r1, r3);
        r1 = java.lang.Boolean.TRUE;
        r0.am(r1);
        goto L_0x0050;
    L_0x0149:
        r1 = r2;
        goto L_0x0128;
    L_0x014b:
        r1 = java.lang.Boolean.FALSE;
        r0.am(r1);
        goto L_0x0050;
    L_0x0152:
        r1 = "MicroMsg.EmojiCoverFetcher";
        r2 = new java.lang.StringBuilder;
        r3 = "loadDataImp: load by gif ";
        r2.<init>(r3);
        r3 = r5.Aq();
        r2 = r2.append(r3);
        r2 = r2.toString();
        com.tencent.mm.sdk.platformtools.ab.i(r1, r2);
        r1 = com.tencent.mm.emoji.loader.a.exs;
        r1 = new com.tencent.mm.emoji.loader.c.b$b;
        r1.<init>(r5, r0);
        r0 = r1;
        r0 = (com.tencent.mm.emoji.loader.d.h.a) r0;
        r0 = com.tencent.mm.emoji.loader.a.a(r5, r0);
        r0 = (com.tencent.mm.emoji.loader.d.h) r0;
        goto L_0x0051;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.tencent.mm.emoji.loader.e.a.run():void");
    }

    public final void bV(boolean z) {
        AppMethodBeat.i(63219);
        h hVar = this.eym;
        if (hVar != null) {
            hVar.cancel();
        }
        super.bV(z);
        AppMethodBeat.o(63219);
    }
}
