android:fix eventbus error

This commit is contained in:
pengfei.zhou 2020-02-29 10:06:44 +08:00 committed by osborn
parent 9155d343c0
commit 0b0390edfe
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import android.widget.Toast;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
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;
@ -30,6 +31,7 @@ public class DevKit implements IDevKit {
} }
private DevKit() { private DevKit() {
EventBus.getDefault().register(this);
} }
public static DevKit getInstance() { public static DevKit getInstance() {

View File

@ -17,7 +17,6 @@ public class DoricDev {
} }
private DoricDev() { private DoricDev() {
EventBus.getDefault().register(this);
DevKit.isRunningInEmulator = EasyProtectorLib.checkIsRunningInEmulator(Doric.application(), new EmulatorCheckCallback() { DevKit.isRunningInEmulator = EasyProtectorLib.checkIsRunningInEmulator(Doric.application(), new EmulatorCheckCallback() {
@Override @Override
public void findEmulator(String emulatorInfo) { public void findEmulator(String emulatorInfo) {