Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always starting minitouch agent #53

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions app/src/main/java/jp/co/cyberagent/stf/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,19 @@ else if (arg.equals("--debug-info")) {
System.exit(1);
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
/*
* Android Q doesn't let minitouch manage inputs.
* As a workaround, minitouch will forward events to this
* agent which will be able to use the Android InputManager
*/
System.out.println("Starting minitouch agent");
Point size = MinitouchAgent.getScreenSize();
MinitouchAgent m = new MinitouchAgent(size.x, size.y, handler);
m.start();
}

/*
* Android Q doesn't let minitouch manage inputs. Also minitouch cannot handle devices
* without a multi touch libevdev input device, such as devices without a multi touch
* screen.
* As a workaround, minitouch will forward events to this
* agent which will be able to use the Android InputManager
*/
System.out.println("Starting minitouch agent");
Point size = MinitouchAgent.getScreenSize();
MinitouchAgent m = new MinitouchAgent(size.x, size.y, handler);
m.start();

new Agent(handler).start();
Looper.loop();
}
Expand Down