Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

chore: add some log

mcfans9521ac6adb97
diff --git a/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt
index 7637cb1bb..4141595ab 100644
--- a/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt
+++ b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt
@@ -439,6 +439,8 @@ class InputService : AccessibilityService() {
var success = false
+ Log.d(logTag, "existing text:$text textToCommit:$textToCommit textSelectionStart:$textSelectionStart textSelectionEnd:$textSelectionEnd")
+
if (textToCommit != null) {
var newText = ""
@@ -451,6 +453,7 @@ class InputService : AccessibilityService() {
}
}
+ Log.d(logTag, "inserting text new text:$newText")
val arguments = Bundle()
arguments.putCharSequence(
AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE,
@@ -464,6 +467,7 @@ class InputService : AccessibilityService() {
this.fakeEditTextForTextStateCalculation?.setText(text)
}
if (textSelectionStart != -1 && textSelectionEnd != -1) {
+ Log.d(logTag, "setting selection $textSelectionStart $textSelectionEnd")
this.fakeEditTextForTextStateCalculation?.setSelection(
textSelectionStart,
textSelectionEnd
@@ -473,6 +477,7 @@ class InputService : AccessibilityService() {
this.fakeEditTextForTextStateCalculation?.let {
val inputConnection = it.onCreateInputConnection(EditorInfo())
if (inputConnection != null) {
+ Log.d(logTag, "sending keyevent $event")
success = inputConnection.sendKeyEvent(event)
}
}
@@ -484,6 +489,7 @@ class InputService : AccessibilityService() {
newText.toString()
)
success = node.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, arguments)
+ Log.d(logTag, "Update text to $newText success:$success")
}
if (success && this.fakeEditTextForTextStateCalculation != null) {
@@ -501,6 +507,7 @@ class InputService : AccessibilityService() {
selectionEnd
)
success = node.performAction(AccessibilityNodeInfo.ACTION_SET_SELECTION, arguments)
+ Log.d(logTag, "Update selection to $selectionStart $selectionEnd success:$success")
}
}
}