package com.tencent.mm.plugin.appbrand;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.i.b;
import com.tencent.mm.plugin.appbrand.task.e;
import com.tencent.mm.plugin.appbrand.widget.c;
import com.tencent.mm.sdk.platformtools.ab;

final class j extends b {
    private final o gOq;
    volatile boolean gOr = false;
    private volatile e.b gOs;

    static class a implements com.tencent.mm.plugin.appbrand.task.e.a, com.tencent.mm.vending.e.a {
        private final e.b gOx;
        private o gOy;
        private b gOz;

        a(e.b bVar, o oVar, b bVar2) {
            AppMethodBeat.i(128956);
            this.gOx = bVar;
            this.gOy = oVar;
            this.gOz = bVar2;
            oVar.keep(this);
            AppMethodBeat.o(128956);
        }

        public final void onReady() {
            AppMethodBeat.i(128957);
            if (this.gOy == null || this.gOz == null) {
                AppMethodBeat.o(128957);
                return;
            }
            ab.i("MicroMsg.AppBrand.AppBrandRuntimeBoostStrategy[preload]", "tryPreloadBeforeResourceDone, READY!!! reason[%s], appId[%s]", new Object[]{this.gOx.name(), this.gOy.mAppId});
            this.gOz.wL();
            AppMethodBeat.o(128957);
        }

        public final void dead() {
            this.gOy = null;
            this.gOz = null;
        }
    }

    j(o oVar) {
        this.gOq = oVar;
    }

    public final void prepare() {
    }

    /* Access modifiers changed, original: final */
    public final void a(e.b bVar) {
        AppMethodBeat.i(128958);
        if (this.gOr) {
            ab.i("MicroMsg.AppBrand.AppBrandRuntimeBoostStrategy[preload]", "tryPreloadBeforeResourceDone hasPreload=TRUE, preloadReasonBefore[%s], preloadReasonNow[%s]", new Object[]{this.gOs, bVar});
            AppMethodBeat.o(128958);
            return;
        }
        this.gOr = true;
        this.gOs = bVar;
        o oVar = this.gOq;
        c cVar = oVar.gNE;
        1 1 = new 1(this, oVar, this, bVar);
        if (cVar.getAnimation() == null) {
            1.run();
            AppMethodBeat.o(128958);
            return;
        }
        cVar.iTV.add(1);
        AppMethodBeat.o(128958);
    }
}
