Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e950c0c authored by Niels Egberts's avatar Niels Egberts Committed by android-build-merger
Browse files

Merge "Save instance to avoid crash opon restore in onCreate." into oc-dev am: dc322cf1

am: 5e0d74d8

Change-Id: Ie7c07301f2e34a5fe69e280a218a4de299cdb0f0
parents 2109bb68 5e0d74d8
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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() {
        final ContentResolver resolver = getContentResolver();