Introduce InputMethodSubtypeSafeList IMM#getEnabledInputMethodSubtypeList() can return a large list of subtypes, which may cause a TransactionTooLargeException. This patch introduces InputMethodSubtypeSafeList to wrap the list as a byte array, avoiding the exception. This mirrors the existing InputMethodInfoSafeList pattern introduced in [1]. Additionally, this change extracts the common marshalling logic from InputMethodInfoSafeList into a new AbstractSafeList and refactors both SafeList classes to extend it. [1] I0a7667070fcdf17d34b248a5988c38064588718a Bug: 449416164 Bug: 449181366 Bug: 449393786 Bug: 449227003 Test: CtsInputMethodTestCases:{InputMethodRegistrationTest,InputMethodInfoTest} Test: InputMethodCoreTests Flag: EXEMPT BUGFIX (cherry picked from commit 1d68a1099be2b99e8410dad01822851287994682) Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:945058179409359060bc68e2915a33416fa42ee8 Merged-In: Ied64a9f018fd3e79cfc51ccd82d361b43e5f29dc Change-Id: Ied64a9f018fd3e79cfc51ccd82d361b43e5f29dc