mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
Fix crash in Sapienz bot for Interpolator type
Reviewed By: mdvacca Differential Revision: D7252818 fbshipit-source-id: 30c585a2e6f6c2d7a7e7013c26c6228d8ef29aa6
This commit is contained in:
parent
41acb0a75b
commit
9737774b96
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user