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

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

Address confusions around "subtypeId" in InputMethodSettings

This CL aims to clarify confusions around "subtypeId" in
InputMethodSettings without changing any observable behavior.

Due to historical confusion around InputMethodUtils#NOT_A_SUBTYPE_ID,
which happens to be -1, we have somehow used "-1" as an invalid data
when dealing with subtypeHashCode saved in the Secure Settings.

Strictly speaking, however, InputMethodUtils#NOT_A_SUBTYPE_ID, is an
invalid "array index", while the Secure Settings deal with invalid
subtype hashcode. To avoid future confusion, this CL introduces a new
constant

  * INVALID_SUBTYPE_HASHCODE
  * INVALID_SUBTYPE_HASHCODE_STR

to effectively decouple them from InputMethodUtils#NOT_A_SUBTYPE_ID
with keeping the current data format in the Secure Settings.

Bug: 346662143
Test: presubmit
Flag: EXEMPT refactor
Change-Id: Ic4968449ea89debc3bc9e519a724c16222851235
parent 825c7a1a
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