am 8fe98699: Fix the behavior of preference in IME Settings

* commit '8fe9869955f4c85ccc2f3cb11dfbfdb253318ea1':
  Fix the behavior of preference in IME Settings
This commit is contained in:
satok
2011-09-27 20:36:28 -07:00
committed by Android Git Automerger

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(