Fix the behavior of preference in IME Settings
Change-Id: I41f7c36fb73730248dcc98abbf4276ef6d772f36
This commit is contained in:
@@ -104,16 +104,18 @@ public class InputMethodPreference extends CheckBoxPreference
|
||||
mSummaryText = (TextView)view.findViewById(android.R.id.summary);
|
||||
final boolean hasSubtypes = mImi.getSubtypeCount() > 1;
|
||||
final String imiId = mImi.getId();
|
||||
mInputMethodPref.setOnLongClickListener(new OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View arg0) {
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putString(Settings.EXTRA_INPUT_METHOD_ID, imiId);
|
||||
startFragment(mFragment, InputMethodAndSubtypeEnabler.class.getName(),
|
||||
0, bundle);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (hasSubtypes) {
|
||||
mInputMethodPref.setOnLongClickListener(new OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View arg0) {
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putString(Settings.EXTRA_INPUT_METHOD_ID, imiId);
|
||||
startFragment(mFragment, InputMethodAndSubtypeEnabler.class.getName(),
|
||||
0, bundle);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (mSettingsIntent != null) {
|
||||
mInputMethodSettingsButton.setOnClickListener(
|
||||
|
Reference in New Issue
Block a user