Revert line that could wrongly initialize RecentsView scroll

Test: open a random app that hasn't been opened in a while, touch down
on nav handle and see if RecentsView scrolls partially or fully
offscreen; repeat 20 times to be sure
Bug: 233112195
Fixes: 235369468

Change-Id: Ie8b3dbea7c4826af037edf22360946105ab22134
This commit is contained in:
Tony Wickham
2022-06-09 14:23:17 -07:00
parent fe83fce489
commit 3945f028de

View File

@@ -1187,7 +1187,9 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
}
public int getScrollForPage(int index) {
if (!pageScrollsInitialized() || index >= mPageScrolls.length || index < 0) {
// TODO(b/233112195): Use !pageScrollsInitialized() instead of mPageScrolls == null, once we
// root cause where we should be using runOnPageScrollsInitialized().
if (mPageScrolls == null || index >= mPageScrolls.length || index < 0) {
return 0;
} else {
return mPageScrolls[index];