package me.devsaki.hentoid.util;

import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.os.Build;
import androidx.core.app.ActivityCompat;

import static android.content.pm.PackageManager.PERMISSION_GRANTED;

public class PermissionUtil {

    public static boolean requestExternalStoragePermission(Activity activity, int permissionRequestCode) {
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) return true;

        if (ActivityCompat.checkSelfPermission(activity,
                Manifest.permission.READ_EXTERNAL_STORAGE) == PERMISSION_GRANTED) {

            return true;
        } else {
            ActivityCompat.requestPermissions(activity, new String[]{
                    Manifest.permission.READ_EXTERNAL_STORAGE}, permissionRequestCode);

            return false;
        }
    }

    public static boolean checkExternalStoragePermission(Context context) {
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) return true;
        return ActivityCompat.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE) == PERMISSION_GRANTED;
    }
}

@@ -117,33 +117,8 @@
 xt;%0A
-import android.os.Build;%0A
 impo
@@ -366,90 +366,8 @@
 ) %7B%0A
-        if (Build.VERSION.SDK_INT %3C Build.VERSION_CODES.JELLY_BEAN) return true;%0A%0A
     
@@ -828,89 +828,8 @@
 ) %7B%0A
-        if (Build.VERSION.SDK_INT %3C Build.VERSION_CODES.JELLY_BEAN) return true;%0A
     

Remove unnecessary if