From edbcf2c4bf7b09a10e483c382f2f0578b74378b7 Mon Sep 17 00:00:00 2001 From: Phil Weaver Date: Thu, 10 Aug 2017 12:31:34 -0700 Subject: Stop focusing views before layout. Rolls back one line of ag/2257919. Bug: 63811145 Test: TalkBack no longer reads the page backwards in: Settings > System > Reset > Factory data reset Settings > Connected devices > Android Beam Change-Id: I6b04e64cd650ebda193da4a54bf0721bd256820c --- core/java/android/view/View.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 2646d1c4f528..47e8b58e8e32 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -13281,7 +13281,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // about in case nothing has focus. even if this specific view // isn't focusable, it may contain something that is, so let // the root view try to give this focus if nothing else does. - if ((mParent != null)) { + if ((mParent != null) && (mBottom > mTop) && (mRight > mLeft)) { mParent.focusableViewAvailable(this); } } -- cgit v1.2.3-59-g8ed1b