Fixing crash when focusing tasks.
- We call bindVisibleTaskViews() at the new scroll value expecting all
visible task views at that scroll to be bound synchronously, however,
the call to computeVisibleTaskTransforms() would not produce the
correct visible range if the visible range at the current and new
scroll resulted in gaps (ie. at scroll 0, 0-3 are visible, and at
scroll s, 5-8 were visible). As a result, the task view would not be
bound, causing a later crash.
Instead of the optimization before, which would assume every task
after the first non-visible task would also be non-visible, we can
just update the transforms for all task views. This ensures that
all visible task views should be bound, even if they are not in a
contiguous range. A global range is still provided in the call to
allow accessibility to focus the next task when a task is unbound at
the two ends of the stack.
- Also removing expensive calls to remove all listeners and cancel
animations that are not even started.
Bug:
27295423
Change-Id: Ib309e9de3095cacb178ae9ff5c53b8ee2c7ddac0