[Cleanup] Removed redundant API 21(Lollipop) or lower version checks as the minimum SDK version is 21
This commit is contained in:
parent
aefd52c12e
commit
de14e72689
11 changed files with 36 additions and 68 deletions
|
@ -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}. */
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue