This fixes crash reported as #6703. This issue was first reported in
14.0.282-stable. I have done a careful review of changes in 14.0.282
(and 14.0.281) but have been unable to find any changes that could have
bearing on this.
The basic issue is that there appears to be some circumstances where
`KMManager` thinks that it has a keyboard loaded (ref
`SystemKeyboardLoaded` variable), but `KMKeyboard.currentKeyboard` is
still `null`.
The crash has been reported for only a very small set of users, 119 at
time of fix, but average reports per user is over 100. As is usual with
this type of thing, a small fraction of those users are reporting the
majority of crashes. I have not found any real commonality across the
error reports -- they are geographically dispersed, across multiple
device types and Android versions.
Note that this addresses the error at hand but as I am unable to
reproduce the issue, does not necessarily address the root problem, so
there may still be other issues reported even after this is fixed.
A longer-term refactor would eliminate `SystemKeyboardLoaded` because
from what I can tell, we should always be able to determine that from
the state of `KMKeyboard.currentKeyboard`. However, the state
entanglement is a lot deeper than just those two variables, with cross
references to keyboard indexes between `KMManager` and `KMKeyboard`
which need to be resolved (`KMKeyboard` should *never* refer to
`KMManager`).
Relates to #949.
* Adds setSpacebarText() API to Keyman Engine for Android
* Adds displayName API to Keyman Engine for Android
* Adds Preference for spacebar text to Keyman for Android
* Sets default spacebar text to keyboard name for FirstVoices Keyboards
Relates to #5230, #5219.
[Draft]
Adds a silent parameter to the `downloadKMP` function and makes the
install silent for referred keyboards.
However, this is incomplete:
1. We need to be able to control silent levels:
* Completely silent
* Only welcome
* Full install
2. When silentInstall is true, currently welcome is still shown, but the
paging controls are not configured correctly and a blank screen is
shown after install.
Resolves#5219.
Uses the Google Play Install Referrer API to automatically discover the
keyboard to install together with Keyman; this keyboard is passed in a
`referrer` parameter to the Play Store page for the Keyman app from the
Keyman website.
To comply with upcoming Play Store requirement, this updates targetSDKVersion to 30.
* Also sets appropriate webView permissions to access local file (except for WebBrowserActivity, the in-app browser).