diff --git a/app/src/main/java/xtr/keymapper/TouchPointer.java b/app/src/main/java/xtr/keymapper/TouchPointer.java index a6493468..78d97f5f 100644 --- a/app/src/main/java/xtr/keymapper/TouchPointer.java +++ b/app/src/main/java/xtr/keymapper/TouchPointer.java @@ -37,7 +37,7 @@ public class TouchPointer extends Service { private final IBinder binder = new TouchPointerBinder(); public MainActivity.Callback activityCallback; - private IRemoteService mService; + public IRemoteService mService; public String selectedProfile = null; private final Handler mHandler = new Handler(Looper.getMainLooper()); private boolean activityRemoteCallback = false; diff --git a/app/src/main/java/xtr/keymapper/editor/EditorService.java b/app/src/main/java/xtr/keymapper/editor/EditorService.java index b5ccefd7..31d975fd 100644 --- a/app/src/main/java/xtr/keymapper/editor/EditorService.java +++ b/app/src/main/java/xtr/keymapper/editor/EditorService.java @@ -26,7 +26,7 @@ public void onServiceConnected(ComponentName className, TouchPointer.TouchPointerBinder binder = (TouchPointer.TouchPointerBinder) service; TouchPointer pointerOverlay = binder.getService(); try { - pointerOverlay.mCallback.launchEditor(); + if (pointerOverlay.mService != null) pointerOverlay.mCallback.launchEditor(); } catch (RemoteException ignored) { } }