Merge "Fix FOCUS_BACKWARD search if view had no id"
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index ecfca74..c982d7a 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -5247,6 +5247,7 @@
if (mNextFocusForwardId == View.NO_ID) return null;
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