Remove all the extra accessor methods added by javac in support-core-ui

Change private methods to be package protected to avoid extra methods
that get added to be able to access them from inner classes.

This CL saves 84 methods in our jar.

Bug: 31075707
Change-Id: I283934f5248e608749c2c33a8cd1bd0adb0efae2
diff --git a/core-ui/java/android/support/v4/app/ActionBarDrawerToggle.java b/core-ui/java/android/support/v4/app/ActionBarDrawerToggle.java
index 452b033..197f96e 100644
--- a/core-ui/java/android/support/v4/app/ActionBarDrawerToggle.java
+++ b/core-ui/java/android/support/v4/app/ActionBarDrawerToggle.java
@@ -110,6 +110,9 @@
     }
 
     private static class ActionBarDrawerToggleImplBase implements ActionBarDrawerToggleImpl {
+        ActionBarDrawerToggleImplBase() {
+        }
+
         @Override
         public Drawable getThemeUpIndicator(Activity activity) {
             return null;
@@ -130,6 +133,9 @@
     }
 
     private static class ActionBarDrawerToggleImplHC implements ActionBarDrawerToggleImpl {
+        ActionBarDrawerToggleImplHC() {
+        }
+
         @Override
         public Drawable getThemeUpIndicator(Activity activity) {
             return ActionBarDrawerToggleHoneycomb.getThemeUpIndicator(activity);
@@ -151,6 +157,9 @@
 
     private static class ActionBarDrawerToggleImplJellybeanMR2
             implements ActionBarDrawerToggleImpl {
+        ActionBarDrawerToggleImplJellybeanMR2() {
+        }
+
         @Override
         public Drawable getThemeUpIndicator(Activity activity) {
             return ActionBarDrawerToggleJellybeanMR2.getThemeUpIndicator(activity);
@@ -189,7 +198,7 @@
     // android.R.id.home as defined by public API in v11
     private static final int ID_HOME = 0x0102002c;
 
-    private final Activity mActivity;
+    final Activity mActivity;
     private final Delegate mActivityImpl;
     private final DrawerLayout mDrawerLayout;
     private boolean mDrawerIndicatorEnabled = true;
@@ -505,7 +514,7 @@
         private float mPosition;
         private float mOffset;
 
-        private SlideDrawable(Drawable wrapped) {
+        SlideDrawable(Drawable wrapped) {
             super(wrapped, 0);
         }
 
diff --git a/core-ui/java/android/support/v4/view/AsyncLayoutInflater.java b/core-ui/java/android/support/v4/view/AsyncLayoutInflater.java
index 21aaae5..e638d05 100644
--- a/core-ui/java/android/support/v4/view/AsyncLayoutInflater.java
+++ b/core-ui/java/android/support/v4/view/AsyncLayoutInflater.java
@@ -67,9 +67,9 @@
 public final class AsyncLayoutInflater {
     private static final String TAG = "AsyncLayoutInflater";
 
-    private LayoutInflater mInflater;
-    private Handler mHandler;
-    private InflateThread mInflateThread;
+    LayoutInflater mInflater;
+    Handler mHandler;
+    InflateThread mInflateThread;
 
     public AsyncLayoutInflater(@NonNull Context context) {
         mInflater = new BasicInflater(context);
@@ -116,6 +116,9 @@
         int resid;
         View view;
         OnInflateFinishedListener callback;
+
+        InflateRequest() {
+        }
     }
 
     private static class BasicInflater extends LayoutInflater {
diff --git a/core-ui/java/android/support/v4/view/PagerTitleStrip.java b/core-ui/java/android/support/v4/view/PagerTitleStrip.java
index 65fdff7..d569cd4 100644
--- a/core-ui/java/android/support/v4/view/PagerTitleStrip.java
+++ b/core-ui/java/android/support/v4/view/PagerTitleStrip.java
@@ -55,7 +55,7 @@
     TextView mNextText;
 
     private int mLastKnownCurrentPage = -1;
-    private float mLastKnownPositionOffset = -1;
+    float mLastKnownPositionOffset = -1;
     private int mScaledTextSpacing;
     private int mGravity;
 
@@ -481,6 +481,9 @@
             ViewPager.OnAdapterChangeListener {
         private int mScrollState;
 
+        PageListener() {
+        }
+
         @Override
         public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
             if (positionOffset > 0.5f) {
diff --git a/core-ui/java/android/support/v4/view/ViewPager.java b/core-ui/java/android/support/v4/view/ViewPager.java
index 8735151..50b16fc 100644
--- a/core-ui/java/android/support/v4/view/ViewPager.java
+++ b/core-ui/java/android/support/v4/view/ViewPager.java
@@ -122,7 +122,7 @@
 
     private static final int MIN_FLING_VELOCITY = 400; // dips
 
-    private static final int[] LAYOUT_ATTRS = new int[] {
+    static final int[] LAYOUT_ATTRS = new int[] {
         android.R.attr.layout_gravity
     };
 
@@ -160,8 +160,8 @@
 
     private final Rect mTempRect = new Rect();
 
-    private PagerAdapter mAdapter;
-    private int mCurItem;   // Index of currently displayed page.
+    PagerAdapter mAdapter;
+    int mCurItem;   // Index of currently displayed page.
     private int mRestoredCurItem = -1;
     private Parcelable mRestoredAdapterState = null;
     private ClassLoader mRestoredClassLoader = null;
@@ -488,7 +488,7 @@
         super.onDetachedFromWindow();
     }
 
-    private void setScrollState(int newState) {
+    void setScrollState(int newState) {
         if (mScrollState == newState) {
             return;
         }
@@ -3109,6 +3109,9 @@
     }
 
     private class PagerObserver extends DataSetObserver {
+        PagerObserver() {
+        }
+
         @Override
         public void onChanged() {
             dataSetChanged();
diff --git a/core-ui/java/android/support/v4/widget/AutoScrollHelper.java b/core-ui/java/android/support/v4/widget/AutoScrollHelper.java
index bf4f1e4..4291a25 100644
--- a/core-ui/java/android/support/v4/widget/AutoScrollHelper.java
+++ b/core-ui/java/android/support/v4/widget/AutoScrollHelper.java
@@ -134,13 +134,13 @@
     private static final int VERTICAL = 1;
 
     /** Scroller used to control acceleration toward maximum velocity. */
-    private final ClampedScroller mScroller = new ClampedScroller();
+    final ClampedScroller mScroller = new ClampedScroller();
 
     /** Interpolator used to scale velocity with touch position. */
     private final Interpolator mEdgeInterpolator = new AccelerateInterpolator();
 
     /** The view to auto-scroll. Might not be the source of touch events. */
-    private final View mTarget;
+    final View mTarget;
 
     /** Runnable used to animate scrolling. */
     private Runnable mRunnable;
@@ -170,13 +170,13 @@
     private boolean mAlreadyDelayed;
 
     /** Whether to reset the scroller start time on the next animation. */
-    private boolean mNeedsReset;
+    boolean mNeedsReset;
 
     /** Whether to send a cancel motion event to the target view. */
-    private boolean mNeedsCancel;
+    boolean mNeedsCancel;
 
     /** Whether the auto-scroller is actively scrolling. */
-    private boolean mAnimating;
+    boolean mAnimating;
 
     /** Whether the auto-scroller is enabled. */
     private boolean mEnabled;
@@ -488,7 +488,7 @@
     /**
      * @return whether the target is able to scroll in the requested direction
      */
-    private boolean shouldAnimate() {
+    boolean shouldAnimate() {
         final ClampedScroller scroller = mScroller;
         final int verticalDirection = scroller.getVerticalDirection();
         final int horizontalDirection = scroller.getHorizontalDirection();
@@ -649,7 +649,7 @@
         return 0;
     }
 
-    private static int constrain(int value, int min, int max) {
+    static int constrain(int value, int min, int max) {
         if (value > max) {
             return max;
         } else if (value < min) {
@@ -659,7 +659,7 @@
         }
     }
 
-    private static float constrain(float value, float min, float max) {
+    static float constrain(float value, float min, float max) {
         if (value > max) {
             return max;
         } else if (value < min) {
@@ -673,7 +673,7 @@
      * Sends a {@link MotionEvent#ACTION_CANCEL} event to the target view,
      * canceling any ongoing touch events.
      */
-    private void cancelTargetTouch() {
+    void cancelTargetTouch() {
         final long eventTime = SystemClock.uptimeMillis();
         final MotionEvent cancel = MotionEvent.obtain(
                 eventTime, eventTime, MotionEvent.ACTION_CANCEL, 0, 0, 0);
@@ -682,6 +682,9 @@
     }
 
     private class ScrollAnimationRunnable implements Runnable {
+        ScrollAnimationRunnable() {
+        }
+
         @Override
         public void run() {
             if (!mAnimating) {
diff --git a/core-ui/java/android/support/v4/widget/CircleImageView.java b/core-ui/java/android/support/v4/widget/CircleImageView.java
index a83fb5c..371c9a2 100644
--- a/core-ui/java/android/support/v4/widget/CircleImageView.java
+++ b/core-ui/java/android/support/v4/widget/CircleImageView.java
@@ -47,7 +47,7 @@
     private static final int SHADOW_ELEVATION = 4;
 
     private Animation.AnimationListener mListener;
-    private int mShadowRadius;
+    int mShadowRadius;
 
     CircleImageView(Context context, int color) {
         super(context);
diff --git a/core-ui/java/android/support/v4/widget/ContentLoadingProgressBar.java b/core-ui/java/android/support/v4/widget/ContentLoadingProgressBar.java
index 3335b9f..98b63a4 100644
--- a/core-ui/java/android/support/v4/widget/ContentLoadingProgressBar.java
+++ b/core-ui/java/android/support/v4/widget/ContentLoadingProgressBar.java
@@ -31,13 +31,13 @@
     private static final int MIN_SHOW_TIME = 500; // ms
     private static final int MIN_DELAY = 500; // ms
 
-    private long mStartTime = -1;
+    long mStartTime = -1;
 
-    private boolean mPostedHide = false;
+    boolean mPostedHide = false;
 
-    private boolean mPostedShow = false;
+    boolean mPostedShow = false;
 
-    private boolean mDismissed = false;
+    boolean mDismissed = false;
 
     private final Runnable mDelayedHide = new Runnable() {
 
diff --git a/core-ui/java/android/support/v4/widget/CursorAdapter.java b/core-ui/java/android/support/v4/widget/CursorAdapter.java
index d95f048..8beb4ab 100644
--- a/core-ui/java/android/support/v4/widget/CursorAdapter.java
+++ b/core-ui/java/android/support/v4/widget/CursorAdapter.java
@@ -476,6 +476,9 @@
     }
 
     private class MyDataSetObserver extends DataSetObserver {
+        MyDataSetObserver() {
+        }
+
         @Override
         public void onChanged() {
             mDataValid = true;
diff --git a/core-ui/java/android/support/v4/widget/DrawerLayout.java b/core-ui/java/android/support/v4/widget/DrawerLayout.java
index a41fce3..36b465b 100644
--- a/core-ui/java/android/support/v4/widget/DrawerLayout.java
+++ b/core-ui/java/android/support/v4/widget/DrawerLayout.java
@@ -173,12 +173,12 @@
 
     private static final float TOUCH_SLOP_SENSITIVITY = 1.f;
 
-    private static final int[] LAYOUT_ATTRS = new int[] {
+    static final int[] LAYOUT_ATTRS = new int[] {
             android.R.attr.layout_gravity
     };
 
     /** Whether we can use NO_HIDE_DESCENDANTS accessibility importance. */
-    private static final boolean CAN_HIDE_DESCENDANTS = Build.VERSION.SDK_INT >= 19;
+    static final boolean CAN_HIDE_DESCENDANTS = Build.VERSION.SDK_INT >= 19;
 
     /** Whether the drawer shadow comes from setting elevation on the drawer. */
     private static final boolean SET_DRAWER_SHADOW_FROM_ELEVATION =
@@ -1864,7 +1864,7 @@
         return findVisibleDrawer() != null;
     }
 
-    private View findVisibleDrawer() {
+    View findVisibleDrawer() {
         final int childCount = getChildCount();
         for (int i = 0; i < childCount; i++) {
             final View child = getChildAt(i);
@@ -1995,7 +1995,7 @@
         }
     }
 
-    private static boolean includeChildForAccessibility(View child) {
+    static boolean includeChildForAccessibility(View child) {
         // If the child is not important for accessibility we make
         // sure this hides the entire subtree rooted at it as the
         // IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDATS is not
@@ -2146,7 +2146,7 @@
             postDelayed(mPeekRunnable, PEEK_DELAY);
         }
 
-        private void peekDrawer() {
+        void peekDrawer() {
             final View toCapture;
             final int childLeft;
             final int peekDistance = mDragger.getEdgeSize();
@@ -2226,9 +2226,9 @@
         private static final int FLAG_IS_CLOSING = 0x4;
 
         public int gravity = Gravity.NO_GRAVITY;
-        private float onScreen;
-        private boolean isPeeking;
-        private int openState;
+        float onScreen;
+        boolean isPeeking;
+        int openState;
 
         public LayoutParams(Context c, AttributeSet attrs) {
             super(c, attrs);
diff --git a/core-ui/java/android/support/v4/widget/ExploreByTouchHelper.java b/core-ui/java/android/support/v4/widget/ExploreByTouchHelper.java
index 8cb3b0a..bb43456 100644
--- a/core-ui/java/android/support/v4/widget/ExploreByTouchHelper.java
+++ b/core-ui/java/android/support/v4/widget/ExploreByTouchHelper.java
@@ -717,7 +717,7 @@
      *         about the specified item
      */
     @NonNull
-    private AccessibilityNodeInfoCompat obtainAccessibilityNodeInfo(int virtualViewId) {
+    AccessibilityNodeInfoCompat obtainAccessibilityNodeInfo(int virtualViewId) {
         if (virtualViewId == HOST_ID) {
             return createNodeForHost();
         }
@@ -867,7 +867,7 @@
         return node;
     }
 
-    private boolean performAction(int virtualViewId, int action, Bundle arguments) {
+    boolean performAction(int virtualViewId, int action, Bundle arguments) {
         switch (virtualViewId) {
             case HOST_ID:
                 return performActionForHost(action, arguments);
@@ -1221,6 +1221,9 @@
      * Exposes a virtual view hierarchy to the accessibility framework.
      */
     private class MyNodeProvider extends AccessibilityNodeProviderCompat {
+        MyNodeProvider() {
+        }
+
         @Override
         public AccessibilityNodeInfoCompat createAccessibilityNodeInfo(int virtualViewId) {
             // The caller takes ownership of the node and is expected to
diff --git a/core-ui/java/android/support/v4/widget/MaterialProgressDrawable.java b/core-ui/java/android/support/v4/widget/MaterialProgressDrawable.java
index 6affe47..4cf43fa 100644
--- a/core-ui/java/android/support/v4/widget/MaterialProgressDrawable.java
+++ b/core-ui/java/android/support/v4/widget/MaterialProgressDrawable.java
@@ -50,7 +50,7 @@
  */
 class MaterialProgressDrawable extends Drawable implements Animatable {
     private static final Interpolator LINEAR_INTERPOLATOR = new LinearInterpolator();
-    private static final Interpolator MATERIAL_INTERPOLATOR = new FastOutSlowInInterpolator();
+    static final Interpolator MATERIAL_INTERPOLATOR = new FastOutSlowInInterpolator();
 
     private static final float FULL_ROTATION = 1080.0f;
     @Retention(RetentionPolicy.SOURCE)
@@ -110,7 +110,7 @@
     private Resources mResources;
     private View mParent;
     private Animation mAnimation;
-    private float mRotationCount;
+    float mRotationCount;
     private double mWidth;
     private double mHeight;
     boolean mFinishing;
@@ -299,7 +299,7 @@
         mRing.resetOriginals();
     }
 
-    private float getMinProgressArc(Ring ring) {
+    float getMinProgressArc(Ring ring) {
         return (float) Math.toRadians(
                 ring.getStrokeWidth() / (2 * Math.PI * ring.getCenterRadius()));
     }
@@ -329,7 +329,7 @@
      * The new ring color will be a translation from the starting ring color to
      * the next color.
      */
-    private void updateRingColor(float interpolatedTime, Ring ring) {
+    void updateRingColor(float interpolatedTime, Ring ring) {
         if (interpolatedTime > COLOR_START_DELAY_OFFSET) {
             // scale the interpolatedTime so that the full
             // transformation from 0 - 1 takes place in the
@@ -340,7 +340,7 @@
         }
     }
 
-    private void applyFinishTranslation(float interpolatedTime, Ring ring) {
+    void applyFinishTranslation(float interpolatedTime, Ring ring) {
         // shrink back down and complete a full rotation before
         // starting other circles
         // Rotation goes between [0..1].
diff --git a/core-ui/java/android/support/v4/widget/NestedScrollView.java b/core-ui/java/android/support/v4/widget/NestedScrollView.java
index 3e4c55f..0d40bc9 100644
--- a/core-ui/java/android/support/v4/widget/NestedScrollView.java
+++ b/core-ui/java/android/support/v4/widget/NestedScrollView.java
@@ -998,7 +998,7 @@
         return clampedX || clampedY;
     }
 
-    private int getScrollRange() {
+    int getScrollRange() {
         int scrollRange = 0;
         if (getChildCount() > 0) {
             View child = getChildAt(0);
diff --git a/core-ui/java/android/support/v4/widget/SlidingPaneLayout.java b/core-ui/java/android/support/v4/widget/SlidingPaneLayout.java
index 49e1976..1e5479b 100644
--- a/core-ui/java/android/support/v4/widget/SlidingPaneLayout.java
+++ b/core-ui/java/android/support/v4/widget/SlidingPaneLayout.java
@@ -147,13 +147,13 @@
     /**
      * The child view that can slide, if any.
      */
-    private View mSlideableView;
+    View mSlideableView;
 
     /**
      * How far the panel is offset from its closed position.
      * range [0, 1] where 0 = closed, 1 = open.
      */
-    private float mSlideOffset;
+    float mSlideOffset;
 
     /**
      * How far the non-sliding panel is parallaxed from its usual position when open.
@@ -164,13 +164,13 @@
     /**
      * How far in pixels the slideable panel may move.
      */
-    private int mSlideRange;
+    int mSlideRange;
 
     /**
      * A panel view is locked into internal scrolling or another condition that
      * is preventing a drag.
      */
-    private boolean mIsUnableToDrag;
+    boolean mIsUnableToDrag;
 
     /**
      * Distance in pixels to parallax the fixed pane by when fully closed
@@ -182,19 +182,19 @@
 
     private PanelSlideListener mPanelSlideListener;
 
-    private final ViewDragHelper mDragHelper;
+    final ViewDragHelper mDragHelper;
 
     /**
      * Stores whether or not the pane was open the last time it was slideable.
      * If open/close operations are invoked this state is modified. Used by
      * instance state save/restore.
      */
-    private boolean mPreservedOpenState;
+    boolean mPreservedOpenState;
     private boolean mFirstLayout = true;
 
     private final Rect mTmpRect = new Rect();
 
-    private final ArrayList<DisableLayerRunnable> mPostedRunnables =
+    final ArrayList<DisableLayerRunnable> mPostedRunnables =
             new ArrayList<DisableLayerRunnable>();
 
     static final SlidingPanelLayoutImpl IMPL;
@@ -946,7 +946,7 @@
         return mCanSlide;
     }
 
-    private void onPanelDragged(int newLeft) {
+    void onPanelDragged(int newLeft) {
         if (mSlideableView == null) {
             // This can happen if we're aborting motion during layout because everything now fits.
             mSlideOffset = 0;
@@ -1044,7 +1044,7 @@
         return result;
     }
 
-    private void invalidateChildRegion(View v) {
+    void invalidateChildRegion(View v) {
         IMPL.invalidateChildRegion(this, v);
     }
 
@@ -1312,6 +1312,9 @@
 
     private class DragHelperCallback extends ViewDragHelper.Callback {
 
+        DragHelperCallback() {
+        }
+
         @Override
         public boolean tryCaptureView(View child, int pointerId) {
             if (mIsUnableToDrag) {
@@ -1467,7 +1470,7 @@
             super(superState);
         }
 
-        private SavedState(Parcel in, ClassLoader loader) {
+        SavedState(Parcel in, ClassLoader loader) {
             super(in, loader);
             isOpen = in.readInt() != 0;
         }
@@ -1658,7 +1661,7 @@
         }
     }
 
-    private boolean isLayoutRtlSupport() {
+    boolean isLayoutRtlSupport() {
         return ViewCompat.getLayoutDirection(this) == ViewCompat.LAYOUT_DIRECTION_RTL;
     }
 }
diff --git a/core-ui/java/android/support/v4/widget/SwipeRefreshLayout.java b/core-ui/java/android/support/v4/widget/SwipeRefreshLayout.java
index 4361c52..4ebdeed 100644
--- a/core-ui/java/android/support/v4/widget/SwipeRefreshLayout.java
+++ b/core-ui/java/android/support/v4/widget/SwipeRefreshLayout.java
@@ -103,8 +103,8 @@
     private static final int DEFAULT_CIRCLE_TARGET = 64;
 
     private View mTarget; // the target of the gesture
-    private OnRefreshListener mListener;
-    private boolean mRefreshing = false;
+    OnRefreshListener mListener;
+    boolean mRefreshing = false;
     private int mTouchSlop;
     private float mTotalDragDistance = -1;
 
@@ -119,14 +119,14 @@
     private boolean mNestedScrollInProgress;
 
     private int mMediumAnimationDuration;
-    private int mCurrentTargetOffsetTop;
+    int mCurrentTargetOffsetTop;
 
     private float mInitialMotionY;
     private float mInitialDownY;
     private boolean mIsBeingDragged;
     private int mActivePointerId = INVALID_POINTER;
     // Whether this item is scaled up rather than clipped
-    private boolean mScale;
+    boolean mScale;
 
     // Target is returning to its start offset because it was cancelled or a
     // refresh was triggered.
@@ -136,18 +136,18 @@
         android.R.attr.enabled
     };
 
-    private CircleImageView mCircleView;
+    CircleImageView mCircleView;
     private int mCircleViewIndex = -1;
 
     protected int mFrom;
 
-    private float mStartingScale;
+    float mStartingScale;
 
     protected int mOriginalOffsetTop;
 
-    private int mSpinnerOffsetEnd;
+    int mSpinnerOffsetEnd;
 
-    private MaterialProgressDrawable mProgress;
+    MaterialProgressDrawable mProgress;
 
     private Animation mScaleAnimation;
 
@@ -159,12 +159,12 @@
 
     private Animation mScaleDownToStartAnimation;
 
-    private boolean mNotify;
+    boolean mNotify;
 
     private int mCircleDiameter;
 
     // Whether the client has set a custom starting position;
-    private boolean mUsingCustomStart;
+    boolean mUsingCustomStart;
 
     private OnChildScrollUpCallback mChildScrollUpCallback;
 
@@ -195,7 +195,7 @@
         }
     };
 
-    private void reset() {
+    void reset() {
         mCircleView.clearAnimation();
         mProgress.stop();
         mCircleView.setVisibility(View.GONE);
@@ -451,7 +451,7 @@
      * Pre API 11, this does an alpha animation.
      * @param progress
      */
-    private void setAnimationProgress(float progress) {
+    void setAnimationProgress(float progress) {
         if (isAlphaUsedForScale()) {
             setColorViewAlpha((int) (progress * MAX_ALPHA));
         } else {
@@ -473,7 +473,7 @@
         }
     }
 
-    private void startScaleDownAnimation(Animation.AnimationListener listener) {
+    void startScaleDownAnimation(Animation.AnimationListener listener) {
         mScaleDownAnimation = new Animation() {
             @Override
             public void applyTransformation(float interpolatedTime, Transformation t) {
@@ -1141,7 +1141,7 @@
         }
     };
 
-    private void moveToStart(float interpolatedTime) {
+    void moveToStart(float interpolatedTime) {
         int targetTop = 0;
         targetTop = (mFrom + (int) ((mOriginalOffsetTop - mFrom) * interpolatedTime));
         int offset = targetTop - mCircleView.getTop();
@@ -1179,7 +1179,7 @@
         mCircleView.startAnimation(mScaleDownToStartAnimation);
     }
 
-    private void setTargetOffsetTopAndBottom(int offset, boolean requiresUpdate) {
+    void setTargetOffsetTopAndBottom(int offset, boolean requiresUpdate) {
         mCircleView.bringToFront();
         ViewCompat.offsetTopAndBottom(mCircleView, offset);
         mCurrentTargetOffsetTop = mCircleView.getTop();