attempt to fix local reference table overflow, https://github.com/rustdesk/rustdesk/issues/4118

This commit is contained in:
rustdesk
2024-06-05 00:38:29 +08:00
parent 2dcd9f02cd
commit ce1dac3b86
2 changed files with 25 additions and 6 deletions

View File

@@ -64,9 +64,9 @@ class MainService : Service() {
@Keep
@RequiresApi(Build.VERSION_CODES.N)
fun rustPointerInput(kind: String, mask: Int, x: Int, y: Int) {
fun rustPointerInput(kind: Int, mask: Int, x: Int, y: Int) {
// turn on screen with LIFT_DOWN when screen off
if (!powerManager.isInteractive && (kind == "touch" || mask == LIFT_DOWN)) {
if (!powerManager.isInteractive && (kind == 0 || mask == LIFT_DOWN)) {
if (wakeLock.isHeld) {
Log.d(logTag, "Turn on Screen, WakeLock release")
wakeLock.release()
@@ -75,10 +75,10 @@ class MainService : Service() {
wakeLock.acquire(5000)
} else {
when (kind) {
"touch" -> {
0 -> { // touch
InputService.ctx?.onTouchInput(mask, x, y)
}
"mouse" -> {
1 -> { // mouse
InputService.ctx?.onMouseInput(mask, x, y)
}
else -> {