Fix helper IME black screen by suppressing keyboard window#109
Merged
SergioChan merged 3 commits intomainfrom Mar 14, 2026
Merged
Fix helper IME black screen by suppressing keyboard window#109SergioChan merged 3 commits intomainfrom
SergioChan merged 3 commits intomainfrom
Conversation
The previous 1px-transparent-view approach did not work because Android's IME window manager ignores View LayoutParams and enforces a minimum keyboard window size, resulting in a full-screen black overlay whenever the helper IME was activated. Replace with onEvaluateInputViewShown() returning false, which tells the system to never create a keyboard window surface at all. The InputMethodService still binds to the focused input field, so getCurrentInputConnection() works normally for text injection via broadcast — verified on-device with screenshot confirmation. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
onEvaluateInputViewShown() → false, which prevents the system from creating a keyboard window entirely.Why
When the helper IME was activated for Unicode text injection (emoji, CJK, etc.), Android's IME window manager ignored the View's LayoutParams and enforced a minimum keyboard window size, resulting in a full-screen black overlay that blocked the agent's view of the screen. The agent would see an empty black screen with no UI elements, get stuck, and fail the task.
Changes
android/openpocket-ime/OpenPocketIME.java: OverrideonEvaluateInputViewShown()to returnfalseso the system never creates a keyboard window surface. TheInputMethodServicestill binds to the focused input field, sogetCurrentInputConnection()works normally for text injection via broadcast. ReturnnullfromonCreateInputView()as defensive backup.assets/android/openpocket-ime.apk: Rebuilt APK with the fix.Testing
node --test test/adb-runtime.test.mjs— 40 pass / 0 failChecklist
Made with Cursor