fix(android): fix loading of keyboards on Android#16146
Open
ermshiperete wants to merge 1 commit into
Open
Conversation
User Test ResultsTest specification and instructions ERROR: user tests have not yet been defined Test Artifacts
|
f317db4 to
b406759
Compare
This change moves to using `WebViewAssetLoader` for loading files from the device instead of using file:// URLs. This fixes the blank keyboard problem reported in #16096 for Android. Also make `KMKeyboard.getKeyboardRoot()` private, and rename public `Keyboard.getKeyboardPath()` to private `Keyboard.getKeyboardUrl()`. Part-of: #16096
b406759 to
64abd5b
Compare
Contributor
Note that https://help.keyman.com/developer/engine/android/current-version/KMKeyboard/ |
jahorton
approved these changes
Jun 26, 2026
jahorton
left a comment
Contributor
There was a problem hiding this comment.
LGTM aside from the one nit.
| } | ||
|
|
||
| public String getKeyboardRoot() { | ||
| private String getKeyboardRoot() { |
Contributor
There was a problem hiding this comment.
We should probably leave this unchanged; KMKeyboard is an engine API class.
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.
This PR migrates the Android WebView from loading local files via file:// URLs to using
WebViewAssetLoader, which serves internal storage files through a magic HTTPS domain (https://appassets.androidplatform.net). This fixes the blank keyboard problem reported in #16096 for Android.Core pattern of the change:
The
WebViewAssetLoaderinKMKeyboardWebViewClientintercepts requests to this domain and serves files from internal storage. Since the domain is a constant,Contextis no longer needed to construct URLs, simplifying several method signatures.Also this PR makes
KMKeyboard.getKeyboardRoot()private, and renames publicKeyboard.getKeyboardPath()to privateKeyboard.getKeyboardUrl().Part-of: #16096
Replaces: #16132