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

Commit 5ddaa72b authored by Yigit Boyar's avatar Yigit Boyar Committed by Android (Google) Code Review
Browse files

Merge "Handle negative view types properly in getScrapView" into mnc-dev

parents 2723d49a f85e6739
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -6575,14 +6575,15 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
         * @return A view from the ScrapViews collection. These are unordered.
         */
        View getScrapView(int position) {
            final int whichScrap = mAdapter.getItemViewType(position);
            if (whichScrap < 0) {
                return null;
            }
            if (mViewTypeCount == 1) {
                return retrieveFromScrap(mCurrentScrap, position);
            } else {
                final int whichScrap = mAdapter.getItemViewType(position);
                if (whichScrap >= 0 && whichScrap < mScrapViews.length) {
            } else if (whichScrap < mScrapViews.length) {
                return retrieveFromScrap(mScrapViews[whichScrap], position);
            }
            }
            return null;
        }