API review fixes

BUG: 30088092
BUG: 30088343

Change-Id: I3abc24bd5f7876ff12b42f13a579399123d50470
diff --git a/api/current.txt b/api/current.txt
index 51efae0..7176582 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -306,8 +306,8 @@
     ctor public AppBarLayout.ScrollingViewBehavior();
     ctor public AppBarLayout.ScrollingViewBehavior(android.content.Context, android.util.AttributeSet);
     method public boolean layoutDependsOn(android.support.design.widget.CoordinatorLayout, android.view.View, android.view.View);
-    method public boolean onChildRectangleRequestedOnScreen(android.support.design.widget.CoordinatorLayout, android.view.View, android.graphics.Rect, boolean);
     method public boolean onDependentViewChanged(android.support.design.widget.CoordinatorLayout, android.view.View, android.view.View);
+    method public boolean onRequestChildRectangleOnScreen(android.support.design.widget.CoordinatorLayout, android.view.View, android.graphics.Rect, boolean);
   }
 
   public class BottomNavigationView extends android.widget.FrameLayout {
@@ -463,7 +463,6 @@
     method public deprecated boolean isDirty(android.support.design.widget.CoordinatorLayout, V);
     method public boolean layoutDependsOn(android.support.design.widget.CoordinatorLayout, V, android.view.View);
     method public android.support.v4.view.WindowInsetsCompat onApplyWindowInsets(android.support.design.widget.CoordinatorLayout, V, android.support.v4.view.WindowInsetsCompat);
-    method public boolean onChildRectangleRequestedOnScreen(android.support.design.widget.CoordinatorLayout, V, android.graphics.Rect, boolean);
     method public boolean onDependentViewChanged(android.support.design.widget.CoordinatorLayout, V, android.view.View);
     method public void onDependentViewRemoved(android.support.design.widget.CoordinatorLayout, V, android.view.View);
     method public boolean onInterceptTouchEvent(android.support.design.widget.CoordinatorLayout, V, android.view.MotionEvent);
@@ -474,6 +473,7 @@
     method public void onNestedPreScroll(android.support.design.widget.CoordinatorLayout, V, android.view.View, int, int, int[]);
     method public void onNestedScroll(android.support.design.widget.CoordinatorLayout, V, android.view.View, int, int, int, int);
     method public void onNestedScrollAccepted(android.support.design.widget.CoordinatorLayout, V, android.view.View, android.view.View, int);
+    method public boolean onRequestChildRectangleOnScreen(android.support.design.widget.CoordinatorLayout, V, android.graphics.Rect, boolean);
     method public void onRestoreInstanceState(android.support.design.widget.CoordinatorLayout, V, android.os.Parcelable);
     method public android.os.Parcelable onSaveInstanceState(android.support.design.widget.CoordinatorLayout, V);
     method public boolean onStartNestedScroll(android.support.design.widget.CoordinatorLayout, V, android.view.View, android.view.View, int);
@@ -532,12 +532,12 @@
   public static class FloatingActionButton.Behavior extends android.support.design.widget.CoordinatorLayout.Behavior {
     ctor public FloatingActionButton.Behavior();
     ctor public FloatingActionButton.Behavior(android.content.Context, android.util.AttributeSet);
-    method public boolean getAutoHide();
+    method public boolean isAutoHideEnabled();
     method public boolean layoutDependsOn(android.support.design.widget.CoordinatorLayout, android.support.design.widget.FloatingActionButton, android.view.View);
     method public boolean onDependentViewChanged(android.support.design.widget.CoordinatorLayout, android.support.design.widget.FloatingActionButton, android.view.View);
     method public void onDependentViewRemoved(android.support.design.widget.CoordinatorLayout, android.support.design.widget.FloatingActionButton, android.view.View);
     method public boolean onLayoutChild(android.support.design.widget.CoordinatorLayout, android.support.design.widget.FloatingActionButton, int);
-    method public void setAutoHide(boolean);
+    method public void setAutoHideEnabled(boolean);
   }
 
   public static abstract class FloatingActionButton.OnVisibilityChangedListener {
diff --git a/design/src/android/support/design/widget/AppBarLayout.java b/design/src/android/support/design/widget/AppBarLayout.java
index 8b5a43b..db030c9 100644
--- a/design/src/android/support/design/widget/AppBarLayout.java
+++ b/design/src/android/support/design/widget/AppBarLayout.java
@@ -1347,7 +1347,7 @@
         }
 
         @Override
-        public boolean onChildRectangleRequestedOnScreen(CoordinatorLayout parent, View child,
+        public boolean onRequestChildRectangleOnScreen(CoordinatorLayout parent, View child,
                 Rect rectangle, boolean immediate) {
             final AppBarLayout header = findFirstDependency(parent.getDependencies(child));
             if (header != null) {
diff --git a/design/src/android/support/design/widget/CoordinatorLayout.java b/design/src/android/support/design/widget/CoordinatorLayout.java
index db9eede..897f0cd 100644
--- a/design/src/android/support/design/widget/CoordinatorLayout.java
+++ b/design/src/android/support/design/widget/CoordinatorLayout.java
@@ -1984,7 +1984,7 @@
 
         /**
          * @deprecated this method is not called anymore. You can safely remove all usages
-         * and implementations.
+         * and implementations. This method will be removed in a future release.
          */
         @Deprecated
         public boolean isDirty(CoordinatorLayout parent, V child) {
@@ -2310,7 +2310,7 @@
          * @return true if the Behavior handled the request
          * @see ViewParent#requestChildRectangleOnScreen(View, Rect, boolean)
          */
-        public boolean onChildRectangleRequestedOnScreen(CoordinatorLayout coordinatorLayout,
+        public boolean onRequestChildRectangleOnScreen(CoordinatorLayout coordinatorLayout,
                 V child, Rect rectangle, boolean immediate) {
             return false;
         }
@@ -2801,7 +2801,7 @@
         final Behavior behavior = lp.getBehavior();
 
         if (behavior != null
-                && behavior.onChildRectangleRequestedOnScreen(this, child, rectangle, immediate)) {
+                && behavior.onRequestChildRectangleOnScreen(this, child, rectangle, immediate)) {
             return true;
         }
 
diff --git a/design/src/android/support/design/widget/FloatingActionButton.java b/design/src/android/support/design/widget/FloatingActionButton.java
index e09c223..375ecfd 100644
--- a/design/src/android/support/design/widget/FloatingActionButton.java
+++ b/design/src/android/support/design/widget/FloatingActionButton.java
@@ -535,42 +535,44 @@
         private float mFabTranslationY;
         private Rect mTmpRect;
         private OnVisibilityChangedListener mInternalAutoHideListener;
-        private boolean mAutoHide;
+        private boolean mAutoHideEnabled;
 
         public Behavior() {
             super();
-            mAutoHide = AUTO_HIDE_DEFAULT;
+            mAutoHideEnabled = AUTO_HIDE_DEFAULT;
         }
 
         public Behavior(Context context, AttributeSet attrs) {
             super(context, attrs);
             TypedArray a = context.obtainStyledAttributes(attrs,
                     R.styleable.FloatingActionButton_Behavior_Layout);
-            mAutoHide = a.getBoolean(
+            mAutoHideEnabled = a.getBoolean(
                     R.styleable.FloatingActionButton_Behavior_Layout_behavior_autoHide,
                     AUTO_HIDE_DEFAULT);
             a.recycle();
         }
 
         /**
-         * Sets whether this FAB should automatically hide when there is not enough space. This
-         * works with {@link AppBarLayout} and {@link BottomSheetBehavior}.
+         * Sets whether the associated FloatingActionButton automatically hides when there is
+         * not enough space to be displayed. This works with {@link AppBarLayout}
+         * and {@link BottomSheetBehavior}.
          *
          * @attr ref android.support.design.R.styleable#FloatingActionButton_Behavior_Layout_behavior_autoHide
-         * @param autoHide {@code true} to hide automatically.
+         * @param autoHide true to enable automatic hiding
          */
-        public void setAutoHide(boolean autoHide) {
-            mAutoHide = autoHide;
+        public void setAutoHideEnabled(boolean autoHide) {
+            mAutoHideEnabled = autoHide;
         }
 
         /**
-         * Returns whether this FAB automatically hides when there is not enough space.
+         * Returns whether the associated FloatingActionButton automatically hides when there is
+         * not enough space to be displayed.
          *
          * @attr ref android.support.design.R.styleable#FloatingActionButton_Behavior_Layout_behavior_autoHide
-         * @return {@code true} if it hides automatically.
+         * @return true if enabled
          */
-        public boolean getAutoHide() {
-            return mAutoHide;
+        public boolean isAutoHideEnabled() {
+            return mAutoHideEnabled;
         }
 
         @Override
@@ -617,7 +619,7 @@
         private boolean shouldUpdateVisibility(View dependency, FloatingActionButton child) {
             final CoordinatorLayout.LayoutParams lp =
                     (CoordinatorLayout.LayoutParams) child.getLayoutParams();
-            if (!mAutoHide) {
+            if (!mAutoHideEnabled) {
                 return false;
             }
 
diff --git a/v7/appcompat/src/android/support/v7/content/res/AppCompatResources.java b/v7/appcompat/src/android/support/v7/content/res/AppCompatResources.java
index 7586cd8..1b90232 100644
--- a/v7/appcompat/src/android/support/v7/content/res/AppCompatResources.java
+++ b/v7/appcompat/src/android/support/v7/content/res/AppCompatResources.java
@@ -56,7 +56,7 @@
      * Returns the {@link ColorStateList} from the given resource. The resource can include
      * themeable attributes, regardless of API level.
      *
-     * @param context content to inflate against
+     * @param context context to inflate against
      * @param resId the resource identifier of the ColorStateList to retrieve
      */
     public static ColorStateList getColorStateList(@NonNull Context context, @ColorRes int resId) {
@@ -88,11 +88,11 @@
      * <p>This method supports inflation of {@code <vector>} and {@code <animated-vector>}
      * resources on devices where platform support is not available.</p>
      *
-     * @param resId The desired resource identifier, as generated by the aapt
-     *              tool. This integer encodes the package, type, and resource
-     *              entry. The value 0 is an invalid identifier.
+     * @param context context to inflate against
+     * @param resId   The desired resource identifier, as generated by the aapt
+     *                tool. This integer encodes the package, type, and resource
+     *                entry. The value 0 is an invalid identifier.
      * @return Drawable An object that can be used to draw this resource.
-     *
      * @see ContextCompat#getDrawable(Context, int)
      */
     @Nullable