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

Commit bae6fc24 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix for 2155255: Revert "Cache inflated view to avoid inflation of layouts in preferences"

This introduces problems when scrolling through preference screens, due
to a clash in this cache versus the ListView's cache.

This reverts commit 01dbc2ed.
parent 15f06995
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis
    private int mLayoutResId = com.android.internal.R.layout.preference;
    private int mWidgetLayoutResId;
    private boolean mHasSpecifiedLayout = false;
    private View mLayoutView;
    
    private OnPreferenceChangeInternalListener mListener;
    
@@ -337,7 +336,7 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis
        if (!mHasSpecifiedLayout) {
            mHasSpecifiedLayout = true;
        }
        mLayoutView = null;
        
        mLayoutResId = layoutResId;
    }
    
@@ -361,7 +360,6 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis
     * @see #setLayoutResource(int)
     */
    public void setWidgetLayoutResource(int widgetLayoutResId) {
        mLayoutView = null;
        mWidgetLayoutResId = widgetLayoutResId;
    }

@@ -389,10 +387,7 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis
     */
    public View getView(View convertView, ViewGroup parent) {
        if (convertView == null) {
            if (mLayoutView == null) {
                mLayoutView = onCreateView(parent);
            }
            convertView = mLayoutView;
            convertView = onCreateView(parent);
        }
        onBindView(convertView);
        return convertView;