Skip to content

Commit

Permalink
Support non-integer modulus in ModulusAnimatedNode on Android
Browse files Browse the repository at this point in the history
Summary:
`Animated.modulo(value, modulus)` supports a non-integer modulus in the iOS and JS implementations but crashes on Android when `useNativeDriver` is set to `true`.

Unfortunately, I'm not fluent enough with this codebase to add a Java test for this fix - especially as I couldn't find any analogous tests to extrapolate from. However, the fix itself seems straightforward enough.

None needed

[ANDROID] [BUGFIX] [Animated] - Support non-integer modulus in .modulo()
Closes #17860

Differential Revision: D6918799

Pulled By: hramos

fbshipit-source-id: 8d15e4bc881ed41a4123c6f811c0c72119f67be0
  • Loading branch information
motiz88 authored and facebook-github-bot committed Feb 7, 2018
1 parent a1c479f commit 6c38972
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

private final NativeAnimatedNodesManager mNativeAnimatedNodesManager;
private final int mInputNode;
private final int mModulus;
private final double mModulus;

public ModulusAnimatedNode(
ReadableMap config,
NativeAnimatedNodesManager nativeAnimatedNodesManager) {
mNativeAnimatedNodesManager = nativeAnimatedNodesManager;
mInputNode = config.getInt("input");
mModulus = config.getInt("modulus");
mModulus = config.getDouble("modulus");
}

@Override
Expand Down

0 comments on commit 6c38972

Please sign in to comment.