mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 20:17:09 +00:00
fix(sidecar): treat a failed ime probe as no keyboard open
This commit is contained in:
1 parent
7d36c2a513
commit
4bbab3ff4c
1 file changed
+5
-1
@@ -901,7 +901,11 @@ class MaestroDriverBackend(private val serial: String?) : DriverBackend {
|
|||||||
} else {
|
} else {
|
||||||
driver.inputText(text)
|
driver.inputText(text)
|
||||||
}
|
}
|
||||||
dismissSoftKeyboard { dadb.shell(it).allOutput }
|
// A probe that fails reads as "no IME open", which is the safe way to be
|
||||||
|
// wrong: it skips the dismissal rather than sending a stray BACK.
|
||||||
|
dismissSoftKeyboard {
|
||||||
|
runCatching { dadb.shell(it).allOutput }.getOrDefault("")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// typeShellSafe types shell-safe ASCII through adb `input text` in chunks,
|
// typeShellSafe types shell-safe ASCII through adb `input text` in chunks,
|
||||||
|
|||||||
Reference in new issue
Block a user