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

[WEEX-590][Android] add more info to report #1470

Merged
merged 1 commit into from
Aug 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2104,27 +2104,6 @@ private void doReportJSException(String instanceId, String function, String exce
}
}

private boolean checkEmptyScreen(WXSDKInstance instance){
if (null == instance || instance.isDestroy()){
return false;
}
WXComponent rootComponent = instance.getRootComponent();
if (null == rootComponent) {
return true;
}

View rootView = rootComponent.getRealView();
if (null == rootView){
return true;
}

if (rootView instanceof ViewGroup) {
return ((ViewGroup) rootView).getChildCount() > 0;
}else {
return false;
}
}

private void registerDomModule() throws WXException {
/** Tell Javascript Framework what methods you have. This is Required.**/
Map<String, Object> domMap = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
Expand Down Expand Up @@ -145,12 +146,18 @@ public void checkEmptyScreenAndReport() {
break;
}
}
Map<String,String> flagMap = new HashMap<>(4);
flagMap.put("wxBeginRender",String.valueOf(mBeginRender));
flagMap.put("wxHasAddView",String.valueOf(hasAddView.get()));
flagMap.put("wxHasDegrade",String.valueOf(hasDegrade.get()));
flagMap.put("wxHasReportScreenEmpty",String.valueOf(mHasReportScreenEmpty));

WXExceptionUtils.commitCriticalExceptionRT(
instanceId,
hasJsException ? WXErrorCode.WX_RENDER_ERR_JS_RUNTIME : WXErrorCode.WX_RENDER_ERR_NATIVE_RUNTIME,
"checkEmptyScreenAndReport",
convertExceptionListToString(),
null
flagMap
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public static void commitCriticalExceptionRT(@Nullable final String instanceId,
commitMap.put(WXInstanceExceptionRecord.KEY_EXP_STAGE_LIST,instance.getExceptionRecorder().convertStageToStr());
String bundleTemplate = instance.getTemplate();
commitMap.put("wxTemplateOfBundle",null == bundleTemplate ?"has recycle by gc":bundleTemplate);
commitMap.put("wxPageName",instance.getWXPerformance().pageName);
}
} else {//instance is null for instance id is null
if (!TextUtils.isEmpty(WXSDKInstance.requestUrl)) {
Expand Down