From 6d8272472a9cb11f67350ca0cf3807ab313ca1a5 Mon Sep 17 00:00:00 2001 From: mcfans Date: Sat, 4 Nov 2023 20:24:15 +0800 Subject: [PATCH] fix: set correct flag --- .../src/main/kotlin/com/carriez/flutter_hbb/InputService.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 57a231975..47c8f302c 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 @@ -548,9 +548,10 @@ class InputService : AccessibilityService() { ctx = this val info = AccessibilityServiceInfo() if (Build.VERSION.SDK_INT >= 33) { - info.flags = FLAG_INPUT_METHOD_EDITOR + info.flags = FLAG_INPUT_METHOD_EDITOR or FLAG_RETRIEVE_INTERACTIVE_WINDOWS + } else { + info.flags = FLAG_RETRIEVE_INTERACTIVE_WINDOWS } - info.flags = FLAG_RETRIEVE_INTERACTIVE_WINDOWS setServiceInfo(info) fakeEditTextForTextStateCalculation = EditText(this) // Size here doesn't matter, we won't show this view.