This CL adds unit tests for InputMethodSubtypeSwitchingController
as a ground work to make it aware of
supportsSwitchingToNextInputMethod in a subsequent CL.
This CL never changes existing behavior.
BUG: 12981505
Change-Id: I3b2c46c47c7686b811fa248ad549f20875367425
This CL introduces InputMethodSubtypeArray which compresses
multiple instances of InputMethodSubtype to reduce the risk
of TransactionTooLargeException during IPCs.
There are some IMEs which rapidly adding new subtypes into
their supported language list. One problem here is that each
instance of InputMethodInfo internally owns the list of
supported subtypes. Basically it requires additional
200 ~ 300 bytes for each subtype when InputMethodInfo is
transffered via IPCs. We should keep the size less than
100 KB in typical scenario.
With this CL, the list of InputMethodSubtype is marshalled
with GZIP compression. Approximately one InputMethodInfo is
marshalled within 10 KB even when it has 100 subtypes.
No negative performance impact is observed so far. The cost of
decompression seems to be compensated by another optimization
in this CL. Actually marshalling cost is reduced with this CL
by caching the compressed data on demand.
BUG: 12954290
Change-Id: Ibb2940fcc02f3b3b51ba6bbe127d646fd7de7c45
This CL adds one more test to make sure InputMethodInfo
implements Parcelable correctly. This test makes sure that
one can marshall and unmarshall again from an unmarshalled
copy of InputMethodInfo.
BUG: 12954290
Change-Id: I5aa1552a8089fe0bac54513ba224e5bfc494be97
This CL adds a unit test to make sure that InputMethodInfo
implements Parcelable correctly.
BUG: 12954290
Change-Id: I0abe8c266b4b035bf8ef4688d11069b355fabe9f