Set flagForceAscii for device password entries
Since the beginning [1], ChooseLockPassword#validatePassword() has never accepted non-ASCII characters [2]. Hence we can safely specify EditorInfo#IME_FLAG_FORCE_ASCII so that IMEs can optimize their UX based on this flag. Note that EditorInfo#IME_FLAG_FORCE_ASCII is just a hint for the IME so there should be no behavior change in the system side. Note also that EditorInfo#IME_FLAG_FORCE_ASCII has been used in KeyGuard (keyguard_password_view.xml) since JB MR-1 [3] so this flag is considered to be well tested. [1]: 00d2476d [2]: Only character c where 32 <= c <= 126 is accepted [3]: Id75286113771ca1407e9db182172b580f870b612 Test: Run `adb shell dumpsys input_method` when the password entry field is focused to make sure that 'imeOptions' parameter has 0x80000000 bit. Tested the following scenarios: - PIN on a direct-boot disabled device - PIN on a direct-boot enabled device - Password on a direct-boot disabled device - Password on a direct-boot enabled device Fixes: 27858858 Change-Id: I3075e24c6dac4d49f4d0e56a0d4d8434a323754d
Loading
Please register or sign in to comment