File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/SystemUI/src/com/android/systemui/recent Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ private int scrollPositionOfMostRecent() {
7575 }
7676
7777 private void addToRecycledViews (View v ) {
78+ if (mRecycledViews .contains (v )) {
79+ throw new RuntimeException ("Child was already recycled" );
80+ }
7881 if (mRecycledViews .size () < mNumItemsInOneScreenful ) {
7982 mRecycledViews .add (v );
8083 }
@@ -104,12 +107,11 @@ private void update() {
104107 if (mRecycledViews .size () != 0 ) {
105108 old = mRecycledViews .remove (mRecycledViews .size () - 1 );
106109 old .setVisibility (VISIBLE );
110+ if (old .getParent () != null ) {
111+ throw new RuntimeException ("Recycled child has parent (i: " + i + ", recycled i: " + mRecycledViews .size ());
112+ }
107113 }
108-
109114 final View view = mAdapter .getView (i , old , mLinearLayout );
110- if (view .getParent () != null ) {
111- throw new RuntimeException ("Recycled child has parent" );
112- }
113115
114116 if (mPerformanceHelper != null ) {
115117 mPerformanceHelper .addViewCallback (view );
You can’t perform that action at this time.
0 commit comments