fix: piped writer causes anr

This commit is contained in:
hyb1996
2018-10-13 00:17:39 +08:00
parent 4dc37bc4ff
commit 4c482428dd
18 changed files with 232 additions and 111 deletions

View File

@@ -65,7 +65,7 @@ public class SplashActivity extends AppCompatActivity {
runOnUiThread(() -> {
Toast.makeText(SplashActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();
startActivity(new Intent(SplashActivity.this, LogActivity.class));
AutoJs.getInstance().getGlobalConsole().printStackTrace(e);
AutoJs.getInstance().getGlobalConsole().printAllStackTrace(e);
});
}
}).start();

View File

@@ -77,7 +77,7 @@ public class AssetsProjectLauncher {
mScriptExecution = AutoJs.getInstance().getScriptEngineService().execute(source, new ExecutionConfig()
.executePath(mProjectDir));
} catch (Exception e) {
AutoJs.getInstance().getGlobalConsole().error(ScriptEngineService.getScriptTrace(e));
AutoJs.getInstance().getGlobalConsole().error(e);
}
}