diff --git a/app/src/main/java/xtr/keymapper/server/RemoteServiceShell.java b/app/src/main/java/xtr/keymapper/server/RemoteServiceShell.java index 7ba71d56..ea419c44 100644 --- a/app/src/main/java/xtr/keymapper/server/RemoteServiceShell.java +++ b/app/src/main/java/xtr/keymapper/server/RemoteServiceShell.java @@ -25,7 +25,6 @@ public static void main(String[] args) { Looper.prepareMainLooper(); RemoteService mService = new RemoteService(getContext()); - int width = 0, height = 0; boolean launchApp = true; for (String arg: args) { if (arg.equals("--wayland-client")) { @@ -38,17 +37,10 @@ public static void main(String[] args) { new RemoteServiceSocketServer(mService); } else if (arg.equals("--no-auto-launch")) { launchApp = false; - } else if (mService.isWaylandClient) { - String[] wh = arg.split("="); - if (arg.startsWith("--width")) - width = Integer.parseInt(wh[1]); - else if (arg.startsWith("--height")) - height = Integer.parseInt(wh[1]); - else - System.out.println("Invalid argument: " + arg); + } else { + System.out.println("Invalid argument: " + arg); } } - if (width > 0 && height > 0) mService.startServer(new KeymapProfile(), new KeymapConfig(getContext()), null, width, height); ServiceManager.addService("xtmapper", mService); new ProcessBuilder("pm", "grant", BuildConfig.APPLICATION_ID, "android.permission.SYSTEM_ALERT_WINDOW").inheritIO().start();