am 30e3b66f: Merge "[IL15] Some small refactoring"
* commit '30e3b66fa3003f9008f8164539bae5540f454cf4': [IL15] Some small refactoringmain
commit
3ae5c14c18
|
@ -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
|
||||
|
|
|
@ -999,7 +999,7 @@ public final class InputLogic {
|
|||
* Handle a press on the settings key.
|
||||
*/
|
||||
private void onSettingsKeyPressed() {
|
||||
mLatinIME.onSettingsKeyPressed();
|
||||
mLatinIME.displaySettingsDialog();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue