Java 类com.facebook.react.bridge.JSApplicationCausedNativeException 实例源码

项目:RNLearn_Project1    文件:AnimationsDebugModule.java   
@ReactMethod
public void startRecordingFps() {
  if (mCatalystSettings == null ||
      !mCatalystSettings.isAnimationFpsDebugEnabled()) {
    return;
  }

  if (mFrameCallback != null) {
    throw new JSApplicationCausedNativeException("Already recording FPS!");
  }

  mFrameCallback = new FpsDebugFrameCallback(
                        ChoreographerCompat.getInstance(),
                        getReactApplicationContext());
  mFrameCallback.startAndRecordFpsAtEachFrame();
}
项目:RNLearn_Project1    文件:DivisionAnimatedNode.java   
@Override
public void update() {
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      double value = ((ValueAnimatedNode) animatedNode).getValue();
      if (i == 0) {
        mValue = value;
        continue;
      }
      if (value == 0) {
        throw new JSApplicationCausedNativeException("Detected a division by zero in " +
          "Animated.divide node");
      }
      mValue /= value;
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.divide node");
    }
  }
}
项目:RNLearn_Project1    文件:AnimationsDebugModule.java   
@ReactMethod
public void startRecordingFps() {
  if (mCatalystSettings == null ||
      !mCatalystSettings.isAnimationFpsDebugEnabled()) {
    return;
  }

  if (mFrameCallback != null) {
    throw new JSApplicationCausedNativeException("Already recording FPS!");
  }

  mFrameCallback = new FpsDebugFrameCallback(
                        ChoreographerCompat.getInstance(),
                        getReactApplicationContext());
  mFrameCallback.startAndRecordFpsAtEachFrame();
}
项目:RNLearn_Project1    文件:DivisionAnimatedNode.java   
@Override
public void update() {
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      double value = ((ValueAnimatedNode) animatedNode).getValue();
      if (i == 0) {
        mValue = value;
        continue;
      }
      if (value == 0) {
        throw new JSApplicationCausedNativeException("Detected a division by zero in " +
          "Animated.divide node");
      }
      mValue /= value;
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.divide node");
    }
  }
}
项目:ReactNativeSignatureExample    文件:AnimationsDebugModule.java   
@ReactMethod
public void startRecordingFps() {
  if (mCatalystSettings == null ||
      !mCatalystSettings.isAnimationFpsDebugEnabled()) {
    return;
  }

  if (mFrameCallback != null) {
    throw new JSApplicationCausedNativeException("Already recording FPS!");
  }
  checkAPILevel();

  mFrameCallback = new FpsDebugFrameCallback(
                        Choreographer.getInstance(),
                        getReactApplicationContext());
  mFrameCallback.startAndRecordFpsAtEachFrame();
}
项目:react-native-ibeacon-android    文件:AnimationsDebugModule.java   
@ReactMethod
public void startRecordingFps() {
  if (mCatalystSettings == null ||
      !mCatalystSettings.isAnimationFpsDebugEnabled()) {
    return;
  }

  if (mFrameCallback != null) {
    throw new JSApplicationCausedNativeException("Already recording FPS!");
  }
  checkAPILevel();

  mFrameCallback = new FpsDebugFrameCallback(
                        Choreographer.getInstance(),
                        getReactApplicationContext());
  mFrameCallback.startAndRecordFpsAtEachFrame();
}
项目:react-native-box-loaders    文件:AnimationsDebugModule.java   
@ReactMethod
public void startRecordingFps() {
  if (mCatalystSettings == null ||
      !mCatalystSettings.isAnimationFpsDebugEnabled()) {
    return;
  }

  if (mFrameCallback != null) {
    throw new JSApplicationCausedNativeException("Already recording FPS!");
  }
  checkAPILevel();

  mFrameCallback = new FpsDebugFrameCallback(
                        Choreographer.getInstance(),
                        getReactApplicationContext());
  mFrameCallback.startAndRecordFpsAtEachFrame();
}
项目:Ironman    文件:AnimationsDebugModule.java   
@ReactMethod
public void startRecordingFps() {
  if (mCatalystSettings == null ||
      !mCatalystSettings.isAnimationFpsDebugEnabled()) {
    return;
  }

  if (mFrameCallback != null) {
    throw new JSApplicationCausedNativeException("Already recording FPS!");
  }
  checkAPILevel();

  mFrameCallback = new FpsDebugFrameCallback(
                        Choreographer.getInstance(),
                        getReactApplicationContext());
  mFrameCallback.startAndRecordFpsAtEachFrame();
}
项目:Ironman    文件:DivisionAnimatedNode.java   
@Override
public void update() {
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      double value = ((ValueAnimatedNode) animatedNode).mValue;
      if (i == 0) {
        mValue = value;
        continue;
      }
      if (value == 0) {
        throw new JSApplicationCausedNativeException("Detected a division by zero in " +
          "Animated.divide node");
      }
      mValue /= value;
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.divide node");
    }
  }
}
项目:RNLearn_Project1    文件:DebugComponentOwnershipModule.java   
@ReactMethod
public synchronized void receiveOwnershipHierarchy(
    int requestId,
    int tag,
    @Nullable ReadableArray owners) {
  OwnerHierarchyCallback callback = mRequestIdToCallback.get(requestId);
  if (callback == null) {
    throw new JSApplicationCausedNativeException(
        "Got receiveOwnershipHierarchy for invalid request id: " + requestId);
  }
  mRequestIdToCallback.delete(requestId);
  callback.onOwnerHierarchyLoaded(tag, owners);
}
项目:RNLearn_Project1    文件:MultiplicationAnimatedNode.java   
@Override
public void update() {
  mValue = 1;
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      mValue *= ((ValueAnimatedNode) animatedNode).getValue();
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.multiply node");
    }
  }
}
项目:RNLearn_Project1    文件:ModulusAnimatedNode.java   
@Override
public void update() {
  AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNode);
  if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
    mValue = ((ValueAnimatedNode) animatedNode).mValue % mModulus;
  } else {
    throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
      "Animated.modulus node");
  }
}
项目:RNLearn_Project1    文件:AdditionAnimatedNode.java   
@Override
public void update() {
  mValue = 0;
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      mValue += ((ValueAnimatedNode) animatedNode).getValue();
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.Add node");
    }
  }
}
项目:RNLearn_Project1    文件:DiffClampAnimatedNode.java   
private double getInputNodeValue() {
  AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodeTag);
  if (animatedNode == null || !(animatedNode instanceof ValueAnimatedNode)) {
    throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
      "Animated.DiffClamp node");

  }

  return ((ValueAnimatedNode) animatedNode).getValue();
}
项目:RNLearn_Project1    文件:DebugComponentOwnershipModule.java   
@ReactMethod
public synchronized void receiveOwnershipHierarchy(
    int requestId,
    int tag,
    @Nullable ReadableArray owners) {
  OwnerHierarchyCallback callback = mRequestIdToCallback.get(requestId);
  if (callback == null) {
    throw new JSApplicationCausedNativeException(
        "Got receiveOwnershipHierarchy for invalid request id: " + requestId);
  }
  mRequestIdToCallback.delete(requestId);
  callback.onOwnerHierarchyLoaded(tag, owners);
}
项目:RNLearn_Project1    文件:MultiplicationAnimatedNode.java   
@Override
public void update() {
  mValue = 1;
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      mValue *= ((ValueAnimatedNode) animatedNode).getValue();
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.multiply node");
    }
  }
}
项目:RNLearn_Project1    文件:ModulusAnimatedNode.java   
@Override
public void update() {
  AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNode);
  if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
    mValue = ((ValueAnimatedNode) animatedNode).mValue % mModulus;
  } else {
    throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
      "Animated.modulus node");
  }
}
项目:RNLearn_Project1    文件:AdditionAnimatedNode.java   
@Override
public void update() {
  mValue = 0;
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      mValue += ((ValueAnimatedNode) animatedNode).getValue();
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.Add node");
    }
  }
}
项目:RNLearn_Project1    文件:DiffClampAnimatedNode.java   
private double getInputNodeValue() {
  AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodeTag);
  if (animatedNode == null || !(animatedNode instanceof ValueAnimatedNode)) {
    throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
      "Animated.DiffClamp node");

  }

  return ((ValueAnimatedNode) animatedNode).getValue();
}
项目:ReactNativeSignatureExample    文件:DebugComponentOwnershipModule.java   
@ReactMethod
public synchronized void receiveOwnershipHierarchy(
    int requestId,
    int tag,
    @Nullable ReadableArray owners) {
  OwnerHierarchyCallback callback = mRequestIdToCallback.get(requestId);
  if (callback == null) {
    throw new JSApplicationCausedNativeException(
        "Got receiveOwnershipHierarchy for invalid request id: " + requestId);
  }
  mRequestIdToCallback.delete(requestId);
  callback.onOwnerHierarchyLoaded(tag, owners);
}
项目:react-native-ibeacon-android    文件:DebugComponentOwnershipModule.java   
@ReactMethod
public synchronized void receiveOwnershipHierarchy(
    int requestId,
    int tag,
    @Nullable ReadableArray owners) {
  OwnerHierarchyCallback callback = mRequestIdToCallback.get(requestId);
  if (callback == null) {
    throw new JSApplicationCausedNativeException(
        "Got receiveOwnershipHierarchy for invalid request id: " + requestId);
  }
  mRequestIdToCallback.delete(requestId);
  callback.onOwnerHierarchyLoaded(tag, owners);
}
项目:react-native-box-loaders    文件:DebugComponentOwnershipModule.java   
@ReactMethod
public synchronized void receiveOwnershipHierarchy(
    int requestId,
    int tag,
    @Nullable ReadableArray owners) {
  OwnerHierarchyCallback callback = mRequestIdToCallback.get(requestId);
  if (callback == null) {
    throw new JSApplicationCausedNativeException(
        "Got receiveOwnershipHierarchy for invalid request id: " + requestId);
  }
  mRequestIdToCallback.delete(requestId);
  callback.onOwnerHierarchyLoaded(tag, owners);
}
项目:react-native-box-loaders    文件:MultiplicationAnimatedNode.java   
@Override
public void update() {
  mValue = 1;
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      mValue *= ((ValueAnimatedNode) animatedNode).mValue;
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.multiply node");
    }
  }
}
项目:react-native-box-loaders    文件:AnimatedAddition.java   
@Override
public void update() {
  mValue = 0;
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      mValue += ((ValueAnimatedNode) animatedNode).mValue;
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.Add node");
    }
  }
}
项目:Ironman    文件:DebugComponentOwnershipModule.java   
@ReactMethod
public synchronized void receiveOwnershipHierarchy(
    int requestId,
    int tag,
    @Nullable ReadableArray owners) {
  OwnerHierarchyCallback callback = mRequestIdToCallback.get(requestId);
  if (callback == null) {
    throw new JSApplicationCausedNativeException(
        "Got receiveOwnershipHierarchy for invalid request id: " + requestId);
  }
  mRequestIdToCallback.delete(requestId);
  callback.onOwnerHierarchyLoaded(tag, owners);
}
项目:Ironman    文件:MultiplicationAnimatedNode.java   
@Override
public void update() {
  mValue = 1;
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      mValue *= ((ValueAnimatedNode) animatedNode).mValue;
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.multiply node");
    }
  }
}
项目:Ironman    文件:AdditionAnimatedNode.java   
@Override
public void update() {
  mValue = 0;
  for (int i = 0; i < mInputNodes.length; i++) {
    AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodes[i]);
    if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
      mValue += ((ValueAnimatedNode) animatedNode).mValue;
    } else {
      throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
        "Animated.Add node");
    }
  }
}
项目:Ironman    文件:DiffClampAnimatedNode.java   
private double getInputNodeValue() {
  AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNodeTag);
  if (animatedNode == null || !(animatedNode instanceof ValueAnimatedNode)) {
    throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
      "Animated.DiffClamp node");

  }

  return ((ValueAnimatedNode) animatedNode).mValue;
}
项目:ReactNativeSignatureExample    文件:AnimationsDebugModule.java   
private static void checkAPILevel() {
  if (Build.VERSION.SDK_INT < 16) {
    throw new JSApplicationCausedNativeException(
        "Animation debugging is not supported in API <16");
  }
}
项目:react-native-ibeacon-android    文件:AnimationsDebugModule.java   
private static void checkAPILevel() {
  if (Build.VERSION.SDK_INT < 16) {
    throw new JSApplicationCausedNativeException(
        "Animation debugging is not supported in API <16");
  }
}
项目:react-native-box-loaders    文件:AnimationsDebugModule.java   
private static void checkAPILevel() {
  if (Build.VERSION.SDK_INT < 16) {
    throw new JSApplicationCausedNativeException(
        "Animation debugging is not supported in API <16");
  }
}
项目:Ironman    文件:AnimationsDebugModule.java   
private static void checkAPILevel() {
  if (Build.VERSION.SDK_INT < 16) {
    throw new JSApplicationCausedNativeException(
        "Animation debugging is not supported in API <16");
  }
}