Java Code Examples for com.taobao.weex.common.IWXBridge#INSTANCE_RENDERING

The following examples show how to use com.taobao.weex.common.IWXBridge#INSTANCE_RENDERING . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
public int callNative(String instanceId, String tasks, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callNative(instanceId, tasks, callback);
  }catch (Throwable e){
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callNative throw exception:"+e.getMessage());
    }
  }

  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  if(WXEnvironment.isApkDebugable()){
    if(errorCode == IWXBridge.DESTROY_INSTANCE){
      WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
    }
  }
  return errorCode;
}
 
Example 2
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 *
 * @param instanceId
 * @param tasks
 * @param callback
 */

public int callUpdateFinish(String instanceId, byte [] tasks, String callback) {

  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callUpdateFinish(instanceId, callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callCreateBody throw exception:"+e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 3
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 *
 * @param instanceId
 * @param tasks
 * @param callback
 */

public int callCreateFinish(String instanceId, byte [] tasks, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callCreateFinish(instanceId, callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callCreateFinish throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 4
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 *
 * @param instanceId
 * @param tasks
 * @param callback
 */

public int callRefreshFinish(String instanceId, byte [] tasks, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callRefreshFinish(instanceId, callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callCreateFinish throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 5
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 *
 * @param instanceId
 * @param tasks
 * @param callback
 */

public int callUpdateAttrs(String instanceId, String ref, byte [] tasks, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callUpdateAttrs(instanceId, ref, new String(tasks), callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callUpdateAttrs throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 6
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 *
 * @param instanceId
 * @param tasks
 * @param callback
 */

public int callUpdateStyle(String instanceId, String ref, byte [] tasks, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callUpdateStyle(instanceId, ref, new String(tasks), callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callUpdateStyle throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 7
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 * @param instanceId
 * @param ref
 * @param callback
 * @return int
 */

public int callRemoveElement(String instanceId, String ref, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callRemoveElement(instanceId, ref, callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callRemoveElement throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 8
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 * @param instanceId
 * @param ref
 * @param parentref
 * @param index
 * @param callback
 * @return int
 */
public int callMoveElement(String instanceId, String ref, String parentref, String index, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    // Integer.parseInt(index)
    errorCode = WXBridgeManager.getInstance().callMoveElement(instanceId, ref, parentref, index, callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callMoveElement throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 9
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 * @param instanceId
 * @param ref
 * @param event
 * @param callback
 * @return int
 */
public int callAddEvent(String instanceId, String ref, String event, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callAddEvent(instanceId, ref, event, callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callAddEvent throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 10
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
/**
 * JavaScript uses this methods to call Android code
 * @param instanceId
 * @param ref
 * @param event
 * @param callback
 * @return int
 */
public int callRemoveEvent(String instanceId, String ref, String event, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callRemoveEvent(instanceId, ref, event, callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callRemoveEvent throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
Example 11
Source File: WXBridge.java    From weex-uikit with MIT License 6 votes vote down vote up
public int callNative(String instanceId, String tasks, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callNative(instanceId, tasks, callback);
  }catch (Throwable e){
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callNative throw exception:"+e.getMessage());
    }
  }

  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  if(WXEnvironment.isApkDebugable()){
    if(errorCode == IWXBridge.DESTROY_INSTANCE){
      WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
    }
  }
  return errorCode;
}
 
Example 12
Source File: WXBridgeManager.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
public int callAddElement(String instanceId, String ref,String dom,String index, String callback){

    if (WXEnvironment.isApkDebugable()) {
      mLodBuilder.append("[WXBridgeManager] callNative::callAddElement >>>> instanceId:").append(instanceId)
              .append(", ref:").append(ref).append(", dom:").append(dom).append(", callback:").append(callback);
      WXLogUtils.d(mLodBuilder.substring(0));
      mLodBuilder.setLength(0);
    }

    if(mDestroyedInstanceId!=null && mDestroyedInstanceId.contains(instanceId)){
      return IWXBridge.DESTROY_INSTANCE;
    }


    if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
      long start = System.currentTimeMillis();
      JSONObject domObject = JSON.parseObject(dom);

      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
        WXSDKManager.getInstance().getSDKInstance(instanceId).jsonParseTime(System.currentTimeMillis() - start);
      }
      WXDomModule domModule = getDomModule(instanceId);
      domModule.postAction(Actions.getAddElement(domObject, ref,Integer.parseInt(index)),false);
    }

    if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
      return IWXBridge.INSTANCE_RENDERING_ERROR;
    }
    // get next tick
    getNextTick(instanceId, callback);
    return IWXBridge.INSTANCE_RENDERING;

  }
 
Example 13
Source File: WXBridgeManager.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
public int callRemoveEvent(String instanceId, String ref, String event, String callback) {

    if (WXEnvironment.isApkDebugable()) {
      mLodBuilder.append("[WXBridgeManager] callRemoveEvent >>>> instanceId:").append(instanceId)
              .append(", ref:").append(ref)
              .append(", event:").append(event);
      WXLogUtils.d(mLodBuilder.substring(0));
      mLodBuilder.setLength(0);
    }

    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
      return IWXBridge .DESTROY_INSTANCE;
    }

    try {
      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
        WXDomModule domModule = getDomModule(instanceId);
        Action action = Actions.getRemoveEvent(ref, event);
        domModule.postAction((DOMAction)action, false);
      }
    } catch (Exception e) {
      WXLogUtils.e("[WXBridgeManager] callRemoveEvent exception: ", e);
      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEEVENT,"[WXBridgeManager] callRemoveEvent exception " + e.getCause());
    }

    if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
      return IWXBridge.INSTANCE_RENDERING_ERROR;
    }
    // get next tick
    getNextTick(instanceId, callback);
    return IWXBridge.INSTANCE_RENDERING;
  }
 
Example 14
Source File: WXBridgeManager.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
public int callAddEvent(String instanceId, String ref, String event, String callback) {

    if (WXEnvironment.isApkDebugable()) {
      mLodBuilder.append("[WXBridgeManager] callAddEvent >>>> instanceId:").append(instanceId)
              .append(", ref:").append(ref)
              .append(", event:").append(event);
      WXLogUtils.d(mLodBuilder.substring(0));
      mLodBuilder.setLength(0);
    }

    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
      return IWXBridge.DESTROY_INSTANCE;
    }

    try {
      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
        WXDomModule domModule = getDomModule(instanceId);
        Action action = Actions.getAddEvent(ref, event);
        domModule.postAction((DOMAction)action, false);
      }
    } catch (Exception e) {
      WXLogUtils.e("[WXBridgeManager] callAddEvent exception: ", e);
      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_ADDEVENT,"[WXBridgeManager] callAddEvent exception " + e.getCause());
    }

    if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
      return IWXBridge.INSTANCE_RENDERING_ERROR;
    }
    // get next tick
    getNextTick(instanceId, callback);
    return IWXBridge.INSTANCE_RENDERING;
  }
 
Example 15
Source File: WXBridgeManager.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
public int callMoveElement(String instanceId, String ref, String parentref, String index, String callback) {

    if (WXEnvironment.isApkDebugable()) {
      mLodBuilder.append("[WXBridgeManager] callMoveElement >>>> instanceId:").append(instanceId)
              .append(", parentref:").append(parentref)
              .append(", index:").append(index)
              .append(", ref:").append(ref);
      WXLogUtils.d(mLodBuilder.substring(0));
      mLodBuilder.setLength(0);
    }

    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
      return IWXBridge.DESTROY_INSTANCE;
    }

    try {
      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
        WXDomModule domModule = getDomModule(instanceId);
        Action action = Actions.getMoveElement(ref, parentref, Integer.parseInt(index));
        domModule.postAction((DOMAction)action, false);
      }
    } catch (Exception e) {
      WXLogUtils.e("[WXBridgeManager] callMoveElement exception: ", e);
      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_MOVEELEMENT,"[WXBridgeManager] callMoveElement exception " + e.getCause());
    }

    if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
      return IWXBridge.INSTANCE_RENDERING_ERROR;
    }
    // get next tick
    getNextTick(instanceId, callback);
    return IWXBridge.INSTANCE_RENDERING;
  }
 
Example 16
Source File: WXBridgeManager.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
public int callRemoveElement(String instanceId, String ref, String callback) {

    if (WXEnvironment.isApkDebugable()) {
      mLodBuilder.append("[WXBridgeManager] callRemoveElement >>>> instanceId:").append(instanceId)
              .append(", ref:").append(ref);
      WXLogUtils.d(mLodBuilder.substring(0));
      mLodBuilder.setLength(0);
    }

    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
      return IWXBridge.DESTROY_INSTANCE;
    }

    try {
      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
        WXDomModule domModule = getDomModule(instanceId);
        Action action = Actions.getRemoveElement(ref);
        domModule.postAction((DOMAction)action, false);
      }
    } catch (Exception e) {
      WXLogUtils.e("[WXBridgeManager] callRemoveElement exception: ", e);
      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT,"[WXBridgeManager] callRemoveElement exception " + e.getCause());
    }

    if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
      return IWXBridge.INSTANCE_RENDERING_ERROR;
    }
    // get next tick
    getNextTick(instanceId, callback);
    return IWXBridge.INSTANCE_RENDERING;
  }
 
Example 17
Source File: WXBridgeManager.java    From weex-uikit with MIT License 5 votes vote down vote up
public int callAddElement(String instanceId, String ref,String dom,String index, String callback){

    if (WXEnvironment.isApkDebugable()) {
      mLodBuilder.append("[WXBridgeManager] callNative::callAddElement >>>> instanceId:").append(instanceId)
              .append(", ref:").append(ref).append(", dom:").append(dom).append(", callback:").append(callback);
      WXLogUtils.d(mLodBuilder.substring(0));
      mLodBuilder.setLength(0);
    }

    if(mDestroyedInstanceId!=null && mDestroyedInstanceId.contains(instanceId)){
      return IWXBridge.DESTROY_INSTANCE;
    }


    if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
      long start = System.currentTimeMillis();
      JSONObject domObject = JSON.parseObject(dom);

      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
        WXSDKManager.getInstance().getSDKInstance(instanceId).jsonParseTime(System.currentTimeMillis() - start);
      }
      WXDomModule domModule = getDomModule(instanceId);
      domModule.addElement(ref, domObject, Integer.parseInt(index));
    }

    if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
      return IWXBridge.INSTANCE_RENDERING_ERROR;
    }
    // get next tick
    getNextTick(instanceId, callback);
    return IWXBridge.INSTANCE_RENDERING;

  }
 
Example 18
Source File: WXBridgeManager.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
public int callUpdateFinish(String instanceId, String callback) {
  if (WXEnvironment.isApkDebugable()) {
    mLodBuilder.append("[WXBridgeManager] callUpdateFinish >>>> instanceId:").append(instanceId)
            .append(", callback:").append(callback);
    WXLogUtils.d(mLodBuilder.substring(0));
    mLodBuilder.setLength(0);
  }

  if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)){
    return IWXBridge.DESTROY_INSTANCE;
  }

  try {
    if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
      WXDomModule domModule = getDomModule(instanceId);
      Action action = Actions.getUpdateFinish();
      domModule.postAction((DOMAction)action, false);
    }
  } catch (Exception e) {
    WXLogUtils.e("[WXBridgeManager] callUpdateFinish exception: ", e);
    commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,"[WXBridgeManager] callUpdateFinish exception "+e.getCause());
  }

  if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
    return IWXBridge.INSTANCE_RENDERING_ERROR;
  }
  // get next tick
  getNextTick(instanceId, callback);
  return IWXBridge.INSTANCE_RENDERING;
}
 
Example 19
Source File: WXBridge.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
/**
 * JSF render Node by callAddElement
 */
public int callAddElement(String instanceId, String ref,String dom,String index, String callback) {

  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;

  try {
    errorCode = WXBridgeManager.getInstance().callAddElement(instanceId, ref,dom,index, callback);
  }catch (Throwable e){
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      e.printStackTrace();
      WXLogUtils.e(TAG,"callNative throw error:"+e.getMessage());
    }
  }

  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  if(WXEnvironment.isApkDebugable()){
    if(errorCode == IWXBridge.DESTROY_INSTANCE){
      WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
    }
  }
  return errorCode;
}
 
Example 20
Source File: WXBridge.java    From weex-uikit with MIT License 5 votes vote down vote up
/**
 * JSF render Node by callAddElement
 */
public int callAddElement(String instanceId, String ref,String dom,String index, String callback) {

  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;

  try {
    errorCode = WXBridgeManager.getInstance().callAddElement(instanceId, ref,dom,index, callback);
  }catch (Throwable e){
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      e.printStackTrace();
      WXLogUtils.e(TAG,"callNative throw error:"+e.getMessage());
    }
  }

  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  if(WXEnvironment.isApkDebugable()){
    if(errorCode == IWXBridge.DESTROY_INSTANCE){
      WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
    }
  }
  return errorCode;
}