mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-24 08:36:26 +00:00
fix system sometimes enabling wrong subtype
This commit is contained in:
parent
237adc991b
commit
d1c2ad0a39
2 changed files with 6 additions and 0 deletions
|
@ -853,6 +853,11 @@ public class LatinIME extends InputMethodService implements
|
|||
public void onCurrentInputMethodSubtypeChanged(final InputMethodSubtype subtype) {
|
||||
// Note that the calling sequence of onCreate() and onCurrentInputMethodSubtypeChanged()
|
||||
// is not guaranteed. It may even be called at the same time on a different thread.
|
||||
if (subtype.hashCode() == 0xf000000f) {
|
||||
// For some reason sometimes the system wants to set the dummy subtype, which messes with the currently enabled subtype.
|
||||
// Now that the dummy subtype has a fixed id, we can easily avoid enabling it.
|
||||
return;
|
||||
}
|
||||
InputMethodSubtype oldSubtype = mRichImm.getCurrentSubtype().getRawSubtype();
|
||||
StatsUtils.onSubtypeChanged(oldSubtype, subtype);
|
||||
mRichImm.onSubtypeChanged(subtype);
|
||||
|
|
|
@ -24,6 +24,7 @@ the system picker crashes on some devices for unknown reasons.
|
|||
<subtype android:icon="@drawable/ic_ime_switcher"
|
||||
android:imeSubtypeExtraValue="dummy"
|
||||
android:imeSubtypeMode="keyboard"
|
||||
android:subtypeId="0xf000000f"
|
||||
android:isAsciiCapable="true"
|
||||
/>
|
||||
</input-method>
|
||||
|
|
Loading…
Add table
Reference in a new issue