From 9737774b965d1b4e875f697b9c004fdcbafe7698 Mon Sep 17 00:00:00 2001 From: Ram N Date: Tue, 13 Mar 2018 17:56:33 -0700 Subject: [PATCH] Fix crash in Sapienz bot for Interpolator type Reviewed By: mdvacca Differential Revision: D7252818 fbshipit-source-id: 30c585a2e6f6c2d7a7e7013c26c6228d8ef29aa6 --- .../layoutanimation/AbstractLayoutAnimation.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.java index 1ad6ccab3..67e7f19d2 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.java @@ -2,7 +2,6 @@ package com.facebook.react.uimanager.layoutanimation; -import android.os.Build; import android.view.View; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.AccelerateInterpolator; @@ -99,14 +98,11 @@ import javax.annotation.Nullable; } private static Interpolator getInterpolator(InterpolatorType type, ReadableMap params) { - Interpolator interpolator = null; + Interpolator interpolator; if (type.equals(InterpolatorType.SPRING)) { interpolator = new SimpleSpringInterpolator(SimpleSpringInterpolator.getSpringDamping(params)); } else { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) { - // Conversion from BaseInterpolator to Interpolator is only possible on this Android versions - interpolator = INTERPOLATOR.get(type); - } + interpolator = INTERPOLATOR.get(type); } if (interpolator == null) { throw new IllegalArgumentException("Missing interpolator for type : " + type);