From 4de1d1c3e328adc80475c153b8b3f984504a9d74 Mon Sep 17 00:00:00 2001 From: Johannes Gallmann Date: Fri, 24 Mar 2023 10:05:03 +0000 Subject: [PATCH] Fix requestRectangleOnScreen not called The requestRectWithoutFocus boolean was introduced in ag/20641595. Bug: 263152665 Test: Manual, i.e. verifying requestRectangleOnScreen is called when TextView is focused Change-Id: I13e2856fc0488526fccb4ab5d945d1d983d7c4d4 --- core/java/android/widget/TextView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index fd80981fe4b83..0d6ea32fd3ef0 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -11467,7 +11467,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener changed = true; } - if (requestRectWithoutFocus && isFocused()) { + if (requestRectWithoutFocus || isFocused()) { // This offsets because getInterestingRect() is in terms of viewport coordinates, but // requestRectangleOnScreen() is in terms of content coordinates.