| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ard in suggestion callbacks A screenshot arriving while the keyboard view is torn down crashes the IME: ClipboardHistoryManager.getScreenshotSuggestionView() reads Keyboard.mIconsSet through mKeyboardSwitcher.keyboard without a null check, throwing 'NullPointerException: ... Keyboard.mIconsSet on a null object reference' from the MediaStore ContentObserver callback. - add activeKeyboardIcons(): null-safe accessor for the active keyboard's icon set; all four icon call sites degrade to icon-less suggestions instead of crashing when no keyboard view exists - skip tryShowClipboardSuggestion() from the screenshot observer while the input view is not shown; the next input show surfaces it anyway
|
Rebased onto current main (post the plugin/flavour rearchitecture commits) and verified :app:compileStandardDebugKotlin builds cleanly. Single-commit fix unchanged (+28/-6 in ClipboardHistoryManager.kt). |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Bug Description
The IME process dies when a screenshot lands while the keyboard view does not exist. Observed three times in one day on a Pixel-era Samsung (S24+, Android 16) running the debug build:
The MediaStore ContentObserver fires as soon as any screenshot appears system-wide, even while the IME service is idle with no input view inflated.
Root Cause
Two independent problems combine:
Fix
No behaviour change when the keyboard view exists (the overwhelmingly common case) - icons resolve exactly as before.
How to Verify
Test Plan
Risk Assessment
Low - strictly defensive changes: null-guards that fall back to not drawing two toolbar icons in a transient state, plus skipping a speculative UI refresh that the next input-show repeats anyway. No change to commit paths, gesture handling, or prediction.