This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify the purpose of EditorInfo#hintLocales.
During the initial attempt to support automatic language switching in LatinIME, it turns out that the current EditorInfo#locales is difficult to use and even confusing in some situations. Based on that experience, this CL changes as follows: * Rename EditorInfo#locales to EditorInfo#hintLocales: This is mainly to avoid possible confusion when to set this. We want to make it clear that having non-empty LocaleList there is a clear signal that the user would switch to certain languages regardless of the currently selected input method subtype. * Make EditorInfo#hintLocales nullable: Previously marshaling EditorInfor causes NPE when EditorInfo#hintLocales is null. This CL relaxes such a restriction. * Introduce TextView#{set, get}ImeHintLocales(): In the previous implementation [1], we just copied TextView#getTextLocales() into EditorInfo. This is, however, does not work well because it is no more or less than the default value. If LatinIME supports automatic language switching, having the default value in EditorInfo actually means that whenever you focus in a new text field, the keyboard language is reset to the default locale. In order to make this "hint" useful for IME developers, this "hint" should be specified only when the application developers are confident to do so. [1]: I738ffaaf07091d8b980f8bfc6e16227fcb85a96a 0445fdf Bug: 22859862 Change-Id: I0a730011874ea8d01e50624ed3f1ecd197d05f94
- Loading branch information
Showing
6 changed files
with
68 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters