debug via vscode done
This commit is contained in:
parent
6ba6995d10
commit
0b2d447e2a
@ -75,10 +75,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEnterDebugEvent(EnterDebugEvent enterDebugEvent) {
|
||||
((FrameLayout) findViewById(R.id.root)).removeAllViews();
|
||||
DoricDriver.getInstance().changeJSEngine(false);
|
||||
doricContext.init(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
doricContext.getRootNode().setRootView((FrameLayout) findViewById(R.id.root));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -211,13 +211,18 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
|
||||
return mDoricRegistry;
|
||||
}
|
||||
|
||||
public void changeJSEngine(boolean isNative) {
|
||||
mDoricJSE.teardown();
|
||||
if (isNative) {
|
||||
mDoricJSE = new DoricNativeJSExecutor();
|
||||
} else {
|
||||
mDoricJSE = new DoricRemoteJSExecutor();
|
||||
}
|
||||
injectGlobal();
|
||||
public void changeJSEngine(final boolean isNative) {
|
||||
mJSHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mDoricJSE.teardown();
|
||||
if (isNative) {
|
||||
mDoricJSE = new DoricNativeJSExecutor();
|
||||
} else {
|
||||
mDoricJSE = new DoricRemoteJSExecutor();
|
||||
}
|
||||
injectGlobal();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user