Consume pending should bring layout to clean state
Previously, consumePendingUpdateOperations would not run a layout calculation
if the first layout has not happened yet. This was inherited from old logic
where RV runs its own layout pass and if the view hierarchy will run a layout
pass, we rather skip it.
This was not the correct behavior for some use cases where we may receive a
scroll / fling etc callback while mFirstLayoutComplete is false (e.g. RV
has just been attached).
Since RV's custom layout request already checks for first layout flag and
this method is heavily used to sync state of the layout, I'm changing it
to RUN a layout if first layout has not happened and we need to sync
state to be able to call incremental methods.
Bug: 27926253
Change-Id: I3ba5b705713782de6140d4a1da6ef4fc05e94f5c
3 files changed