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
1 file changed