Save instance to avoid crash opon restore in onCreate.
Bug: 37110223 Test: mmma packages/apps/Settings Change-Id: I82457880bf310efbb7e999a5776858e47b0660c9
This commit is contained in:
@@ -265,6 +265,19 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSaveInstanceState(Bundle outState) {
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
|
||||||
|
// Save the mLocalePreference values, so we can repopulate it with entries.
|
||||||
|
outState.putCharSequenceArray(STATE_KEY_LOCALE_ENTRIES,
|
||||||
|
mLocalePreference.getEntries());
|
||||||
|
outState.putCharSequenceArray(STATE_KEY_LOCALE_ENTRY_VALUES,
|
||||||
|
mLocalePreference.getEntryValues());
|
||||||
|
outState.putCharSequence(STATE_KEY_LOCALE_VALUE,
|
||||||
|
mLocalePreference.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
private void initSettings() {
|
private void initSettings() {
|
||||||
final ContentResolver resolver = getContentResolver();
|
final ContentResolver resolver = getContentResolver();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user