Use android.provider.Settings.EXTRA_INPUT_METHOD_ID
This change also fixes the action name of android.settings.INPUT_METHOD_SUBTYPE_SETTINGS. Change-Id: Ie08e7f9144f8ff8faa8e7d8edf63fbd59421b18c
This commit is contained in:
@@ -39,9 +39,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
|
||||
|
||||
public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
|
||||
|
||||
private AlertDialog mDialog = null;
|
||||
private boolean mHaveHardKeyboard;
|
||||
final private HashMap<String, List<Preference>> mInputMethodAndSubtypePrefsMap =
|
||||
@@ -58,7 +55,8 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
|
||||
mImm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
Configuration config = getResources().getConfiguration();
|
||||
mHaveHardKeyboard = (config.keyboard == Configuration.KEYBOARD_QWERTY);
|
||||
mInputMethodId = getActivity().getIntent().getStringExtra(EXTRA_INPUT_METHOD_ID);
|
||||
mInputMethodId = getActivity().getIntent().getStringExtra(
|
||||
android.provider.Settings.EXTRA_INPUT_METHOD_ID);
|
||||
onCreateIMM();
|
||||
setPreferenceScreen(createPreferenceHierarchy());
|
||||
}
|
||||
|
@@ -223,7 +223,7 @@ public class InputMethodConfig extends SettingsPreferenceFragment {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
|
||||
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
intent.putExtra(InputMethodAndSubtypeEnabler.EXTRA_INPUT_METHOD_ID, imiId);
|
||||
intent.putExtra(Settings.EXTRA_INPUT_METHOD_ID, imiId);
|
||||
prefScreen.setIntent(intent);
|
||||
keyboardSettingsCategory.addPreference(prefScreen);
|
||||
mActiveInputMethodsPrefMap.put(imi, prefScreen);
|
||||
|
Reference in New Issue
Block a user