package X6FRs_4.IMuAHx_6.X6FRs_4;

import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Process;
import android.util.TypedValue;
import java.io.File;
/* compiled from: ContextCompat.java */
/* loaded from: classes.dex */
public class KQgRr5e_0 {
    public static TypedValue KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public static final Object f513KQgRr5e_0 = new Object();

    public static boolean KQgRr5e_0(Context context, Intent[] intentArr, Bundle bundle) {
        if (Build.VERSION.SDK_INT >= 16) {
            context.startActivities(intentArr, bundle);
            return true;
        }
        context.startActivities(intentArr);
        return true;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static File[] m333KQgRr5e_0(Context context, String str) {
        return Build.VERSION.SDK_INT >= 19 ? context.getExternalFilesDirs(str) : new File[]{context.getExternalFilesDir(str)};
    }

    public static File[] KQgRr5e_0(Context context) {
        return Build.VERSION.SDK_INT >= 19 ? context.getExternalCacheDirs() : new File[]{context.getExternalCacheDir()};
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static Drawable m332KQgRr5e_0(Context context, int i) {
        int i2;
        int i3 = Build.VERSION.SDK_INT;
        if (i3 >= 21) {
            return context.getDrawable(i);
        }
        if (i3 >= 16) {
            return context.getResources().getDrawable(i);
        }
        synchronized (f513KQgRr5e_0) {
            if (KQgRr5e_0 == null) {
                KQgRr5e_0 = new TypedValue();
            }
            context.getResources().getValue(i, KQgRr5e_0, true);
            i2 = KQgRr5e_0.resourceId;
        }
        return context.getResources().getDrawable(i2);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static ColorStateList m331KQgRr5e_0(Context context, int i) {
        if (Build.VERSION.SDK_INT >= 23) {
            return context.getColorStateList(i);
        }
        return context.getResources().getColorStateList(i);
    }

    public static int KQgRr5e_0(Context context, int i) {
        if (Build.VERSION.SDK_INT >= 23) {
            return context.getColor(i);
        }
        return context.getResources().getColor(i);
    }

    public static int KQgRr5e_0(Context context, String str) {
        if (str != null) {
            return context.checkPermission(str, Process.myPid(), Process.myUid());
        }
        throw new IllegalArgumentException("permission is null");
    }
}
