leanback: customize focusables in secondary direction

When the focus search direction is PREV_ROW or NEXT_ROW,
we fall back to default addFocusables() which basically
add all children and descendants within RecyclerView.

This isn't the default behavior desired when navigating LEFT
out of a vertical list,  we do not want the siblings of
current focused item to be part of focusables list.
Because the siblings might got a higher score in FocusFinder.

In the broken case (a modified browse row moves first card to
the middle when it gets focused),  sibling browse row's first
card gets a higher score than left side navigation menu because
they are closer to current focused card.

This fix explicitly handles PREV_ROW and NEXT_ROW case
and overrides default addFocusables(), it wont add siblings when
they are on same grid ROW.

Bug 27258366

Change-Id: I2e11cea7bc8e370fbda0be1dc5ccccb587a3fb43
5 files changed