package com.tencent.mm.plugin.translate;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.g.a.th;
import com.tencent.mm.plugin.translate.a.2;
import com.tencent.mm.plugin.translate.a.c;
import com.tencent.mm.sdk.platformtools.ab;
import java.util.LinkedList;

class a$2$1 implements Runnable {
    final /* synthetic */ th sKt;
    final /* synthetic */ 2 sKu;

    a$2$1(2 2, th thVar) {
        this.sKu = 2;
        this.sKt = thVar;
    }

    public final void run() {
        AppMethodBeat.i(26050);
        c cVar = this.sKu.sKq.sKl;
        String str = this.sKt.cPy.cPz;
        String str2 = this.sKt.cPy.id;
        int i = this.sKt.cPy.type;
        String str3 = this.sKt.cPy.source;
        boolean z = this.sKt.cPy.cPA;
        byte[] bArr = this.sKt.cPy.cPB;
        ab.d("MicroMsg.TranslateServiceManager", "doTranslate msgId : %s, type: %d", new Object[]{str2, Integer.valueOf(i)});
        if (cVar.abQ(str2)) {
            ab.d("MicroMsg.TranslateServiceManager", "doTranslate msgId %s is inQueue", new Object[]{str2});
            AppMethodBeat.o(26050);
            return;
        }
        c.c cVar2 = new c.c(str, str2, i, str3, bArr);
        if (z) {
            ((LinkedList) cVar.sKx).add(0, cVar2);
        } else {
            cVar.sKx.add(cVar2);
        }
        cVar.sKy.put(cVar2.id, Integer.valueOf(cVar2.sKB));
        ab.d("MicroMsg.TranslateServiceManager", "requestCount : %s", new Object[]{Integer.valueOf(cVar.exv)});
        cVar.cHI();
        AppMethodBeat.o(26050);
    }
}
