Skip to content

Commit

Permalink
Remove support for Android API < 23 in ReactDrawableHelper
Browse files Browse the repository at this point in the history
Summary:
Since minsdk version was increased to 23, we are deleting code using Android APIs < 23 for class ReactDrawableHelper

chnagelog: [Android][Breaking] Remove support for Android API < 23 in ReactDrawableHelper

Reviewed By: NickGerleman

Differential Revision: D48545508

fbshipit-source-id: 226574bffe83b44b5d92f889c67475ece10efbf5
  • Loading branch information
mdvacca committed Sep 26, 2023
1 parent c4d7c92 commit 67cb315
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Build;
import android.util.TypedValue;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
Expand Down Expand Up @@ -76,9 +75,7 @@ private static RippleDrawable getRippleDrawable(
}

private static Drawable setRadius(ReadableMap drawableDescriptionDict, Drawable drawable) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
&& drawableDescriptionDict.hasKey("rippleRadius")
&& drawable instanceof RippleDrawable) {
if (drawableDescriptionDict.hasKey("rippleRadius") && drawable instanceof RippleDrawable) {
RippleDrawable rippleDrawable = (RippleDrawable) drawable;
double rippleRadius = drawableDescriptionDict.getDouble("rippleRadius");
rippleDrawable.setRadius((int) PixelUtil.toPixelFromDIP(rippleRadius));
Expand Down

0 comments on commit 67cb315

Please sign in to comment.