CrackMe.apk
Download file
package com.facebook.react.animated;
import com.facebook.react.bridge.JSApplicationCausedNativeException;
import com.facebook.react.bridge.ReadableMap;
class ModulusAnimatedNode extends ValueAnimatedNode {
private final int mInputNode;
private final double mModulus;
private final NativeAnimatedNodesManager mNativeAnimatedNodesManager;
public ModulusAnimatedNode(ReadableMap readableMap, NativeAnimatedNodesManager nativeAnimatedNodesManager) {
this.mNativeAnimatedNodesManager = nativeAnimatedNodesManager;
this.mInputNode = readableMap.getInt("input");
this.mModulus = readableMap.getDouble("modulus");
}
public void update() {
AnimatedNode nodeById = this.mNativeAnimatedNodesManager.getNodeById(this.mInputNode);
if (nodeById == null || !(nodeById instanceof ValueAnimatedNode)) {
throw new JSApplicationCausedNativeException("Illegal node ID set as an input for Animated.modulus node");
}
double value = ((ValueAnimatedNode) nodeById).getValue();
double d = this.mModulus;
this.mValue = ((value % d) + d) % d;
}
public String prettyPrint() {
return "NativeAnimatedNodesManager[" + this.mTag + "] inputNode: " + this.mInputNode + " modulus: " + this.mModulus + " super: " + super.prettyPrint();
}
}
Download file