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

Commit

Permalink
[Android] Split whitescreen code which reboot count>50
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky-chen committed Sep 25, 2019
1 parent b9c003a commit c8ab8f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,9 @@ private void checkWhiteScreen(){
return;
}
WXErrorCode errorCode = createInstanceHeartBeat?WXErrorCode.WX_ERROR_WHITE_SCREEN:WXErrorCode.WHITE_SCREEN_RESPONSE_TIMEOUT;
if (WXBridgeManager.getInstance().isRebootExceedLimit()){
errorCode = WXErrorCode.WHITE_SCREEN_REBOOT_EXCEED_LIMIT;
}
Map<String,String> args = new HashMap<>(1);
String vieTreeMsg = WhiteScreenUtils.takeViewTreeSnapShot(this);
args.put("viewTree",null == vieTreeMsg?"null viewTreeMsg":vieTreeMsg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ public String dumpIpcPageInfo(){
return "";
}

public boolean isRebootExceedLimit(){
return reInitCount > CRASHREINIT;
}

public void stopRemoteDebug() {
if (mWxDebugProxy != null) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public enum WXErrorCode {

WX_ERROR_WHITE_SCREEN("-2116", "WHITE_SCREEN",ErrorType.RENDER_ERROR,ErrorGroup.JS),
WHITE_SCREEN_RESPONSE_TIMEOUT("-2117", "WHITE_SCREEN_RESPONSE_TIMEOUT",ErrorType.RENDER_ERROR,ErrorGroup.JS),

WHITE_SCREEN_REBOOT_EXCEED_LIMIT("-2118", "WHITE_SCREEN_REBOOT_EXCEED_LIMIT",ErrorType.RENDER_ERROR,ErrorGroup.JS),

/**
*
Expand Down

0 comments on commit c8ab8f1

Please sign in to comment.