package com.bytedance.android.livesdk.util.rxutils;

import X.0Bt;
import X.0CM;
import X.2cN;
import X.Mjy;
import X.Pkb;
import X.SRf;
import android.util.Pair;
import androidx.lifecycle.LiveData;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import java.util.List;

public class RxViewModel extends 0Bt {
    public final Mjy LIZ = new Mjy();
    public final List<Pair<LiveData, 0CM>> LIZIZ = new ArrayList();
    public final Pkb<SRf> LJJIIZ = new Pkb<>();

    static {
        Covode.recordClassIndex(21372);
    }

    public void onCleared() {
        this.LIZ.LIZ();
        for (Pair next : this.LIZIZ) {
            ((LiveData) next.first).removeObserver((0CM) next.second);
        }
        this.LIZIZ.clear();
        this.LJJIIZ.onNext(SRf.DESTROY);
    }

    public final void LIZ(2cN r2) {
        this.LIZ.LIZ(r2);
    }
}
