Skip to content

Commit 989ae75

Browse files
committed
Fixing argument expectations of View.requestRectangleOnScreen
1. In a previous patch the implementation of the method was fixed in terms of end result but this broke some assumptions about the method arguments. This change updates the argument expectations. bug:7172035 Change-Id: I76d738b1c74dfb1dd45fc667f3217911f1c10a5f
1 parent 1ab8a08 commit 989ae75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/java/android/view/View.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4348,13 +4348,13 @@ public boolean requestRectangleOnScreen(Rect rectangle) {
43484348
* @return Whether any parent scrolled.
43494349
*/
43504350
public boolean requestRectangleOnScreen(Rect rectangle, boolean immediate) {
4351-
if (mAttachInfo == null) {
4351+
if (mParent == null) {
43524352
return false;
43534353
}
43544354

43554355
View child = this;
43564356

4357-
RectF position = mAttachInfo.mTmpTransformRect;
4357+
RectF position = (mAttachInfo != null) ? mAttachInfo.mTmpTransformRect : new RectF();
43584358
position.set(rectangle);
43594359

43604360
ViewParent parent = mParent;

0 commit comments

Comments
 (0)