[Xposed Framework Modules] Roughy:
Exi for Swiftkey 1.5.2 release

1.5.2 [ 31.05.2018 ] - Compatibility fixes, async setup ( Stable: 7.0.5.45, Beta: 7.0.6.25 )

Changes in [1.5.2] (Stable: 7.0.5.45, Beta: 7.0.6.25) :

Fixed

- Keyboard not centering properly on some devices

- Swiping from shift messing with auto-capitalization

- Emoji tabs not matching keyboard theme

Added

- Async hook setup with progress displayed on keyboard

Changed

- Removed Emoji pre-rendering

Download:

Exi for Swiftkey on Xposed module repository

Notes:

Async hook setup

There have been more than a few complaints of the module just causing Swiftkey to freeze, when in reality it was still perfoming first-time setup. Starting with android P, android will start making apps' that hang like this just crash instead, meaning things module would break. The solution is to perform most of the first-time setup off the main thread. This is difficult, because a lot of the hooks have to be in place before Swiftkey starts, so we can't let it resume executing until we're done.

The solution is to separate the various hooks into two categories: Hooks that must be in place before Swiftkey runs, and hooks don't care.

I have also added a progress overlay to the keyboard if you happen to open it before it's done, giving you a very rough idea of it's progress:

This has the potential to cause a lot of... issues.

I think I've caught them all, but only noticed the last few during final testing, so I wouldn't be surprised if I've let something slip through the cracks. Feedback wanted.

I have also had Swiftkey crash on my twice after implementing this, but android didn't log any useful information, and I have been unable to reproduce them.

This only occurred on a fresh install, and everything was fine after relaunching Swiftkey so... minor issue that probably won't matter.

Keyboard not centering properly on some devices [MENTION=9172217]DieHoe[/MENTION]

Apparently only affected a single user, but the original setup was ugly and rushed anyway. Swiftkey switched to using a ConstraintLayout for their... well, everything. The quick fix was ugly, and this new solution is basically what we did originally. Just requires a few extra steps to cope with the new view constraints.

Swiping from shift messing with auto-capitalization [MENTION=6991940]Kingody[/MENTION]

Swipe-selection is implemented by continuously checking for a matching swipe gesture, and hijacking the touch event as necessary. The problem with the shift key is that it triggers the second your finger touches the screen; it doesn't wait for you to raise your finger. This of course doesn't explain why auto-capitalization goes haywire as a result, but the solution is simple: Delay the shift key on-down event from triggering until the user lifts their finger, and cancel it completely if they trigger a swipe event first.

Emoji tabs not matching keyboard theme

I think this has been a problem for a while, but either nobody noticed or nobody cared. The tab ( upper bar that displays the icons for each emoji panel ) will now match the keyboard style correctly.

Removed Emoji pre-rendering

This honestly just made it feel slower, because it would end up loading the previous panel even though you scrolled right past it. Now it's just back to being render-when-user-sees-it mode.