package com.bytedance.sdk.openadsdk.component.reward;

import android.annotation.SuppressLint;
import android.content.Context;
import android.text.TextUtils;
import com.bytedance.sdk.openadsdk.AdSlot;
import com.bytedance.sdk.openadsdk.core.model.lse;

/* JADX INFO: loaded from: classes2.dex */
public class irt {

    @SuppressLint({"StaticFieldLeak"})
    private static volatile irt fm;
    private final Context ro;

    private irt(Context context) {
        this.ro = context == null ? com.bytedance.sdk.openadsdk.core.gof.fm() : context.getApplicationContext();
    }

    public void fm(String str, lse lseVar) {
        com.bytedance.sdk.openadsdk.common.ro.fm("sp_reward_video_new").fm(str, lseVar);
    }

    public void fm() {
        com.bytedance.sdk.openadsdk.common.ro.fm("sp_reward_video_new").fm();
    }

    public void fm(AdSlot adSlot, com.bytedance.sdk.openadsdk.core.model.fm fmVar) {
        if (fmVar == null || fmVar.wsy() == null || !fmVar.wsy().emt()) {
            com.bytedance.sdk.openadsdk.common.ro.fm("sp_reward_video_new").fm(adSlot, fmVar);
        }
    }

    public static irt fm(Context context) {
        if (fm == null) {
            synchronized (irt.class) {
                try {
                    if (fm == null) {
                        fm = new irt(context);
                    }
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
        return fm;
    }

    public String fm(String str, boolean z10) {
        com.bytedance.sdk.openadsdk.common.ro roVarFm = com.bytedance.sdk.openadsdk.common.ro.fm("sp_reward_video_new");
        String strFm = roVarFm.fm(str, 10500000L);
        if (z10 && !TextUtils.isEmpty(strFm) && roVarFm.yz(str)) {
            return null;
        }
        return strFm;
    }

    public boolean fm(com.bytedance.sdk.openadsdk.core.model.fm fmVar) {
        return com.bytedance.sdk.openadsdk.common.ro.fm("sp_reward_video_new").fm(fmVar, true);
    }

    public void fm(String str) {
        com.bytedance.sdk.openadsdk.common.ro.fm("sp_reward_video_new").lb(str);
    }
}
