package V2;

import a.AbstractC0872a;
import android.content.Context;
import android.content.SharedPreferences;

/* JADX INFO: loaded from: classes.dex */
public abstract class z3 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final Y4.c0 f8212a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final Y4.J f8213b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static volatile boolean f8214c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final Object f8215d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static boolean f8216e;

    static {
        V4.D0 d0D = V4.E.d();
        c5.e eVar = V4.N.f8259a;
        a5.c cVarC = V4.E.c(AbstractC0872a.a0(d0D, a5.m.f10845a.f8429e));
        Y4.c0 c0VarC = Y4.O.c(null);
        f8212a = c0VarC;
        f8213b = Y4.O.o(new y3(c0VarC), cVarC, Y4.S.f8899a, "main");
        f8215d = new Object();
    }

    public static String a(Context context) {
        kotlin.jvm.internal.o.h(context, "context");
        String string = context.getApplicationContext().getSharedPreferences("debridstream_startup_flow", 0).getString("last_selected_profile_key", null);
        f8212a.j(string);
        return string;
    }

    public static void b(Context context) {
        synchronized (f8215d) {
            if (f8216e) {
                return;
            }
            context.getApplicationContext().getSharedPreferences("debridstream_startup_flow", 0).edit().remove("continue_without_pro").apply();
            f8216e = true;
        }
    }

    public static void c(Context context, String str) {
        kotlin.jvm.internal.o.h(context, "context");
        SharedPreferences.Editor editorEdit = context.getApplicationContext().getSharedPreferences("debridstream_startup_flow", 0).edit();
        if (str == null) {
            editorEdit.remove("last_selected_profile_key");
        } else {
            editorEdit.putString("last_selected_profile_key", str);
        }
        editorEdit.apply();
        f8212a.j(str);
    }
}
