Skip to content

Commit 9737774

Browse files
axe-fbfacebook-github-bot
authored andcommitted
Fix crash in Sapienz bot for Interpolator type
Reviewed By: mdvacca Differential Revision: D7252818 fbshipit-source-id: 30c585a2e6f6c2d7a7e7013c26c6228d8ef29aa6
1 parent 41acb0a commit 9737774

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
package com.facebook.react.uimanager.layoutanimation;
44

5-
import android.os.Build;
65
import android.view.View;
76
import android.view.animation.AccelerateDecelerateInterpolator;
87
import android.view.animation.AccelerateInterpolator;
@@ -99,14 +98,11 @@ public void initializeFromConfig(ReadableMap data, int globalDuration) {
9998
}
10099

101100
private static Interpolator getInterpolator(InterpolatorType type, ReadableMap params) {
102-
Interpolator interpolator = null;
101+
Interpolator interpolator;
103102
if (type.equals(InterpolatorType.SPRING)) {
104103
interpolator = new SimpleSpringInterpolator(SimpleSpringInterpolator.getSpringDamping(params));
105104
} else {
106-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
107-
// Conversion from BaseInterpolator to Interpolator is only possible on this Android versions
108-
interpolator = INTERPOLATOR.get(type);
109-
}
105+
interpolator = INTERPOLATOR.get(type);
110106
}
111107
if (interpolator == null) {
112108
throw new IllegalArgumentException("Missing interpolator for type : " + type);

0 commit comments

Comments
 (0)