From 989ae759f8037fc5427ce8c289a3f49151080df4 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Tue, 25 Sep 2012 15:16:48 -0700 Subject: [PATCH] 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 --- core/java/android/view/View.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 30b8b853a610f..ecacaca62f2db 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -4348,13 +4348,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return Whether any parent scrolled. */ public boolean requestRectangleOnScreen(Rect rectangle, boolean immediate) { - if (mAttachInfo == null) { + if (mParent == null) { return false; } View child = this; - RectF position = mAttachInfo.mTmpTransformRect; + RectF position = (mAttachInfo != null) ? mAttachInfo.mTmpTransformRect : new RectF(); position.set(rectangle); ViewParent parent = mParent;