More logging for the widgets scroll bug

Bug: 160238801
Change-Id: I198aea39ccbb3b4ab6d8696cccc868cf6465b9d2
This commit is contained in:
vadimt
2020-07-10 12:31:21 -07:00
parent c146d0c38c
commit b35bdbc8ac
2 changed files with 11 additions and 2 deletions

View File

@@ -120,6 +120,9 @@ public class WidgetsRecyclerView extends BaseRecyclerView implements OnItemTouch
public int getCurrentScrollY() {
// Skip early if widgets are not bound.
if (isModelNotReady() || getChildCount() == 0) {
if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "getCurrentScrollY: -1");
}
return -1;
}
@@ -128,6 +131,10 @@ public class WidgetsRecyclerView extends BaseRecyclerView implements OnItemTouch
int y = (child.getMeasuredHeight() * rowIndex);
int offset = getLayoutManager().getDecoratedTop(child);
if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
Log.d(TestProtocol.NO_SCROLL_END_WIDGETS,
"getCurrentScrollY: " + (getPaddingTop() + y - offset));
}
return getPaddingTop() + y - offset;
}