package com.google.android.exoplayer2.c.f;

import android.support.v4.widget.j;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.ytcommon.BuildConfig;

public final class v$d {
    private String bbx;
    private final String bdL;
    private final int bdM;
    private final int bdN;
    private int bdO;

    public v$d(int i, int i2) {
        this(j.INVALID_ID, i, i2);
    }

    public v$d(int i, int i2, int i3) {
        AppMethodBeat.i(95179);
        this.bdL = i != j.INVALID_ID ? i + "/" : BuildConfig.FLAVOR;
        this.bdM = i2;
        this.bdN = i3;
        this.bdO = j.INVALID_ID;
        AppMethodBeat.o(95179);
    }

    public final void rz() {
        AppMethodBeat.i(95180);
        this.bdO = this.bdO == j.INVALID_ID ? this.bdM : this.bdO + this.bdN;
        this.bbx = this.bdL + this.bdO;
        AppMethodBeat.o(95180);
    }

    public final int rA() {
        AppMethodBeat.i(95181);
        rC();
        int i = this.bdO;
        AppMethodBeat.o(95181);
        return i;
    }

    public final String rB() {
        AppMethodBeat.i(95182);
        rC();
        String str = this.bbx;
        AppMethodBeat.o(95182);
        return str;
    }

    private void rC() {
        AppMethodBeat.i(95183);
        if (this.bdO == j.INVALID_ID) {
            IllegalStateException illegalStateException = new IllegalStateException("generateNewId() must be called before retrieving ids.");
            AppMethodBeat.o(95183);
            throw illegalStateException;
        }
        AppMethodBeat.o(95183);
    }
}
