Change-Id: I30d28c3a62cc5de3432f04b6469eca077ee3eff6
@Override
public void onSaveInstanceState(final Bundle outState) {
- outState.putString(
- UserDictionaryAddWordContents.EXTRA_WORD, mContents.mEditText.getText().toString());
- outState.putString(UserDictionaryAddWordContents.EXTRA_LOCALE, mContents.mLocale);
+ mContents.saveStateIntoBundle(outState);
}
public void onClickCancel(final View v) {
mLocale = null == locale ? Locale.getDefault().toString() : locale;
}
+ /* package */ void saveStateIntoBundle(final Bundle outState) {
+ outState.putString(EXTRA_WORD, mEditText.getText().toString());
+ outState.putString(EXTRA_LOCALE, mLocale);
+ }
+
/* package */ void apply(final Context context) {
final ContentResolver resolver = context.getContentResolver();
if (UserDictionaryAddWordContents.MODE_EDIT == mMode && !TextUtils.isEmpty(mOldWord)) {