package com.bytedance.sdk.component.wu.fm;

import android.os.HandlerThread;
import com.bytedance.sdk.component.utils.mq;
import java.lang.ref.WeakReference;

/* JADX INFO: loaded from: classes.dex */
public class ro extends mq implements lb {
    private final HandlerThread ro;

    public ro(HandlerThread handlerThread, mq.fm fmVar) {
        super(handlerThread.getLooper(), fmVar);
        this.ro = handlerThread;
    }

    @Override // com.bytedance.sdk.component.wu.fm.lb
    public void fm() {
        removeCallbacksAndMessages(null);
        WeakReference<mq.fm> weakReference = this.fm;
        if (weakReference != null) {
            weakReference.clear();
            this.fm = null;
        }
    }

    public void ro() {
        HandlerThread handlerThread = this.ro;
        if (handlerThread != null) {
            handlerThread.quit();
        }
    }

    public void fm(mq.fm fmVar) {
        this.fm = new WeakReference<>(fmVar);
    }
}
