Be aware of "nm" and "noMicrophoneKey" private IME option

Bug: 4340933
Change-Id: I787108a73d4450963d644bc7070ae1672ebb4455
This commit is contained in:
Tadashi G. Takaoka 2011-07-31 18:20:20 -07:00
parent 2ba975afb9
commit 73e716f202

View file

@ -313,7 +313,12 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
} }
final boolean settingsKeyEnabled = settingsValues.isSettingsKeyEnabled(editorInfo); final boolean settingsKeyEnabled = settingsValues.isSettingsKeyEnabled(editorInfo);
final boolean voiceKeyEnabled = settingsValues.isVoiceKeyEnabled(editorInfo); final boolean noMicrophone = Utils.inPrivateImeOptions(
mPackageName, LatinIME.IME_OPTION_NO_MICROPHONE, editorInfo)
|| Utils.inPrivateImeOptions(
null, LatinIME.IME_OPTION_NO_MICROPHONE_COMPAT, editorInfo);
final boolean voiceKeyEnabled = settingsValues.isVoiceKeyEnabled(editorInfo)
&& !noMicrophone;
final boolean voiceKeyOnMain = settingsValues.isVoiceKeyOnMain(); final boolean voiceKeyOnMain = settingsValues.isVoiceKeyOnMain();
final boolean noSettingsKey = Utils.inPrivateImeOptions( final boolean noSettingsKey = Utils.inPrivateImeOptions(
mPackageName, LatinIME.IME_OPTION_NO_SETTINGS_KEY, editorInfo); mPackageName, LatinIME.IME_OPTION_NO_SETTINGS_KEY, editorInfo);