fix: set correct flag

This commit is contained in:
mcfans 2023-11-04 20:24:15 +08:00
parent 409d5b124a
commit 6d8272472a

View File

@ -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.