package com.tencent.mm.plugin.downloader.a;

import android.os.Looper;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.g.a.hg;
import com.tencent.mm.ipcinvoker.i;
import com.tencent.mm.ipcinvoker.type.IPCString;
import com.tencent.mm.pluginsdk.model.app.f;
import com.tencent.mm.pluginsdk.model.app.g;
import com.tencent.mm.pluginsdk.model.app.m;
import com.tencent.mm.sdk.b.a;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;

class c$a implements i<IPCString, IPCString> {
    private c$a() {
    }

    public final /* synthetic */ Object am(Object obj) {
        AppMethodBeat.i(67886);
        IPCString iPCString = (IPCString) obj;
        if (iPCString == null) {
            AppMethodBeat.o(67886);
            return null;
        }
        String str = iPCString.value;
        String str2 = (String) c.aEd().get(str);
        if (bo.isNullOrNil(str2)) {
            hg hgVar = new hg();
            hgVar.cCb.url = str;
            a.xxA.m(hgVar);
            str2 = hgVar.cCc.csB;
        }
        if (Looper.getMainLooper() == Looper.myLooper()) {
            ab.i("MicroMsg.GameDownloadExtension", "getOpenId invoke in main thread");
            f bT = g.bT(str2, false);
            str2 = (bT == null || bo.isNullOrNil(bT.field_openId)) ? null : bT.field_openId;
        } else {
            ab.i("MicroMsg.GameDownloadExtension", "getOpenId invoke in worker thread");
            com.tencent.mm.plugin.s.a.bYL();
            str2 = m.aiN(str2);
        }
        Object iPCString2 = new IPCString(str2);
        AppMethodBeat.o(67886);
        return iPCString2;
    }
}
