am 30e3b66f: Merge "[IL15] Some small refactoring"

* commit '30e3b66fa3003f9008f8164539bae5540f454cf4':
  [IL15] Some small refactoring
main
Jean Chalard 2013-12-19 20:12:13 -08:00 committed by Android Git Automerger
commit 3ae5c14c18
5 changed files with 6 additions and 7 deletions

View File

@ -1299,8 +1299,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mUserDictionary.addWordToUserDictionary(wordToEdit);
}
// TODO[IL]: Rework the route through which this is called.
public void onSettingsKeyPressed() {
public void displaySettingsDialog() {
if (isShowingOptionDialog()) return;
showSubtypeSelectorAndSettings();
}
@ -2375,7 +2374,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final CharSequence[] items = new CharSequence[] {
// TODO: Should use new string "Select active input modes".
getString(R.string.language_selection_title),
getString(ApplicationUtils.getAcitivityTitleResId(this, SettingsActivity.class)),
getString(ApplicationUtils.getActivityTitleResId(this, SettingsActivity.class)),
};
final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {
@Override

View File

@ -999,7 +999,7 @@ public final class InputLogic {
* Handle a press on the settings key.
*/
private void onSettingsKeyPressed() {
mLatinIME.onSettingsKeyPressed();
mLatinIME.displaySettingsDialog();
}
/**

View File

@ -98,7 +98,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment
final PreferenceScreen preferenceScreen = getPreferenceScreen();
if (preferenceScreen != null) {
preferenceScreen.setTitle(
ApplicationUtils.getAcitivityTitleResId(getActivity(), SettingsActivity.class));
ApplicationUtils.getActivityTitleResId(getActivity(), SettingsActivity.class));
}
final Resources res = getResources();

View File

@ -39,7 +39,7 @@ public final class SpellCheckerSettingsFragment extends PreferenceFragment {
addPreferencesFromResource(R.xml.spell_checker_settings);
final PreferenceScreen preferenceScreen = getPreferenceScreen();
if (preferenceScreen != null) {
preferenceScreen.setTitle(ApplicationUtils.getAcitivityTitleResId(
preferenceScreen.setTitle(ApplicationUtils.getActivityTitleResId(
getActivity(), SpellCheckerSettingsActivity.class));
}
}

View File

@ -31,7 +31,7 @@ public final class ApplicationUtils {
// This utility class is not publicly instantiable.
}
public static int getAcitivityTitleResId(final Context context,
public static int getActivityTitleResId(final Context context,
final Class<? extends Activity> cls) {
final ComponentName cn = new ComponentName(context, cls);
try {