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

Commit 191ca0b4 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Add InputMethodSubtypeHandle (again)

This CL introduces

  InputMethodSubtypeHandle

which is similar to what we used to have in the past [1].

In the previous attempt,

  com.android.server.input.PersistentDataStore

saved the data into the storage in the following format.

  <keyboard-layout
      descriptor="..."
      input-method-id="com.android.testime/.Ime1"
      input-method-subtype-id="1"
      ... />

While the new format is going to be something as follows, in general
InputMethodSubtypeHandle enables you to treat the actual String object
as an opaque byte data by providing both decode/encode methods with
data validation.

  <keyboard-layout
      descriptor="..."
      input-method-subtype-handle="com.android.testime/.Ime1:subtype:1"
      ... />

In addition to decode/encode methods, InputMethodSubtypeHandle
provides several useful functionality such as Parcel support and
methods like getComponentName().

See test cases for details.

 [1]: Ie88ce1ab77dbfe03ab51d89c1dc9e0a7ddbb3216
      d5f7ed9f

Bug: 252816846
Test: atest FrameworksCoreTests:InputMethodSubtypeHandleTest
Change-Id: I5b052fba64f8036e7dd874c34b81f5fd4ffeaca3
parent 7a5652f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment