package o;

import android.content.ComponentName;
import android.content.Context;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.mV, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC1862mV {
    static {
        C0669Zu.l("PackageManagerHelper");
    }

    public static void a(Context context, Class cls, boolean z) {
        try {
            int componentEnabledSetting = context.getPackageManager().getComponentEnabledSetting(new ComponentName(context, cls.getName()));
            boolean z2 = false;
            if (componentEnabledSetting != 0 && componentEnabledSetting == 1) {
                z2 = true;
            }
            if (z == z2) {
                C0669Zu.e().getClass();
            } else {
                context.getPackageManager().setComponentEnabledSetting(new ComponentName(context, cls.getName()), z ? 1 : 2, 1);
                C0669Zu.e().getClass();
            }
        } catch (Exception unused) {
            C0669Zu.e().getClass();
        }
    }
}
