package android.support.v7.widget;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.database.Observable;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import android.support.annotation.CallSuper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.support.annotation.VisibleForTesting;
import android.support.v4.os.TraceCompat;
import android.support.v4.view.AbsSavedState;
import android.support.v4.view.AccessibilityDelegateCompat;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.NestedScrollingChild2;
import android.support.v4.view.NestedScrollingChildHelper;
import android.support.v4.view.ScrollingView;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewConfigurationCompat;
import android.support.v4.view.accessibility.AccessibilityEventCompat;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
import android.support.v7.recyclerview.R;
import android.support.v7.widget.AdapterHelper;
import android.support.v7.widget.ChildHelper;
import android.support.v7.widget.GapWorker;
import android.support.v7.widget.ViewBoundsCheck;
import android.support.v7.widget.ViewInfoStore;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.Display;
import android.view.FocusFinder;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.animation.Interpolator;
import android.widget.EdgeEffect;
import android.widget.OverScroller;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class RecyclerView extends ViewGroup implements ScrollingView, NestedScrollingChild2 {
static final boolean ALLOW_SIZE_IN_UNSPECIFIED_SPEC = (Build.VERSION.SDK_INT >= 23);
/* access modifiers changed from: private */
public static final boolean ALLOW_THREAD_GAP_WORK = (Build.VERSION.SDK_INT >= 21);
private static final int[] CLIP_TO_PADDING_ATTR = {16842987};
static final boolean DEBUG = false;
static final boolean DISPATCH_TEMP_DETACH = false;
private static final boolean FORCE_ABS_FOCUS_SEARCH_DIRECTION = (Build.VERSION.SDK_INT <= 15);
static final boolean FORCE_INVALIDATE_DISPLAY_LIST = (Build.VERSION.SDK_INT == 18 || Build.VERSION.SDK_INT == 19 || Build.VERSION.SDK_INT == 20);
static final long FOREVER_NS = Long.MAX_VALUE;
public static final int HORIZONTAL = 0;
private static final boolean IGNORE_DETACHED_FOCUSED_CHILD = (Build.VERSION.SDK_INT <= 15);
private static final int INVALID_POINTER = -1;
public static final int INVALID_TYPE = -1;
private static final Class<?>[] LAYOUT_MANAGER_CONSTRUCTOR_SIGNATURE = {Context.class, AttributeSet.class, Integer.TYPE, Integer.TYPE};
static final int MAX_SCROLL_DURATION = 2000;
private static final int[] NESTED_SCROLLING_ATTRS = {16843830};
public static final long NO_ID = -1;
public static final int NO_POSITION = -1;
static final boolean POST_UPDATES_ON_ANIMATION = (Build.VERSION.SDK_INT >= 16);
public static final int SCROLL_STATE_DRAGGING = 1;
public static final int SCROLL_STATE_IDLE = 0;
public static final int SCROLL_STATE_SETTLING = 2;
static final String TAG = "RecyclerView";
public static final int TOUCH_SLOP_DEFAULT = 0;
public static final int TOUCH_SLOP_PAGING = 1;
static final String TRACE_BIND_VIEW_TAG = "RV OnBindView";
static final String TRACE_CREATE_VIEW_TAG = "RV CreateView";
private static final String TRACE_HANDLE_ADAPTER_UPDATES_TAG = "RV PartialInvalidate";
static final String TRACE_NESTED_PREFETCH_TAG = "RV Nested Prefetch";
private static final String TRACE_ON_DATA_SET_CHANGE_LAYOUT_TAG = "RV FullInvalidate";
private static final String TRACE_ON_LAYOUT_TAG = "RV OnLayout";
static final String TRACE_PREFETCH_TAG = "RV Prefetch";
static final String TRACE_SCROLL_TAG = "RV Scroll";
static final boolean VERBOSE_TRACING = false;
public static final int VERTICAL = 1;
static final Interpolator sQuinticInterpolator = new Interpolator() {
public float getInterpolation(float f) {
float f2 = f - 1.0f;
return (f2 * f2 * f2 * f2 * f2) + 1.0f;
}
};
RecyclerViewAccessibilityDelegate mAccessibilityDelegate;
private final AccessibilityManager mAccessibilityManager;
private OnItemTouchListener mActiveOnItemTouchListener;
Adapter mAdapter;
AdapterHelper mAdapterHelper;
boolean mAdapterUpdateDuringMeasure;
private EdgeEffect mBottomGlow;
private ChildDrawingOrderCallback mChildDrawingOrderCallback;
ChildHelper mChildHelper;
boolean mClipToPadding;
boolean mDataSetHasChangedAfterLayout;
private int mDispatchScrollCounter;
private int mEatRequestLayout;
private int mEatenAccessibilityChangeFlags;
boolean mEnableFastScroller;
@VisibleForTesting
boolean mFirstLayoutComplete;
GapWorker mGapWorker;
boolean mHasFixedSize;
private boolean mIgnoreMotionEventTillDown;
private int mInitialTouchX;
private int mInitialTouchY;
boolean mIsAttached;
ItemAnimator mItemAnimator;
private ItemAnimator.ItemAnimatorListener mItemAnimatorListener;
private Runnable mItemAnimatorRunner;
final ArrayList<ItemDecoration> mItemDecorations;
boolean mItemsAddedOrRemoved;
boolean mItemsChanged;
private int mLastTouchX;
private int mLastTouchY;
@VisibleForTesting
LayoutManager mLayout;
boolean mLayoutFrozen;
private int mLayoutOrScrollCounter;
boolean mLayoutRequestEaten;
private EdgeEffect mLeftGlow;
private final int mMaxFlingVelocity;
private final int mMinFlingVelocity;
private final int[] mMinMaxLayoutPositions;
private final int[] mNestedOffsets;
private final RecyclerViewDataObserver mObserver;
private List<OnChildAttachStateChangeListener> mOnChildAttachStateListeners;
private OnFlingListener mOnFlingListener;
private final ArrayList<OnItemTouchListener> mOnItemTouchListeners;
@VisibleForTesting
final List<ViewHolder> mPendingAccessibilityImportanceChange;
private SavedState mPendingSavedState;
boolean mPostedAnimatorRunner;
GapWorker.LayoutPrefetchRegistryImpl mPrefetchRegistry;
private boolean mPreserveFocusAfterLayout;
final Recycler mRecycler;
RecyclerListener mRecyclerListener;
private EdgeEffect mRightGlow;
private float mScaledHorizontalScrollFactor;
private float mScaledVerticalScrollFactor;
/* access modifiers changed from: private */
public final int[] mScrollConsumed;
private OnScrollListener mScrollListener;
private List<OnScrollListener> mScrollListeners;
private final int[] mScrollOffset;
private int mScrollPointerId;
private int mScrollState;
private NestedScrollingChildHelper mScrollingChildHelper;