package com.tencent.mm.loader.g;

import a.f.a.a;
import a.f.b.j;
import a.f.b.k;
import a.l;
import a.v;
import a.y;
import com.tencent.mm.loader.g.d.c;
import com.tencent.mm.sdk.platformtools.ab;

@l(dWo = {1, 1, 13}, dWp = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001\"\b\b\u0000\u0010\u0002*\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, dWq = {"<anonymous>", "", "T", "Lcom/tencent/mm/loader/loader/IWorkTask;", "invoke"})
final class d$c$1 extends k implements a<y> {
    final /* synthetic */ c eRd;
    final /* synthetic */ c eRe;
    final /* synthetic */ h eRf;

    d$c$1(c cVar, c cVar2, h hVar) {
        this.eRd = cVar;
        this.eRe = cVar2;
        this.eRf = hVar;
        super(0);
    }

    public final /* synthetic */ Object invoke() {
        Object obj;
        c cVar;
        h hVar;
        ab.i("MicroMsg.Loader.DefaultTaskLoader", d.c(this.eRd.eRa) + "workStatus change work " + this.eRe + " getStatus: " + this.eRf);
        for (Object next : d.e(this.eRd.eRa)) {
            if (j.j(((c) ((g) next).first).Pc(), this.eRe.Pc())) {
                obj = next;
                break;
            }
        }
        obj = null;
        g gVar = (g) obj;
        if (gVar != null) {
            d.e(this.eRd.eRa).remove(gVar);
            f fVar = (f) gVar.second;
            if (fVar != null) {
                cVar = this.eRe;
                if (cVar == null) {
                    throw new v("null cannot be cast to non-null type T");
                }
                hVar = this.eRf;
                j.o(hVar, "status");
                fVar.a(cVar, hVar);
            }
        }
        d dVar = this.eRd.eRa;
        cVar = this.eRe;
        j.o(cVar, "work");
        hVar = this.eRf;
        j.o(hVar, "status");
        d.a(dVar, cVar, hVar);
        h hVar2 = this.eRf;
        if (hVar2 != null) {
            switch (e.eQZ[hVar2.ordinal()]) {
                case 1:
                    ab.i("MicroMsg.Loader.DefaultTaskLoader", d.c(this.eRd.eRa) + "workStat wait");
                    break;
            }
        }
        d.f(this.eRd.eRa);
        return y.AUy;
    }
}
