Ignore accessibility events if layout is invalid

This CL adds a check to AccessibilityDelegate to ignore accessibility info
requests if RecyclerView has a pending layout calculation. These callbacks
are problematic to handle in these limbo states because any custom callback
does not necessarily know whether RecyclerView could update or not.
Also, since there will be a layout calculation in near future, all these
events will arrive again.

This CL also adds a public API to query this state so that developers can
take advantage of it for custom logic (e.g. ignore click event if data is
invalid).

Bug: 19085424
Bug: 19717689
Change-Id: Ice13ed8d77657632007686bc57183f09954b8e8a
5 files changed