Introduce a default Voice IME concept.
This is configured by the system config resource, config_systemSpeechRecognizer, which also provides the default VoiceRecognitionService and the holder for the SYSTEM_SPEECH_RECOGNIZER role. InputMethodManagerService updates the new DEFAULT_VOICE_INPUT_METHOD setting and handles changes to the config_systemSpeechRecognizer value. No updates are made through the Settings UpgradeController because any updates that would be needed are already handled by the logic for config value changes. Testing: 1. Enable DEBUG logging in InputMethodManagerService. 2. $ m -j && adb remount && adb shell stop && adb sync && adb shell start 3. $ adb shell settings get secure enabled_input_methods; \ adb shell settings get secure default_input_method; \ adb shell settings get secure disabled_system_input_methods; \ adb shell settings get secure default_voice_input_method 4. Check logcat to make sure nothing looks suspect. Cases tested: - IME wasn't already in the enabled IME list - IME was already enabled - no value for config_systemSpeechRecognizer - new user added - locale changed - config package doesn't have an IME - update without config value, then set a config value - config value updated (when both values had valid IMEs) - combinations of the above cases, as appropriate Bug: 175480456 Test: manual - see above Test: atest InputMethodUtilsTest Test: atest CtsInputMethodTestCases --retry-any-failure Change-Id: I1abdc145e3d5969fbb69811df2ca2e35c7a177e1
Loading
Please register or sign in to comment