Fixed ArrayIndexOutOfBoundsException in Contacts Fragment.

If a user caused their activity to undergo several state changes rapidly, they
could get the contacts fragment into a state where it wouldn't have any
elements but still call onScrollChange. This would result in calls to
getFirstCompletelyVisibleItemPosition returning NO_POSITION (-1) and throw an
AIOOBE when attempting to get a row's header value.

Bug: 63594129
Test: manual.
PiperOrigin-RevId: 161610423
Change-Id: I0c53587a6499c42abe5e51b6ac2b4108c0971545
1 file changed
tree: 0b92b6bcc012389d34e8d6bb5acf689e0ac92597
  1. assets/
  2. java/
  3. Android.mk
  4. AndroidManifest.xml
  5. LICENSE