This commit is contained in:
hyb1996
2018-04-03 16:09:26 +08:00
parent ebf086af90
commit aeae51bb74
9 changed files with 44 additions and 34 deletions

View File

@@ -3,6 +3,7 @@ package com.stardust.auojs.inrt.autojs;
import android.util.Log;
import android.view.KeyEvent;
import com.stardust.app.GlobalAppContext;
import com.stardust.auojs.inrt.Pref;
import com.stardust.autojs.core.inputevent.InputEventObserver;
import com.stardust.autojs.core.inputevent.ShellKeyObserver;
@@ -26,7 +27,7 @@ public class GlobalKeyObserver implements OnKeyListener, ShellKeyObserver.KeyLis
.addListener(this);
ShellKeyObserver observer = new ShellKeyObserver();
observer.setKeyListener(this);
InputEventObserver.getGlobal().addListener(observer);
InputEventObserver.getGlobal(GlobalAppContext.get()).addListener(observer);
}
public static void init() {