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

Commit b1a50f2d authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix bug #16957601 Stability: ISE in Settings: Observer com.android.settings.

SettingsPreferenceFragment$1@273c8fdb was not registered

- add onUnbindPreferences() call to match onBindPreferences()
- this new method is @hide so it does not impact the APIs

Change-Id: Iee0ab8a4ecc2046f89fb96cc52af150e835f658c
parent 72db6908
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@ public abstract class PreferenceFragment extends Fragment implements
     */
    public void setPreferenceScreen(PreferenceScreen preferenceScreen) {
        if (mPreferenceManager.setPreferences(preferenceScreen) && preferenceScreen != null) {
            onUnbindPreferences();
            mHavePrefs = true;
            if (mInitDone) {
                postBindPreferences();
@@ -349,6 +350,10 @@ public abstract class PreferenceFragment extends Fragment implements
    protected void onBindPreferences() {
    }

    /** @hide */
    protected void onUnbindPreferences() {
    }

    /** @hide */
    public ListView getListView() {
        ensureList();