fix(sidecar): treat a failed ime probe as no keyboard open

This commit is contained in:
pj committed 2026-08-15 16:23:16 +05:30
1 parent 7d36c2a513
commit 4bbab3ff4c
1 file changed
+5 -1
@@ -901,7 +901,11 @@ class MaestroDriverBackend(private val serial: String?) : DriverBackend {
} else {
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,