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
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 30b8b85..ecacaca 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4348,13 +4348,13 @@
      * @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;