YorkShen closed pull request #1762: *[Android] add eagle version track info
URL: https://github.com/apache/incubator-weex/pull/1762
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java 
b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java
index 13564ff86b..a8a696c9ad 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java
@@ -63,6 +63,7 @@
     }
   }
   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";
   /*********************
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index cfa87b7e66..eb4af440bb 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -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();
@@ -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);
 
@@ -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);
     }
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/performance/WXInstanceApm.java 
b/android/sdk/src/main/java/com/taobao/weex/performance/WXInstanceApm.java
index bbb5ba3a0c..88dfbd8256 100644
--- a/android/sdk/src/main/java/com/taobao/weex/performance/WXInstanceApm.java
+++ b/android/sdk/src/main/java/com/taobao/weex/performance/WXInstanceApm.java
@@ -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;
@@ -52,6 +53,7 @@
     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";
@@ -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());


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to