Fix PrefetchRegistry reset, out of bounds exceptions
Bug: 35708283
Test: adb shell am instrument -w -r -e debug false -e size small android.support.v17.leanback.test/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w -r -e debug false -e size small android.support.v7.recyclerview.test/android.support.test.runner.AndroidJUnitRunner
Test: ran BrowseFragmentTest / BrowseSupportFragmentTest 5 times in a row, each
Improper reset of the prefetch registry in conjunction with partial
prefetch of invisible views was causing negative item positions to be
attempted to be loaded.
This allows us to un-@Suppress the browse fragment tests in leanback
lib tests.
Change-Id: I931b25d560c9229676cfbec4b217abcbf7e43b4b
4 files changed