Merge change 7124 into donut
* changes: Fixes #1977685. Prevent crash when the soft keyboard is brought up.
This commit is contained in:
@@ -1367,6 +1367,15 @@ public final class ViewRoot extends Handler implements ViewParent,
|
|||||||
// is non-null and we just want to scroll to whatever that
|
// is non-null and we just want to scroll to whatever that
|
||||||
// rectangle is).
|
// rectangle is).
|
||||||
View focus = mRealFocusedView;
|
View focus = mRealFocusedView;
|
||||||
|
|
||||||
|
// When in touch mode, focus points to the previously focused view,
|
||||||
|
// which may have been removed from the view hierarchy. The following
|
||||||
|
// line checks whether the view is still in the hierarchy
|
||||||
|
if (focus == null || focus.getParent() == null) {
|
||||||
|
mRealFocusedView = null;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (focus != mLastScrolledFocus) {
|
if (focus != mLastScrolledFocus) {
|
||||||
// If the focus has changed, then ignore any requests to scroll
|
// If the focus has changed, then ignore any requests to scroll
|
||||||
// to a rectangle; first we want to make sure the entire focus
|
// to a rectangle; first we want to make sure the entire focus
|
||||||
|
|||||||
Reference in New Issue
Block a user