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

Commit 17d262f2 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I69220990 into eclair

* changes:
  Fix for 2155255: Revert "Cache inflated view to avoid inflation of layouts in preferences"
parents bcbca57f bae6fc24
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;