am 8a711f2a: Remove unneeded Context argument

* commit '8a711f2a547a61b9f4f3ef3bdb79a66b618db58f':
  Remove unneeded Context argument
main
Tadashi G. Takaoka 2014-11-21 03:59:48 +00:00 committed by Android Git Automerger
commit e757c9605f
5 changed files with 8 additions and 9 deletions

View File

@ -110,7 +110,7 @@ public class RichInputMethodManager {
// Initialize additional subtypes.
SubtypeLocaleUtils.init(context);
final InputMethodSubtype[] additionalSubtypes = getAdditionalSubtypes(context);
final InputMethodSubtype[] additionalSubtypes = getAdditionalSubtypes();
setAdditionalInputMethodSubtypes(additionalSubtypes);
final ConnectivityManager connectivityManager =
@ -119,11 +119,10 @@ public class RichInputMethodManager {
mIsNetworkConnected = (info != null && info.isConnected());
}
public InputMethodSubtype[] getAdditionalSubtypes(final Context context) {
SubtypeLocaleUtils.init(context);
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
public InputMethodSubtype[] getAdditionalSubtypes() {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext);
final String prefAdditionalSubtypes = Settings.readPrefAdditionalSubtypes(
prefs, context.getResources());
prefs, mContext.getResources());
return AdditionalSubtypeUtils.createAdditionalSubtypesArray(prefAdditionalSubtypes);
}

View File

@ -69,7 +69,7 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver {
// subtypes when the package is replaced.
RichInputMethodManager.init(context);
final RichInputMethodManager richImm = RichInputMethodManager.getInstance();
final InputMethodSubtype[] additionalSubtypes = richImm.getAdditionalSubtypes(context);
final InputMethodSubtype[] additionalSubtypes = richImm.getAdditionalSubtypes();
richImm.setAdditionalInputMethodSubtypes(additionalSubtypes);
LauncherIconVisibilityManager.updateSetupWizardIconVisibility(context);
} else if (Intent.ACTION_BOOT_COMPLETED.equals(intentAction)) {

View File

@ -75,7 +75,7 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase {
mRichImm = RichInputMethodManager.getInstance();
// Save and reset additional subtypes preference.
mSavedAdditionalSubtypes = mRichImm.getAdditionalSubtypes(context);
mSavedAdditionalSubtypes = mRichImm.getAdditionalSubtypes();
final InputMethodSubtype[] predefinedAdditionalSubtypes =
AdditionalSubtypeUtils.createAdditionalSubtypesArray(
AdditionalSubtypeUtils.createPrefSubtypes(

View File

@ -76,7 +76,7 @@ public class RichInputMethodSubtypeTests extends AndroidTestCase {
mRichImm = RichInputMethodManager.getInstance();
// Save and reset additional subtypes
mSavedAddtionalSubtypes = mRichImm.getAdditionalSubtypes(context);
mSavedAddtionalSubtypes = mRichImm.getAdditionalSubtypes();
final InputMethodSubtype[] predefinedAddtionalSubtypes =
AdditionalSubtypeUtils.createAdditionalSubtypesArray(
AdditionalSubtypeUtils.createPrefSubtypes(

View File

@ -73,7 +73,7 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
mRichImm = RichInputMethodManager.getInstance();
// Save and reset additional subtypes
mSavedAddtionalSubtypes = mRichImm.getAdditionalSubtypes(context);
mSavedAddtionalSubtypes = mRichImm.getAdditionalSubtypes();
final InputMethodSubtype[] predefinedAddtionalSubtypes =
AdditionalSubtypeUtils.createAdditionalSubtypesArray(
AdditionalSubtypeUtils.createPrefSubtypes(