Skip to content

Commit 1908cf9

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "Fixing argument expectations of View.requestRectangleOnScreen" into jb-mr1-dev
2 parents b1c4ab5 + 989ae75 commit 1908cf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)