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

Commit 81d86001 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix a race condition when entering and exiting a preference fragment quickly.

Bug: 3413715

Fragment was going through STARTED/RESUMED/STARTED/CREATED very quickly and
bindPreferences() was a delayed call that happened after mView was nullified.
Removing the MSG_BIND_PREFERENCES when view is destroyed.

Change-Id: Iec43102c004a266c412b993f17e1a8c1699fb0b1
parent 0528bc77
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ public abstract class PreferenceFragment extends Fragment implements
    public void onDestroyView() {
        mList = null;
        mHandler.removeCallbacks(mRequestFocus);
        mHandler.removeMessages(MSG_BIND_PREFERENCES);
        super.onDestroyView();
    }