package com.tencent.mm.plugin.appbrand.launching;

import com.tencent.mm.plugin.appbrand.appcache.WxaPkgLoadProgress;
import com.tencent.mm.sdk.platformtools.ab;

abstract class r$a implements n$b {
    private int iho;
    final /* synthetic */ r ihs;

    public abstract long aHp();

    public abstract String aHq();

    private r$a(r rVar) {
        this.ihs = rVar;
        this.iho = 0;
    }

    /* synthetic */ r$a(r rVar, byte b) {
        this(rVar);
    }

    public final void a(WxaPkgLoadProgress wxaPkgLoadProgress) {
        r.a(this.ihs);
        ab.i("MicroMsg.AppBrand.LaunchCheckPkgSplitCodeLibHandler", aHq() + " progress=" + wxaPkgLoadProgress.progress);
        long aHp = aHp();
        if (aHp == 0) {
            r.b(this.ihs).set(100);
        } else {
            r.b(this.ihs).addAndGet(Math.round(((float) Math.max(0, wxaPkgLoadProgress.progress - this.iho)) / ((float) aHp)));
        }
        this.iho = wxaPkgLoadProgress.progress;
        r.c(this.ihs);
    }
}
