Prevent preLayout span size lookup calls
GridLayoutManager had a bug where the code path which
selects a View to be the anchor view was not going through
the cached span size lookup method. This could be a
problem because it misses the pre-layout cache and the
position is not converted into an adapter position,
possibly triggering an index out of bounds exception on
the SpanSizeLookup class.
This CL changes that method to use the cache. CL is
bigger than the actual change because I had to update method
signatures to be able to pass recycler and state objects
down to the lookup methods
Change-Id: I524504ae3ea3356b8a1b16b78924258003f6169e
Bug:21590767
3 files changed