Fix the behavior of preference in IME Settings

Change-Id: I41f7c36fb73730248dcc98abbf4276ef6d772f36
This commit is contained in:
satok
2011-09-28 12:01:22 +09:00
parent 0554ddb39a
commit 8fe9869955

View File

@@ -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(