update doric dev init

This commit is contained in:
王劲鹏 2020-02-27 17:04:59 +08:00 committed by osborn
parent 9764e720fc
commit 25508b0779
2 changed files with 4 additions and 3 deletions

View File

@ -27,6 +27,6 @@ public class MyApplication extends Application {
super.onCreate(); super.onCreate();
Doric.init(this); Doric.init(this);
DoricRegistry.register(new DemoLibrary()); DoricRegistry.register(new DemoLibrary());
DoricDev.getInstance().init(this); DoricDev.getInstance().init();
} }
} }

View File

@ -10,6 +10,7 @@ import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
import pub.doric.Doric;
import pub.doric.DoricContext; import pub.doric.DoricContext;
import pub.doric.DoricContextManager; import pub.doric.DoricContextManager;
import pub.doric.devkit.event.ConnectExceptionEvent; import pub.doric.devkit.event.ConnectExceptionEvent;
@ -37,8 +38,8 @@ public class DoricDev {
public boolean devKitConnected = false; public boolean devKitConnected = false;
private DoricContextDebuggable doricContextDebuggable; private DoricContextDebuggable doricContextDebuggable;
public void init(Application application) { public void init() {
this.application = application; this.application = Doric.application();
DevKit.isRunningInEmulator = EasyProtectorLib.checkIsRunningInEmulator(application, new EmulatorCheckCallback() { DevKit.isRunningInEmulator = EasyProtectorLib.checkIsRunningInEmulator(application, new EmulatorCheckCallback() {
@Override @Override