Skip to content

Commit a926580

Browse files
committed
Adding more logging for bug: 6499508
Change-Id: Iffc099e7de8b1d24bb33f1df6e17df7a099bfcb2
1 parent ca5a148 commit a926580

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)