Skip to content

Commit

Permalink
fix: Remove --width and --height arguments to launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtr126 committed Sep 14, 2024
1 parent ff3aafc commit 1c84397
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions app/src/main/java/xtr/keymapper/server/RemoteServiceShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand All @@ -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();
Expand Down

0 comments on commit 1c84397

Please sign in to comment.