-
-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load Rime in Background Thread #1152
Conversation
Works like charm, this will improve user experience. The UI is very very fast with pop on Trime keyboard now in my phone from 1-2s to about 0s. Some improvements: If you have time, can you change the Default For the newline, I will add .editorconfig later. |
ok. If possible, please ask more users to test this build. I think that this is a rather risky change and may have some unexpected bugs🥴. |
We have QQ group in Trime about page, you can share the build to these groups. Found three issue in commit 1b9eb75
The third issue happens in the latest commit, the others two seem disappear right now. |
PS:Sadly, i don't have QQ account. |
The random crash seems fixed in latest commit. The third issue still show up with latest commit, see #1156 The main merging blocker issue is the random full screen with keyboard, seems the size of the keyboard is wrong when setup the keyboard. |
I have more than 5 user dict that need to be synchronized. When I send intent "com.osfans.trime.timing.sync," the keyboard won't pop up, and the main program freezes. |
Supposedly it is the same function as before, only now it run in a background thread. |
I have tested other versions without this pr, These problems seem unrelated to this pr. |
All three issues seem gone in latest commit. New crash issue #1158 seems caused by this pull request, but it's not a merge blocker issue. I will merge this later, you can rebase your branch on develop branch if you have time. |
Found another blocking issue #1159 |
If this plan can be perfectly implemented, is it possible to use dual RIME engines during deployment? One for deployment and one for use.🤔️ |
I doubt it, as they will be reading and writing in the same directory. |
With the latest commit, the #1159 blocking issue was resovled, but the #1158 issue still can be reproduced with my phone. Some work around patch, more better ideas are welcome. This fix the restart crash, but first keyborad pop up will lead to crash too. Seems we can move this part to RimeWrapper and delay the setup when the media is not mounted, like permission checking.
|
got it. |
With the latest commit, the crash won't show up in android restart, but still show up in first keyboard pop up with restart with the exact same crash in #1158. Seems we should add this check in first keyboard pop up event too. |
Another new crash with NPE.
Why initalKeyboard is set to null which will lead to NPE error? |
Remove this line will fix the NPE crash. |
I have already added checking for all places (in |
Just try to save some memory. Will not set it to null then if it will lead to NPE. |
No keyborad show up instead of crash page, the second time to pop up keyboard, no crash anymore. Seems the second time keyboard pops up, the medis is mounted. It will crash every time when phone restart, not a serious issue but something annoying. |
Will the crash appear no matter how long u waited after the restart? But that's strange. After crash, it will always be the "first" start. |
|
First pop up crash after restart can be reproduced in the latest commit d7e4925 |
Same exception? |
No custom shared directory, same exception too. |
41b81c5
to
f70e525
Compare
Currently candidate view use the default style in Android OS, which varies in different manufacturer. Adding a style to it so that it has the same scrollbar on different Android model.
Add `rimeActionWIthResultDialog()` to run deploy and display a result dialog. Cannot add to `schemaPickers` because the token of windows maybe null if it is started by a keyboard view.
…missions If permissions are not granted, `RimeWrapper.canStart` will be set to false, so `RimeWrapper` will save the `Runnable` and wait to start later. When permission are granted, `RimeWrapper.canStart` will be set to true in `onCreate()`, `onCreateInputView()` and `onStartInputView()`. And rime deployment will be triggered accordingly. For UI display: If permissions are not granted, an error message will be displayed in `InitialKeyboard`. If permissions are granted, `InitialKeyboard` with deployment progress will be displayed. If deployment is completed, the normal keyboard will be displayed. Do not set `initialKeyboard` to null to prevent NPE. As the callback in `RimeWrapper` maybe perform faster or slower, we will not be sure when `setInputView()` will run. We should either check for null for all call to `initialKeyboard`, or do not set it to null. Refs osfans#1159
Set external storage path and its related directory as getter property, so that it will return the latest value when it is called. Refs osfans#1158
Pull request
Issue tracker
Fix #849
Fix #949
Fix #1098
Fix #1146
Fix #1156
Fix #1158
Fix #1159
Feature
Wrap
Rime
inRimeWrapper
, then load it in background thread. Display a loading screen when keyboard is used during Rime's initialization.Code of conduct
Style lint
make sytle-lint
Build pass
make debug
Manually test
Code Review
Daily build
Login and download artifact at https://github.com/osfans/trime/actions
Additional Info