[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[Android] add eagle version track info (#1762)
Browse files Browse the repository at this point in the history
  • Loading branch information
yxping authored and YorkShen committed Nov 16, 2018
1 parent 3cb8e9e commit 953c3fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class WXEnvironment {
}
}
public static final String SYS_MODEL = android.os.Build.MODEL;
public static final String EAGLE = "eagle";
public static final String ENVIRONMENT = "environment";
public static final String WEEX_CURRENT_KEY = "wx_current_url";
/*********************
Expand Down
4 changes: 3 additions & 1 deletion android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,8 @@ private void renderInternal(String pageName,
return;
}

mRenderStrategy = flag;

//some case ,from render(template),but not render (url)
if (!mApmForInstance.hasInit()){
mApmForInstance.doInit();
Expand Down Expand Up @@ -702,7 +704,6 @@ private void renderInternal(String pageName,
mApmForInstance.addStats(WXInstanceApm.KEY_PAGE_STATS_BUNDLE_SIZE,mWXPerformance.JSTemplateSize);

mRenderStartTime = System.currentTimeMillis();
mRenderStrategy = flag;

WXSDKManager.getInstance().setCrashInfo(WXEnvironment.WEEX_CURRENT_KEY,pageName);

Expand Down Expand Up @@ -749,6 +750,7 @@ private void renderByUrlInternal(String pageName,
ensureRenderArchor();
pageName = wrapPageName(pageName, url);
mBundleUrl = url;
mRenderStrategy = flag;
if(WXSDKManager.getInstance().getValidateProcessor()!=null) {
mNeedValidate = WXSDKManager.getInstance().getValidateProcessor().needValidate(mBundleUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.taobao.weex.WXSDKManager;
import com.taobao.weex.common.WXErrorCode;
import com.taobao.weex.common.WXPerformance;
import com.taobao.weex.common.WXRenderStrategy;
import com.taobao.weex.ui.component.WXComponent;
import com.taobao.weex.utils.WXExceptionUtils;
import com.taobao.weex.utils.WXUtils;
Expand All @@ -52,6 +53,7 @@ public class WXInstanceApm {
public static final String KEY_PAGE_PROPERTIES_INSTANCE_TYPE = "wxInstanceType";
public static final String KEY_PAGE_PROPERTIES_PARENT_PAGE = "wxParentPage";
public static final String KEY_PAGE_PROPERTIES_BUNDLE_TYPE = "wxBundleType";
public static final String KEY_PAGE_PROPERTIES_RENDER_TYPE = "wxRenderType";

/************** stages *****************/
public static final String KEY_PAGE_STAGES_DOWN_BUNDLE_START = "wxStartDownLoadBundle";
Expand Down Expand Up @@ -203,6 +205,10 @@ public void doInit() {
addProperty(KEY_PROPERTIES_ERROR_CODE, VALUE_ERROR_CODE_DEFAULT);
addProperty(KEY_PAGE_PROPERTIES_JSLIB_VERSION, WXEnvironment.JS_LIB_SDK_VERSION);
addProperty(KEY_PAGE_PROPERTIES_WEEX_VERSION, WXEnvironment.WXSDK_VERSION);
if (instance != null && (instance.getRenderStrategy() == WXRenderStrategy.DATA_RENDER
|| instance.getRenderStrategy() == WXRenderStrategy.DATA_RENDER_BINARY)) {
addProperty(KEY_PAGE_PROPERTIES_RENDER_TYPE, WXEnvironment.EAGLE);
}
if (null != instance) {
for (Map.Entry<String, String> entry : instance.getContainerInfo().entrySet()) {
addProperty(entry.getKey(), entry.getValue());
Expand Down

0 comments on commit 953c3fa

Please sign in to comment.