[Cleanup] Removed redundant API 21(Lollipop) or lower version checks as the minimum SDK version is 21

This commit is contained in:
Prathamesh More 2021-11-28 12:17:20 +05:30
parent aefd52c12e
commit de14e72689
11 changed files with 36 additions and 68 deletions

View file

@ -102,10 +102,7 @@ public class ImageUtil {
public static Drawable getVectorDrawable(
@NonNull Resources res, @DrawableRes int resId, @Nullable Resources.Theme theme) {
if (Build.VERSION.SDK_INT >= 21) {
return res.getDrawable(resId, theme);
}
return VectorDrawableCompat.create(res, resId, theme);
return res.getDrawable(resId, theme);
}
/** Makes sure that {@code mTempBuffer} has at least length {@code size}. */

View file

@ -54,7 +54,7 @@ public class SAFUtil {
public static final int REQUEST_SAF_PICK_TREE = 43;
public static boolean isSAFRequired(File file) {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && !file.canWrite();
return !file.canWrite();
}
public static boolean isSAFRequired(String path) {