Merge "Don't use View ID to search next focus backward View"

This commit is contained in:
Yabin Huang
2020-01-17 01:50:53 +00:00
committed by Android (Google) Code Review

View File

@@ -12602,11 +12602,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
return findViewInsideOutShouldExist(root, mNextFocusForwardId);
case FOCUS_BACKWARD: {
if (mID == View.NO_ID) return null;
final int id = mID;
return root.findViewByPredicateInsideOut(this, new Predicate<View>() {
@Override
public boolean test(View t) {
return t.mNextFocusForwardId == id;
return t.findViewById(t.mNextFocusForwardId) == View.this;
}
});
}