Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 82c4baba authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Introduce IMM#setExplicitlyEnabledInputMethodSubtypes()

While it still makes sense to require a user consent when enabling
non-system IMEs, programmatically modifying explicitly enabled
subtypes can be allowed for each IME as long as affected subtypes are
their own.  This is why

  IMM#setExplicitlyEnabledInputMethodSubtypes(String, int[])

is introduced in this CL.  Here are use cases for IME developers.

  * If they like, IME developers can take full control of what
    subtypes are explicitly enabled for their IME, with their own
    settings UI instead of relying on
      InputMethodManager#showInputMethodAndSubtypeEnabler()
    and user interactions.  This also enables IME developers to
    backup and restore enabled subtypes in some cloud services.

  * If IME developers find that
      Settings.Secure.ENABLED_INPUT_METHODS
    contains any invalid subtype hashcode, or they plan to migrate
    some legacy subtype hashcode to a new subtype hashcode, they can
    programmatically fix/migrate it without bothering users.

See also the corresponding end-to-end test in CTS [1].

 [1]: I0d46efb1ec98aaf529e2d531205ccd2cc0261492

Fix: 249110888
Test: atest CtsInputMethodTestCases:InputMethodSubtypeTest
Test: atest FrameworksServicesTests:InputMethodUtilsTest#updateEnabledImeStringTest
Change-Id: I836903dbdb6bc1ff3dc4b99710e4e08a65f59417
parent 16d89714
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment