package androidx.recyclerview.widget; import android.R; import android.animation.LayoutTransition; import android.annotation.SuppressLint; 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.util.AttributeSet; import android.util.Log; import android.util.SparseArray; 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 androidx.core.view.e0; import androidx.core.view.n0; import androidx.core.view.t0; import androidx.recyclerview.widget.a; import androidx.recyclerview.widget.b; import androidx.recyclerview.widget.e; import androidx.recyclerview.widget.l; import androidx.recyclerview.widget.p; import androidx.recyclerview.widget.q; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.RequestConfiguration; import com.google.android.gms.common.api.Api; 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; import z.a0; /* loaded from: classes.dex */ public class RecyclerView extends ViewGroup { static final boolean ALLOW_SIZE_IN_UNSPECIFIED_SPEC; static final boolean ALLOW_THREAD_GAP_WORK; static final boolean DEBUG = false; static final int DEFAULT_ORIENTATION = 1; static final boolean DISPATCH_TEMP_DETACH = false; private static final boolean FORCE_ABS_FOCUS_SEARCH_DIRECTION; static final boolean FORCE_INVALIDATE_DISPLAY_LIST; static final long FOREVER_NS = Long.MAX_VALUE; public static final int HORIZONTAL = 0; private static final boolean IGNORE_DETACHED_FOCUSED_CHILD; private static final int INVALID_POINTER = -1; public static final int INVALID_TYPE = -1; private static final Class[] LAYOUT_MANAGER_CONSTRUCTOR_SIGNATURE; static final int MAX_SCROLL_DURATION = 2000; private static final int[] NESTED_SCROLLING_ATTRS = {R.attr.nestedScrollingEnabled}; public static final long NO_ID = -1; public static final int NO_POSITION = -1; static final boolean POST_UPDATES_ON_ANIMATION; 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"; public static final int UNDEFINED_DURATION = Integer.MIN_VALUE; static final boolean VERBOSE_TRACING = false; public static final int VERTICAL = 1; static final Interpolator sQuinticInterpolator; androidx.recyclerview.widget.l mAccessibilityDelegate; private final AccessibilityManager mAccessibilityManager; g mAdapter; androidx.recyclerview.widget.a mAdapterHelper; boolean mAdapterUpdateDuringMeasure; private EdgeEffect mBottomGlow; private j mChildDrawingOrderCallback; androidx.recyclerview.widget.b mChildHelper; boolean mClipToPadding; boolean mDataSetHasChangedAfterLayout; boolean mDispatchItemsChangedEvent; private int mDispatchScrollCounter; private int mEatenAccessibilityChangeFlags; private k mEdgeEffectFactory; boolean mEnableFastScroller; boolean mFirstLayoutComplete; androidx.recyclerview.widget.e mGapWorker; boolean mHasFixedSize; private boolean mIgnoreMotionEventTillDown; private int mInitialTouchX; private int mInitialTouchY; private int mInterceptRequestLayoutDepth; private s mInterceptingOnItemTouchListener; boolean mIsAttached; l mItemAnimator; private l.a mItemAnimatorListener; private Runnable mItemAnimatorRunner; final ArrayList mItemDecorations; boolean mItemsAddedOrRemoved; boolean mItemsChanged; private int mLastTouchX; private int mLastTouchY; o mLayout; private int mLayoutOrScrollCounter; boolean mLayoutSuppressed; boolean mLayoutWasDefered; private EdgeEffect mLeftGlow; private final int mMaxFlingVelocity; private final int mMinFlingVelocity; private final int[] mMinMaxLayoutPositions; private final int[] mNestedOffsets; private final x mObserver; private List mOnChildAttachStateListeners; private r mOnFlingListener; private final ArrayList mOnItemTouchListeners; final List mPendingAccessibilityImportanceChange; private y mPendingSavedState; boolean mPostedAnimatorRunner; e.b mPrefetchRegistry; private boolean mPreserveFocusAfterLayout; final v mRecycler; w mRecyclerListener; final int[] mReusableIntPair; private EdgeEffect mRightGlow; private float mScaledHorizontalScrollFactor; private float mScaledVerticalScrollFactor; private t mScrollListener; private List mScrollListeners; private final int[] mScrollOffset; private int mScrollPointerId; private int mScrollState; private e0 mScrollingChildHelper; final a0 mState; final Rect mTempRect; private final Rect mTempRect2; final RectF mTempRectF; private EdgeEffect mTopGlow; private int mTouchSlop; final Runnable mUpdateChildViewsRunnable; private VelocityTracker mVelocityTracker; final c0 mViewFlinger; private final q.b mViewInfoProcessCallback; final androidx.recyclerview.widget.q mViewInfoStore; class a implements Runnable { a() { } @Override // java.lang.Runnable public void run() { RecyclerView recyclerView = RecyclerView.this; if (!recyclerView.mFirstLayoutComplete || recyclerView.isLayoutRequested()) { return; } RecyclerView recyclerView2 = RecyclerView.this; if (!recyclerView2.mIsAttached) { recyclerView2.requestLayout(); } else if (recyclerView2.mLayoutSuppressed) { recyclerView2.mLayoutWasDefered = true; } else { recyclerView2.consumePendingUpdateOperations(); } } } public static class a0 { /* renamed from: b, reason: collision with root package name */ private SparseArray f2214b; /* renamed from: m, reason: collision with root package name */ int f2225m; /* renamed from: n, reason: collision with root package name */ long f2226n; /* renamed from: o, reason: collision with root package name */ int f2227o; /* renamed from: p, reason: collision with root package name */ int f2228p; /* renamed from: q, reason: collision with root package name */ int f2229q; /* renamed from: a, reason: collision with root package name */ int f2213a = -1; /* renamed from: c, reason: collision with root package name */ int f2215c = 0; /* renamed from: d, reason: collision with root package name */ int f2216d = 0; /* renamed from: e, reason: collision with root package name */ int f2217e = 1; /* renamed from: f, reason: collision with root package name */ int f2218f = 0; /* renamed from: g, reason: collision with root package name */ boolean f2219g = false; /* renamed from: h, reason: collision with root package name */ boolean f2220h = false; /* renamed from: i, reason: collision with root package name */ boolean f2221i = false; /* renamed from: j, reason: collision with root package name */ boolean f2222j = false; /* renamed from: k, reason: collision with root package name */ boolean f2223k = false; /* renamed from: l, reason: collision with root package name */ boolean f2224l = false; void a(int i10) { if ((this.f2217e & i10) != 0) { return; } throw new IllegalStateException("Layout state should be one of " + Integer.toBinaryString(i10) + " but it is " + Integer.toBinaryString(this.f2217e)); } public int b() { return this.f2220h ? this.f2215c - this.f2216d : this.f2218f; } public int c() { return this.f2213a; } public boolean d() { return this.f2213a != -1; } public boolean e() { return this.f2220h; } void f(g gVar) { this.f2217e = 1; this.f2218f = gVar.c(); this.f2220h = false; this.f2221i = false; this.f2222j = false; } public boolean g() { return this.f2224l; } public String toString() { return "State{mTargetPosition=" + this.f2213a + ", mData=" + this.f2214b + ", mItemCount=" + this.f2218f + ", mIsMeasuring=" + this.f2222j + ", mPreviousLayoutItemCount=" + this.f2215c + ", mDeletedInvisibleItemCountSincePreviousLayout=" + this.f2216d + ", mStructureChanged=" + this.f2219g + ", mInPreLayout=" + this.f2220h + ", mRunSimpleAnimations=" + this.f2223k + ", mRunPredictiveAnimations=" + this.f2224l + '}'; } } class b implements Runnable { b() { } @Override // java.lang.Runnable public void run() { l lVar = RecyclerView.this.mItemAnimator; if (lVar != null) { lVar.u(); } RecyclerView.this.mPostedAnimatorRunner = false; } } public static abstract class b0 { } static class c implements Interpolator { c() { } @Override // android.animation.TimeInterpolator public float getInterpolation(float f10) { float f11 = f10 - 1.0f; return (f11 * f11 * f11 * f11 * f11) + 1.0f; } } class c0 implements Runnable { /* renamed from: a, reason: collision with root package name */ private int f2231a; /* renamed from: b, reason: collision with root package name */ private int f2232b; /* renamed from: c, reason: collision with root package name */ OverScroller f2233c; /* renamed from: d, reason: collision with root package name */ Interpolator f2234d; /* renamed from: e, reason: collision with root package name */ private boolean f2235e; /* renamed from: f, reason: collision with root package name */ private boolean f2236f; c0() { Interpolator interpolator = RecyclerView.sQuinticInterpolator; this.f2234d = interpolator; this.f2235e = false; this.f2236f = false; this.f2233c = new OverScroller(RecyclerView.this.getContext(), interpolator); } private int a(int i10, int i11, int i12, int i13) { int i14; int abs = Math.abs(i10); int abs2 = Math.abs(i11); boolean z10 = abs > abs2; int sqrt = (int) Math.sqrt((i12 * i12) + (i13 * i13)); int sqrt2 = (int) Math.sqrt((i10 * i10) + (i11 * i11)); RecyclerView recyclerView = RecyclerView.this; int width = z10 ? recyclerView.getWidth() : recyclerView.getHeight(); int i15 = width / 2; float f10 = width; float f11 = i15; float b10 = f11 + (b(Math.min(1.0f, (sqrt2 * 1.0f) / f10)) * f11); if (sqrt > 0) { i14 = Math.round(Math.abs(b10 / sqrt) * 1000.0f) * 4; } else { if (!z10) { abs = abs2; } i14 = (int) (((abs / f10) + 1.0f) * 300.0f); } return Math.min(i14, 2000); } private float b(float f10) { return (float) Math.sin((f10 - 0.5f) * 0.47123894f); } private void d() { RecyclerView.this.removeCallbacks(this); n0.f0(RecyclerView.this, this); } public void c(int i10, int i11) { RecyclerView.this.setScrollState(2); this.f2232b = 0; this.f2231a = 0; Interpolator interpolator = this.f2234d; Interpolator interpolator2 = RecyclerView.sQuinticInterpolator; if (interpolator != interpolator2) { this.f2234d = interpolator2; this.f2233c = new OverScroller(RecyclerView.this.getContext(), interpolator2); } this.f2233c.fling(0, 0, i10, i11, RecyclerView.UNDEFINED_DURATION, Api.BaseClientBuilder.API_PRIORITY_OTHER, RecyclerView.UNDEFINED_DURATION, Api.BaseClientBuilder.API_PRIORITY_OTHER); e(); } void e() { if (this.f2235e) { this.f2236f = true; } else { d(); } } public void f(int i10, int i11, int i12, Interpolator interpolator) { if (i12 == Integer.MIN_VALUE) { i12 = a(i10, i11, 0, 0); } int i13 = i12; if (interpolator == null) { interpolator = RecyclerView.sQuinticInterpolator; } if (this.f2234d != interpolator) { this.f2234d = interpolator; this.f2233c = new OverScroller(RecyclerView.this.getContext(), interpolator); } this.f2232b = 0; this.f2231a = 0; RecyclerView.this.setScrollState(2); this.f2233c.startScroll(0, 0, i10, i11, i13); if (Build.VERSION.SDK_INT < 23) { this.f2233c.computeScrollOffset(); } e(); } public void g() { RecyclerView.this.removeCallbacks(this); this.f2233c.abortAnimation(); } @Override // java.lang.Runnable public void run() { int i10; int i11; RecyclerView recyclerView = RecyclerView.this; if (recyclerView.mLayout == null) { g(); return; } this.f2236f = false; this.f2235e = true; recyclerView.consumePendingUpdateOperations(); OverScroller overScroller = this.f2233c; if (overScroller.computeScrollOffset()) { int currX = overScroller.getCurrX(); int currY = overScroller.getCurrY(); int i12 = currX - this.f2231a; int i13 = currY - this.f2232b; this.f2231a = currX; this.f2232b = currY; RecyclerView recyclerView2 = RecyclerView.this; int[] iArr = recyclerView2.mReusableIntPair; iArr[0] = 0; iArr[1] = 0; if (recyclerView2.dispatchNestedPreScroll(i12, i13, iArr, null, 1)) { int[] iArr2 = RecyclerView.this.mReusableIntPair; i12 -= iArr2[0]; i13 -= iArr2[1]; } if (RecyclerView.this.getOverScrollMode() != 2) { RecyclerView.this.considerReleasingGlowsOnScroll(i12, i13); } RecyclerView recyclerView3 = RecyclerView.this; if (recyclerView3.mAdapter != null) { int[] iArr3 = recyclerView3.mReusableIntPair; iArr3[0] = 0; iArr3[1] = 0; recyclerView3.scrollStep(i12, i13, iArr3); RecyclerView recyclerView4 = RecyclerView.this; int[] iArr4 = recyclerView4.mReusableIntPair; i11 = iArr4[0]; i10 = iArr4[1]; i12 -= i11; i13 -= i10; z zVar = recyclerView4.mLayout.f2279g; if (zVar != null && !zVar.g() && zVar.h()) { int b10 = RecyclerView.this.mState.b(); if (b10 == 0) { zVar.r(); } else if (zVar.f() >= b10) { zVar.p(b10 - 1); zVar.j(i11, i10); } else { zVar.j(i11, i10); } } } else { i10 = 0; i11 = 0; } if (!RecyclerView.this.mItemDecorations.isEmpty()) { RecyclerView.this.invalidate(); } RecyclerView recyclerView5 = RecyclerView.this; int[] iArr5 = recyclerView5.mReusableIntPair; iArr5[0] = 0; iArr5[1] = 0; recyclerView5.dispatchNestedScroll(i11, i10, i12, i13, null, 1, iArr5); RecyclerView recyclerView6 = RecyclerView.this; int[] iArr6 = recyclerView6.mReusableIntPair; int i14 = i12 - iArr6[0]; int i15 = i13 - iArr6[1]; if (i11 != 0 || i10 != 0) { recyclerView6.dispatchOnScrolled(i11, i10); } if (!RecyclerView.this.awakenScrollBars()) { RecyclerView.this.invalidate(); } boolean z10 = overScroller.isFinished() || (((overScroller.getCurrX() == overScroller.getFinalX()) || i14 != 0) && ((overScroller.getCurrY() == overScroller.getFinalY()) || i15 != 0)); z zVar2 = RecyclerView.this.mLayout.f2279g; if ((zVar2 != null && zVar2.g()) || !z10) { e(); RecyclerView recyclerView7 = RecyclerView.this; androidx.recyclerview.widget.e eVar = recyclerView7.mGapWorker; if (eVar != null) { eVar.f(recyclerView7, i11, i10); } } else { if (RecyclerView.this.getOverScrollMode() != 2) { int currVelocity = (int) overScroller.getCurrVelocity(); int i16 = i14 < 0 ? -currVelocity : i14 > 0 ? currVelocity : 0; if (i15 < 0) { currVelocity = -currVelocity; } else if (i15 <= 0) { currVelocity = 0; } RecyclerView.this.absorbGlows(i16, currVelocity); } if (RecyclerView.ALLOW_THREAD_GAP_WORK) { RecyclerView.this.mPrefetchRegistry.b(); } } } z zVar3 = RecyclerView.this.mLayout.f2279g; if (zVar3 != null && zVar3.g()) { zVar3.j(0, 0); } this.f2235e = false; if (this.f2236f) { d(); } else { RecyclerView.this.setScrollState(0); RecyclerView.this.stopNestedScroll(1); } } } class d implements q.b { d() { } @Override // androidx.recyclerview.widget.q.b public void a(d0 d0Var) { RecyclerView recyclerView = RecyclerView.this; recyclerView.mLayout.m1(d0Var.f2240a, recyclerView.mRecycler); } @Override // androidx.recyclerview.widget.q.b public void b(d0 d0Var, l.b bVar, l.b bVar2) { RecyclerView.this.animateAppearance(d0Var, bVar, bVar2); } @Override // androidx.recyclerview.widget.q.b public void c(d0 d0Var, l.b bVar, l.b bVar2) { RecyclerView.this.mRecycler.J(d0Var); RecyclerView.this.animateDisappearance(d0Var, bVar, bVar2); } @Override // androidx.recyclerview.widget.q.b public void d(d0 d0Var, l.b bVar, l.b bVar2) { d0Var.G(false); RecyclerView recyclerView = RecyclerView.this; if (recyclerView.mDataSetHasChangedAfterLayout) { if (recyclerView.mItemAnimator.b(d0Var, d0Var, bVar, bVar2)) { RecyclerView.this.postAnimationRunner(); } } else if (recyclerView.mItemAnimator.d(d0Var, bVar, bVar2)) { RecyclerView.this.postAnimationRunner(); } } } public static abstract class d0 { /* renamed from: s, reason: collision with root package name */ private static final List f2239s = Collections.emptyList(); /* renamed from: a, reason: collision with root package name */ public final View f2240a; /* renamed from: b, reason: collision with root package name */ WeakReference f2241b; /* renamed from: j, reason: collision with root package name */ int f2249j; /* renamed from: r, reason: collision with root package name */ RecyclerView f2257r; /* renamed from: c, reason: collision with root package name */ int f2242c = -1; /* renamed from: d, reason: collision with root package name */ int f2243d = -1; /* renamed from: e, reason: collision with root package name */ long f2244e = -1; /* renamed from: f, reason: collision with root package name */ int f2245f = -1; /* renamed from: g, reason: collision with root package name */ int f2246g = -1; /* renamed from: h, reason: collision with root package name */ d0 f2247h = null; /* renamed from: i, reason: collision with root package name */ d0 f2248i = null; /* renamed from: k, reason: collision with root package name */ List f2250k = null; /* renamed from: l, reason: collision with root package name */ List f2251l = null; /* renamed from: m, reason: collision with root package name */ private int f2252m = 0; /* renamed from: n, reason: collision with root package name */ v f2253n = null; /* renamed from: o, reason: collision with root package name */ boolean f2254o = false; /* renamed from: p, reason: collision with root package name */ private int f2255p = 0; /* renamed from: q, reason: collision with root package name */ int f2256q = -1; public d0(View view) { if (view == null) { throw new IllegalArgumentException("itemView may not be null"); } this.f2240a = view; } private void g() { if (this.f2250k == null) { ArrayList arrayList = new ArrayList(); this.f2250k = arrayList; this.f2251l = Collections.unmodifiableList(arrayList); } } void A(int i10, boolean z10) { if (this.f2243d == -1) { this.f2243d = this.f2242c; } if (this.f2246g == -1) { this.f2246g = this.f2242c; } if (z10) { this.f2246g += i10; } this.f2242c += i10; if (this.f2240a.getLayoutParams() != null) { ((p) this.f2240a.getLayoutParams()).f2299c = true; } } void B(RecyclerView recyclerView) { int i10 = this.f2256q; if (i10 != -1) { this.f2255p = i10; } else { this.f2255p = n0.z(this.f2240a); } recyclerView.setChildImportantForAccessibilityInternal(this, 4); } void C(RecyclerView recyclerView) { recyclerView.setChildImportantForAccessibilityInternal(this, this.f2255p); this.f2255p = 0; } void D() { this.f2249j = 0; this.f2242c = -1; this.f2243d = -1; this.f2244e = -1L; this.f2246g = -1; this.f2252m = 0; this.f2247h = null; this.f2248i = null; d(); this.f2255p = 0; this.f2256q = -1; RecyclerView.clearNestedRecyclerViewIfNotNested(this); } void E() { if (this.f2243d == -1) { this.f2243d = this.f2242c; } } void F(int i10, int i11) { this.f2249j = (i10 & i11) | (this.f2249j & (~i11)); } public final void G(boolean z10) { int i10 = this.f2252m; int i11 = z10 ? i10 - 1 : i10 + 1; this.f2252m = i11; if (i11 < 0) { this.f2252m = 0; Log.e("View", "isRecyclable decremented below 0: unmatched pair of setIsRecyable() calls for " + this); return; } if (!z10 && i11 == 1) { this.f2249j |= 16; } else if (z10 && i11 == 0) { this.f2249j &= -17; } } void H(v vVar, boolean z10) { this.f2253n = vVar; this.f2254o = z10; } boolean I() { return (this.f2249j & 16) != 0; } boolean J() { return (this.f2249j & 128) != 0; } void K() { this.f2253n.J(this); } boolean L() { return (this.f2249j & 32) != 0; } void a(Object obj) { if (obj == null) { b(1024); } else if ((1024 & this.f2249j) == 0) { g(); this.f2250k.add(obj); } } void b(int i10) { this.f2249j = i10 | this.f2249j; } void c() { this.f2243d = -1; this.f2246g = -1; } void d() { List list = this.f2250k; if (list != null) { list.clear(); } this.f2249j &= -1025; } void e() { this.f2249j &= -33; } void f() { this.f2249j &= -257; } boolean h() { return (this.f2249j & 16) == 0 && n0.O(this.f2240a); } void i(int i10, int i11, boolean z10) { b(8); A(i11, z10); this.f2242c = i10; } public final int j() { RecyclerView recyclerView = this.f2257r; if (recyclerView == null) { return -1; } return recyclerView.getAdapterPositionFor(this); } public final long k() { return this.f2244e; } public final int l() { return this.f2245f; } public final int m() { int i10 = this.f2246g; return i10 == -1 ? this.f2242c : i10; } public final int n() { return this.f2243d; } List o() { if ((this.f2249j & 1024) != 0) { return f2239s; } List list = this.f2250k; return (list == null || list.size() == 0) ? f2239s : this.f2251l; } boolean p(int i10) { return (i10 & this.f2249j) != 0; } boolean q() { return (this.f2249j & AdRequest.MAX_CONTENT_URL_LENGTH) != 0 || t(); } boolean r() { return (this.f2240a.getParent() == null || this.f2240a.getParent() == this.f2257r) ? false : true; } boolean s() { return (this.f2249j & 1) != 0; } boolean t() { return (this.f2249j & 4) != 0; } public String toString() { StringBuilder sb = new StringBuilder((getClass().isAnonymousClass() ? "ViewHolder" : getClass().getSimpleName()) + "{" + Integer.toHexString(hashCode()) + " position=" + this.f2242c + " id=" + this.f2244e + ", oldPos=" + this.f2243d + ", pLpos:" + this.f2246g); if (w()) { sb.append(" scrap "); sb.append(this.f2254o ? "[changeScrap]" : "[attachedScrap]"); } if (t()) { sb.append(" invalid"); } if (!s()) { sb.append(" unbound"); } if (z()) { sb.append(" update"); } if (v()) { sb.append(" removed"); } if (J()) { sb.append(" ignored"); } if (x()) { sb.append(" tmpDetached"); } if (!u()) { sb.append(" not recyclable(" + this.f2252m + ")"); } if (q()) { sb.append(" undefined adapter position"); } if (this.f2240a.getParent() == null) { sb.append(" no parent"); } sb.append("}"); return sb.toString(); } public final boolean u() { return (this.f2249j & 16) == 0 && !n0.O(this.f2240a); } boolean v() { return (this.f2249j & 8) != 0; } boolean w() { return this.f2253n != null; } boolean x() { return (this.f2249j & 256) != 0; } boolean y() { return (this.f2249j & 2) != 0; } boolean z() { return (this.f2249j & 2) != 0; } } class e implements b.InterfaceC0034b { e() { } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public View a(int i10) { return RecyclerView.this.getChildAt(i10); } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public void b(View view) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (childViewHolderInt != null) { childViewHolderInt.B(RecyclerView.this); } } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public int c() { return RecyclerView.this.getChildCount(); } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public void d() { int c10 = c(); for (int i10 = 0; i10 < c10; i10++) { View a10 = a(i10); RecyclerView.this.dispatchChildDetached(a10); a10.clearAnimation(); } RecyclerView.this.removeAllViews(); } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public int e(View view) { return RecyclerView.this.indexOfChild(view); } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public d0 f(View view) { return RecyclerView.getChildViewHolderInt(view); } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public void g(int i10) { d0 childViewHolderInt; View a10 = a(i10); if (a10 != null && (childViewHolderInt = RecyclerView.getChildViewHolderInt(a10)) != null) { if (childViewHolderInt.x() && !childViewHolderInt.J()) { throw new IllegalArgumentException("called detach on an already detached child " + childViewHolderInt + RecyclerView.this.exceptionLabel()); } childViewHolderInt.b(256); } RecyclerView.this.detachViewFromParent(i10); } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public void h(View view) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (childViewHolderInt != null) { childViewHolderInt.C(RecyclerView.this); } } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public void i(View view, int i10) { RecyclerView.this.addView(view, i10); RecyclerView.this.dispatchChildAttached(view); } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public void j(int i10) { View childAt = RecyclerView.this.getChildAt(i10); if (childAt != null) { RecyclerView.this.dispatchChildDetached(childAt); childAt.clearAnimation(); } RecyclerView.this.removeViewAt(i10); } @Override // androidx.recyclerview.widget.b.InterfaceC0034b public void k(View view, int i10, ViewGroup.LayoutParams layoutParams) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (childViewHolderInt != null) { if (!childViewHolderInt.x() && !childViewHolderInt.J()) { throw new IllegalArgumentException("Called attach on a child which is not detached: " + childViewHolderInt + RecyclerView.this.exceptionLabel()); } childViewHolderInt.f(); } RecyclerView.this.attachViewToParent(view, i10, layoutParams); } } class f implements a.InterfaceC0033a { f() { } @Override // androidx.recyclerview.widget.a.InterfaceC0033a public void a(int i10, int i11) { RecyclerView.this.offsetPositionRecordsForMove(i10, i11); RecyclerView.this.mItemsAddedOrRemoved = true; } @Override // androidx.recyclerview.widget.a.InterfaceC0033a public void b(a.b bVar) { i(bVar); } @Override // androidx.recyclerview.widget.a.InterfaceC0033a public void c(int i10, int i11, Object obj) { RecyclerView.this.viewRangeUpdate(i10, i11, obj); RecyclerView.this.mItemsChanged = true; } @Override // androidx.recyclerview.widget.a.InterfaceC0033a public void d(a.b bVar) { i(bVar); } @Override // androidx.recyclerview.widget.a.InterfaceC0033a public d0 e(int i10) { d0 findViewHolderForPosition = RecyclerView.this.findViewHolderForPosition(i10, true); if (findViewHolderForPosition == null || RecyclerView.this.mChildHelper.n(findViewHolderForPosition.f2240a)) { return null; } return findViewHolderForPosition; } @Override // androidx.recyclerview.widget.a.InterfaceC0033a public void f(int i10, int i11) { RecyclerView.this.offsetPositionRecordsForRemove(i10, i11, false); RecyclerView.this.mItemsAddedOrRemoved = true; } @Override // androidx.recyclerview.widget.a.InterfaceC0033a public void g(int i10, int i11) { RecyclerView.this.offsetPositionRecordsForInsert(i10, i11); RecyclerView.this.mItemsAddedOrRemoved = true; } @Override // androidx.recyclerview.widget.a.InterfaceC0033a public void h(int i10, int i11) { RecyclerView.this.offsetPositionRecordsForRemove(i10, i11, true); RecyclerView recyclerView = RecyclerView.this; recyclerView.mItemsAddedOrRemoved = true; recyclerView.mState.f2216d += i11; } void i(a.b bVar) { int i10 = bVar.f2380a; if (i10 == 1) { RecyclerView recyclerView = RecyclerView.this; recyclerView.mLayout.R0(recyclerView, bVar.f2381b, bVar.f2383d); return; } if (i10 == 2) { RecyclerView recyclerView2 = RecyclerView.this; recyclerView2.mLayout.U0(recyclerView2, bVar.f2381b, bVar.f2383d); } else if (i10 == 4) { RecyclerView recyclerView3 = RecyclerView.this; recyclerView3.mLayout.W0(recyclerView3, bVar.f2381b, bVar.f2383d, bVar.f2382c); } else { if (i10 != 8) { return; } RecyclerView recyclerView4 = RecyclerView.this; recyclerView4.mLayout.T0(recyclerView4, bVar.f2381b, bVar.f2383d, 1); } } } public static abstract class g { /* renamed from: a, reason: collision with root package name */ private final h f2260a = new h(); /* renamed from: b, reason: collision with root package name */ private boolean f2261b = false; public final void a(d0 d0Var, int i10) { d0Var.f2242c = i10; if (g()) { d0Var.f2244e = d(i10); } d0Var.F(1, 519); v.p.a(RecyclerView.TRACE_BIND_VIEW_TAG); j(d0Var, i10, d0Var.o()); d0Var.d(); ViewGroup.LayoutParams layoutParams = d0Var.f2240a.getLayoutParams(); if (layoutParams instanceof p) { ((p) layoutParams).f2299c = true; } v.p.b(); } public final d0 b(ViewGroup viewGroup, int i10) { try { v.p.a(RecyclerView.TRACE_CREATE_VIEW_TAG); d0 k10 = k(viewGroup, i10); if (k10.f2240a.getParent() != null) { throw new IllegalStateException("ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)"); } k10.f2245f = i10; return k10; } finally { v.p.b(); } } public abstract int c(); public long d(int i10) { return -1L; } public int e(int i10) { return 0; } public final boolean f() { return this.f2260a.a(); } public final boolean g() { return this.f2261b; } public void h(RecyclerView recyclerView) { } public abstract void i(d0 d0Var, int i10); public void j(d0 d0Var, int i10, List list) { i(d0Var, i10); } public abstract d0 k(ViewGroup viewGroup, int i10); public void l(RecyclerView recyclerView) { } public boolean m(d0 d0Var) { return false; } public void n(d0 d0Var) { } public void o(d0 d0Var) { } public void p(d0 d0Var) { } public void q(i iVar) { this.f2260a.registerObserver(iVar); } public void r(boolean z10) { if (f()) { throw new IllegalStateException("Cannot change whether this adapter has stable IDs while the adapter has registered observers."); } this.f2261b = z10; } public void s(i iVar) { this.f2260a.unregisterObserver(iVar); } } static class h extends Observable { h() { } public boolean a() { return !((Observable) this).mObservers.isEmpty(); } } public static abstract class i { } public interface j { } public static class k { protected EdgeEffect a(RecyclerView recyclerView, int i10) { return new EdgeEffect(recyclerView.getContext()); } } public static abstract class l { /* renamed from: a, reason: collision with root package name */ private a f2262a = null; /* renamed from: b, reason: collision with root package name */ private ArrayList f2263b = new ArrayList(); /* renamed from: c, reason: collision with root package name */ private long f2264c = 120; /* renamed from: d, reason: collision with root package name */ private long f2265d = 120; /* renamed from: e, reason: collision with root package name */ private long f2266e = 250; /* renamed from: f, reason: collision with root package name */ private long f2267f = 250; interface a { void a(d0 d0Var); } public static class b { /* renamed from: a, reason: collision with root package name */ public int f2268a; /* renamed from: b, reason: collision with root package name */ public int f2269b; /* renamed from: c, reason: collision with root package name */ public int f2270c; /* renamed from: d, reason: collision with root package name */ public int f2271d; public b a(d0 d0Var) { return b(d0Var, 0); } public b b(d0 d0Var, int i10) { View view = d0Var.f2240a; this.f2268a = view.getLeft(); this.f2269b = view.getTop(); this.f2270c = view.getRight(); this.f2271d = view.getBottom(); return this; } } static int e(d0 d0Var) { int i10 = d0Var.f2249j & 14; if (d0Var.t()) { return 4; } if ((i10 & 4) != 0) { return i10; } int n10 = d0Var.n(); int j10 = d0Var.j(); return (n10 == -1 || j10 == -1 || n10 == j10) ? i10 : i10 | 2048; } public abstract boolean a(d0 d0Var, b bVar, b bVar2); public abstract boolean b(d0 d0Var, d0 d0Var2, b bVar, b bVar2); public abstract boolean c(d0 d0Var, b bVar, b bVar2); public abstract boolean d(d0 d0Var, b bVar, b bVar2); public abstract boolean f(d0 d0Var); public boolean g(d0 d0Var, List list) { return f(d0Var); } public final void h(d0 d0Var) { r(d0Var); a aVar = this.f2262a; if (aVar != null) { aVar.a(d0Var); } } public final void i() { if (this.f2263b.size() <= 0) { this.f2263b.clear(); } else { androidx.appcompat.app.m.a(this.f2263b.get(0)); throw null; } } public abstract void j(d0 d0Var); public abstract void k(); public long l() { return this.f2264c; } public long m() { return this.f2267f; } public long n() { return this.f2266e; } public long o() { return this.f2265d; } public abstract boolean p(); public b q() { return new b(); } public void r(d0 d0Var) { } public b s(a0 a0Var, d0 d0Var) { return q().a(d0Var); } public b t(a0 a0Var, d0 d0Var, int i10, List list) { return q().a(d0Var); } public abstract void u(); void v(a aVar) { this.f2262a = aVar; } } private class m implements l.a { m() { } @Override // androidx.recyclerview.widget.RecyclerView.l.a public void a(d0 d0Var) { d0Var.G(true); if (d0Var.f2247h != null && d0Var.f2248i == null) { d0Var.f2247h = null; } d0Var.f2248i = null; if (d0Var.I() || RecyclerView.this.removeAnimatingView(d0Var.f2240a) || !d0Var.x()) { return; } RecyclerView.this.removeDetachedView(d0Var.f2240a, false); } } public static abstract class n { public void d(Rect rect, int i10, RecyclerView recyclerView) { rect.set(0, 0, 0, 0); } public void e(Rect rect, View view, RecyclerView recyclerView, a0 a0Var) { d(rect, ((p) view.getLayoutParams()).a(), recyclerView); } public void f(Canvas canvas, RecyclerView recyclerView) { } public void g(Canvas canvas, RecyclerView recyclerView, a0 a0Var) { f(canvas, recyclerView); } public void h(Canvas canvas, RecyclerView recyclerView) { } public void i(Canvas canvas, RecyclerView recyclerView, a0 a0Var) { h(canvas, recyclerView); } } public static abstract class o { /* renamed from: a, reason: collision with root package name */ androidx.recyclerview.widget.b f2273a; /* renamed from: b, reason: collision with root package name */ RecyclerView f2274b; /* renamed from: c, reason: collision with root package name */ private final p.b f2275c; /* renamed from: d, reason: collision with root package name */ private final p.b f2276d; /* renamed from: e, reason: collision with root package name */ androidx.recyclerview.widget.p f2277e; /* renamed from: f, reason: collision with root package name */ androidx.recyclerview.widget.p f2278f; /* renamed from: g, reason: collision with root package name */ z f2279g; /* renamed from: h, reason: collision with root package name */ boolean f2280h; /* renamed from: i, reason: collision with root package name */ boolean f2281i; /* renamed from: j, reason: collision with root package name */ boolean f2282j; /* renamed from: k, reason: collision with root package name */ private boolean f2283k; /* renamed from: l, reason: collision with root package name */ private boolean f2284l; /* renamed from: m, reason: collision with root package name */ int f2285m; /* renamed from: n, reason: collision with root package name */ boolean f2286n; /* renamed from: o, reason: collision with root package name */ private int f2287o; /* renamed from: p, reason: collision with root package name */ private int f2288p; /* renamed from: q, reason: collision with root package name */ private int f2289q; /* renamed from: r, reason: collision with root package name */ private int f2290r; class a implements p.b { a() { } @Override // androidx.recyclerview.widget.p.b public View a(int i10) { return o.this.I(i10); } @Override // androidx.recyclerview.widget.p.b public int b(View view) { return o.this.Q(view) - ((ViewGroup.MarginLayoutParams) ((p) view.getLayoutParams())).leftMargin; } @Override // androidx.recyclerview.widget.p.b public int c() { return o.this.e0(); } @Override // androidx.recyclerview.widget.p.b public int d() { return o.this.o0() - o.this.f0(); } @Override // androidx.recyclerview.widget.p.b public int e(View view) { return o.this.T(view) + ((ViewGroup.MarginLayoutParams) ((p) view.getLayoutParams())).rightMargin; } } class b implements p.b { b() { } @Override // androidx.recyclerview.widget.p.b public View a(int i10) { return o.this.I(i10); } @Override // androidx.recyclerview.widget.p.b public int b(View view) { return o.this.U(view) - ((ViewGroup.MarginLayoutParams) ((p) view.getLayoutParams())).topMargin; } @Override // androidx.recyclerview.widget.p.b public int c() { return o.this.g0(); } @Override // androidx.recyclerview.widget.p.b public int d() { return o.this.W() - o.this.d0(); } @Override // androidx.recyclerview.widget.p.b public int e(View view) { return o.this.O(view) + ((ViewGroup.MarginLayoutParams) ((p) view.getLayoutParams())).bottomMargin; } } public interface c { void a(int i10, int i11); } public static class d { /* renamed from: a, reason: collision with root package name */ public int f2293a; /* renamed from: b, reason: collision with root package name */ public int f2294b; /* renamed from: c, reason: collision with root package name */ public boolean f2295c; /* renamed from: d, reason: collision with root package name */ public boolean f2296d; } public o() { a aVar = new a(); this.f2275c = aVar; b bVar = new b(); this.f2276d = bVar; this.f2277e = new androidx.recyclerview.widget.p(aVar); this.f2278f = new androidx.recyclerview.widget.p(bVar); this.f2280h = false; this.f2281i = false; this.f2282j = false; this.f2283k = true; this.f2284l = true; } /* JADX WARN: Code restructure failed: missing block: B:7:0x0017, code lost: if (r5 == 1073741824) goto L14; */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public static int K(int r4, int r5, int r6, int r7, boolean r8) { /* int r4 = r4 - r6 r6 = 0 int r4 = java.lang.Math.max(r6, r4) r0 = -2 r1 = -1 r2 = -2147483648(0xffffffff80000000, float:-0.0) r3 = 1073741824(0x40000000, float:2.0) if (r8 == 0) goto L1a if (r7 < 0) goto L11 goto L1c L11: if (r7 != r1) goto L2f if (r5 == r2) goto L21 if (r5 == 0) goto L2f if (r5 == r3) goto L21 goto L2f L1a: if (r7 < 0) goto L1f L1c: r5 = 1073741824(0x40000000, float:2.0) goto L31 L1f: if (r7 != r1) goto L23 L21: r7 = r4 goto L31 L23: if (r7 != r0) goto L2f if (r5 == r2) goto L2c if (r5 != r3) goto L2a goto L2c L2a: r5 = 0 goto L21 L2c: r5 = -2147483648(0xffffffff80000000, float:-0.0) goto L21 L2f: r5 = 0 r7 = 0 L31: int r4 = android.view.View.MeasureSpec.makeMeasureSpec(r7, r5) return r4 */ throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.o.K(int, int, int, int, boolean):int"); } private int[] L(View view, Rect rect) { int[] iArr = new int[2]; int e02 = e0(); int g02 = g0(); int o02 = o0() - f0(); int W = W() - d0(); int left = (view.getLeft() + rect.left) - view.getScrollX(); int top = (view.getTop() + rect.top) - view.getScrollY(); int width = rect.width() + left; int height = rect.height() + top; int i10 = left - e02; int min = Math.min(0, i10); int i11 = top - g02; int min2 = Math.min(0, i11); int i12 = width - o02; int max = Math.max(0, i12); int max2 = Math.max(0, height - W); if (Z() != 1) { if (min == 0) { min = Math.min(i10, max); } max = min; } else if (max == 0) { max = Math.max(min, i12); } if (min2 == 0) { min2 = Math.min(i11, max2); } iArr[0] = max; iArr[1] = min2; return iArr; } private void f(View view, int i10, boolean z10) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (z10 || childViewHolderInt.v()) { this.f2274b.mViewInfoStore.b(childViewHolderInt); } else { this.f2274b.mViewInfoStore.p(childViewHolderInt); } p pVar = (p) view.getLayoutParams(); if (childViewHolderInt.L() || childViewHolderInt.w()) { if (childViewHolderInt.w()) { childViewHolderInt.K(); } else { childViewHolderInt.e(); } this.f2273a.c(view, i10, view.getLayoutParams(), false); } else if (view.getParent() == this.f2274b) { int m10 = this.f2273a.m(view); if (i10 == -1) { i10 = this.f2273a.g(); } if (m10 == -1) { throw new IllegalStateException("Added View has RecyclerView as parent but view is not a real child. Unfiltered index:" + this.f2274b.indexOfChild(view) + this.f2274b.exceptionLabel()); } if (m10 != i10) { this.f2274b.mLayout.B0(m10, i10); } } else { this.f2273a.a(view, i10, false); pVar.f2299c = true; z zVar = this.f2279g; if (zVar != null && zVar.h()) { this.f2279g.k(view); } } if (pVar.f2300d) { childViewHolderInt.f2240a.invalidate(); pVar.f2300d = false; } } public static d i0(Context context, AttributeSet attributeSet, int i10, int i11) { d dVar = new d(); TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, l0.c.f11571f, i10, i11); dVar.f2293a = obtainStyledAttributes.getInt(l0.c.f11572g, 1); dVar.f2294b = obtainStyledAttributes.getInt(l0.c.f11582q, 1); dVar.f2295c = obtainStyledAttributes.getBoolean(l0.c.f11581p, false); dVar.f2296d = obtainStyledAttributes.getBoolean(l0.c.f11583r, false); obtainStyledAttributes.recycle(); return dVar; } public static int n(int i10, int i11, int i12) { int mode = View.MeasureSpec.getMode(i10); int size = View.MeasureSpec.getSize(i10); return mode != Integer.MIN_VALUE ? mode != 1073741824 ? Math.max(i11, i12) : size : Math.min(size, Math.max(i11, i12)); } private boolean t0(RecyclerView recyclerView, int i10, int i11) { View focusedChild = recyclerView.getFocusedChild(); if (focusedChild == null) { return false; } int e02 = e0(); int g02 = g0(); int o02 = o0() - f0(); int W = W() - d0(); Rect rect = this.f2274b.mTempRect; P(focusedChild, rect); return rect.left - i10 < o02 && rect.right - i10 > e02 && rect.top - i11 < W && rect.bottom - i11 > g02; } private void v1(v vVar, int i10, View view) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (childViewHolderInt.J()) { return; } if (childViewHolderInt.t() && !childViewHolderInt.v() && !this.f2274b.mAdapter.g()) { q1(i10); vVar.C(childViewHolderInt); } else { x(i10); vVar.D(view); this.f2274b.mViewInfoStore.k(childViewHolderInt); } } private static boolean w0(int i10, int i11, int i12) { int mode = View.MeasureSpec.getMode(i11); int size = View.MeasureSpec.getSize(i11); if (i12 > 0 && i10 != i12) { return false; } if (mode == Integer.MIN_VALUE) { return size >= i10; } if (mode != 0) { return mode == 1073741824 && size == i10; } return true; } private void y(int i10, View view) { this.f2273a.d(i10); } void A(RecyclerView recyclerView, v vVar) { this.f2281i = false; I0(recyclerView, vVar); } public void A0(View view, int i10, int i11) { p pVar = (p) view.getLayoutParams(); Rect itemDecorInsetsForChild = this.f2274b.getItemDecorInsetsForChild(view); int i12 = i10 + itemDecorInsetsForChild.left + itemDecorInsetsForChild.right; int i13 = i11 + itemDecorInsetsForChild.top + itemDecorInsetsForChild.bottom; int K = K(o0(), p0(), e0() + f0() + ((ViewGroup.MarginLayoutParams) pVar).leftMargin + ((ViewGroup.MarginLayoutParams) pVar).rightMargin + i12, ((ViewGroup.MarginLayoutParams) pVar).width, k()); int K2 = K(W(), X(), g0() + d0() + ((ViewGroup.MarginLayoutParams) pVar).topMargin + ((ViewGroup.MarginLayoutParams) pVar).bottomMargin + i13, ((ViewGroup.MarginLayoutParams) pVar).height, l()); if (F1(view, K, K2, pVar)) { view.measure(K, K2); } } void A1(int i10, int i11) { this.f2289q = View.MeasureSpec.getSize(i10); int mode = View.MeasureSpec.getMode(i10); this.f2287o = mode; if (mode == 0 && !RecyclerView.ALLOW_SIZE_IN_UNSPECIFIED_SPEC) { this.f2289q = 0; } this.f2290r = View.MeasureSpec.getSize(i11); int mode2 = View.MeasureSpec.getMode(i11); this.f2288p = mode2; if (mode2 != 0 || RecyclerView.ALLOW_SIZE_IN_UNSPECIFIED_SPEC) { return; } this.f2290r = 0; } public View B(View view) { View findContainingItemView; RecyclerView recyclerView = this.f2274b; if (recyclerView == null || (findContainingItemView = recyclerView.findContainingItemView(view)) == null || this.f2273a.n(findContainingItemView)) { return null; } return findContainingItemView; } public void B0(int i10, int i11) { View I = I(i10); if (I != null) { x(i10); h(I, i11); } else { throw new IllegalArgumentException("Cannot move a child from non-existing index:" + i10 + this.f2274b.toString()); } } public void B1(int i10, int i11) { this.f2274b.setMeasuredDimension(i10, i11); } public View C(int i10) { int J = J(); for (int i11 = 0; i11 < J; i11++) { View I = I(i11); d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(I); if (childViewHolderInt != null && childViewHolderInt.m() == i10 && !childViewHolderInt.J() && (this.f2274b.mState.e() || !childViewHolderInt.v())) { return I; } } return null; } public void C0(int i10) { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { recyclerView.offsetChildrenHorizontal(i10); } } public void C1(Rect rect, int i10, int i11) { B1(n(i10, rect.width() + e0() + f0(), c0()), n(i11, rect.height() + g0() + d0(), b0())); } public abstract p D(); public void D0(int i10) { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { recyclerView.offsetChildrenVertical(i10); } } void D1(int i10, int i11) { int J = J(); if (J == 0) { this.f2274b.defaultOnMeasure(i10, i11); return; } int i12 = RecyclerView.UNDEFINED_DURATION; int i13 = RecyclerView.UNDEFINED_DURATION; int i14 = Api.BaseClientBuilder.API_PRIORITY_OTHER; int i15 = Api.BaseClientBuilder.API_PRIORITY_OTHER; for (int i16 = 0; i16 < J; i16++) { View I = I(i16); Rect rect = this.f2274b.mTempRect; P(I, rect); int i17 = rect.left; if (i17 < i14) { i14 = i17; } int i18 = rect.right; if (i18 > i12) { i12 = i18; } int i19 = rect.top; if (i19 < i15) { i15 = i19; } int i20 = rect.bottom; if (i20 > i13) { i13 = i20; } } this.f2274b.mTempRect.set(i14, i15, i12, i13); C1(this.f2274b.mTempRect, i10, i11); } public p E(Context context, AttributeSet attributeSet) { return new p(context, attributeSet); } public void E0(g gVar, g gVar2) { } void E1(RecyclerView recyclerView) { if (recyclerView == null) { this.f2274b = null; this.f2273a = null; this.f2289q = 0; this.f2290r = 0; } else { this.f2274b = recyclerView; this.f2273a = recyclerView.mChildHelper; this.f2289q = recyclerView.getWidth(); this.f2290r = recyclerView.getHeight(); } this.f2287o = 1073741824; this.f2288p = 1073741824; } public p F(ViewGroup.LayoutParams layoutParams) { return layoutParams instanceof p ? new p((p) layoutParams) : layoutParams instanceof ViewGroup.MarginLayoutParams ? new p((ViewGroup.MarginLayoutParams) layoutParams) : new p(layoutParams); } public boolean F0(RecyclerView recyclerView, ArrayList arrayList, int i10, int i11) { return false; } boolean F1(View view, int i10, int i11, p pVar) { return (!view.isLayoutRequested() && this.f2283k && w0(view.getWidth(), i10, ((ViewGroup.MarginLayoutParams) pVar).width) && w0(view.getHeight(), i11, ((ViewGroup.MarginLayoutParams) pVar).height)) ? false : true; } public int G() { return -1; } public void G0(RecyclerView recyclerView) { } boolean G1() { return false; } public int H(View view) { return ((p) view.getLayoutParams()).f2298b.bottom; } public void H0(RecyclerView recyclerView) { } boolean H1(View view, int i10, int i11, p pVar) { return (this.f2283k && w0(view.getMeasuredWidth(), i10, ((ViewGroup.MarginLayoutParams) pVar).width) && w0(view.getMeasuredHeight(), i11, ((ViewGroup.MarginLayoutParams) pVar).height)) ? false : true; } public View I(int i10) { androidx.recyclerview.widget.b bVar = this.f2273a; if (bVar != null) { return bVar.f(i10); } return null; } public void I0(RecyclerView recyclerView, v vVar) { H0(recyclerView); } public abstract void I1(RecyclerView recyclerView, a0 a0Var, int i10); public int J() { androidx.recyclerview.widget.b bVar = this.f2273a; if (bVar != null) { return bVar.g(); } return 0; } public abstract View J0(View view, int i10, v vVar, a0 a0Var); public void J1(z zVar) { z zVar2 = this.f2279g; if (zVar2 != null && zVar != zVar2 && zVar2.h()) { this.f2279g.r(); } this.f2279g = zVar; zVar.q(this.f2274b, this); } public void K0(AccessibilityEvent accessibilityEvent) { RecyclerView recyclerView = this.f2274b; L0(recyclerView.mRecycler, recyclerView.mState, accessibilityEvent); } void K1() { z zVar = this.f2279g; if (zVar != null) { zVar.r(); } } public void L0(v vVar, a0 a0Var, AccessibilityEvent accessibilityEvent) { RecyclerView recyclerView = this.f2274b; if (recyclerView == null || accessibilityEvent == null) { return; } boolean z10 = true; if (!recyclerView.canScrollVertically(1) && !this.f2274b.canScrollVertically(-1) && !this.f2274b.canScrollHorizontally(-1) && !this.f2274b.canScrollHorizontally(1)) { z10 = false; } accessibilityEvent.setScrollable(z10); g gVar = this.f2274b.mAdapter; if (gVar != null) { accessibilityEvent.setItemCount(gVar.c()); } } public abstract boolean L1(); public boolean M() { RecyclerView recyclerView = this.f2274b; return recyclerView != null && recyclerView.mClipToPadding; } public void M0(v vVar, a0 a0Var, z.a0 a0Var2) { if (this.f2274b.canScrollVertically(-1) || this.f2274b.canScrollHorizontally(-1)) { a0Var2.a(8192); a0Var2.n0(true); } if (this.f2274b.canScrollVertically(1) || this.f2274b.canScrollHorizontally(1)) { a0Var2.a(4096); a0Var2.n0(true); } a0Var2.Y(a0.b.a(k0(vVar, a0Var), N(vVar, a0Var), v0(vVar, a0Var), l0(vVar, a0Var))); } public int N(v vVar, a0 a0Var) { RecyclerView recyclerView = this.f2274b; if (recyclerView == null || recyclerView.mAdapter == null || !k()) { return 1; } return this.f2274b.mAdapter.c(); } void N0(z.a0 a0Var) { RecyclerView recyclerView = this.f2274b; M0(recyclerView.mRecycler, recyclerView.mState, a0Var); } public int O(View view) { return view.getBottom() + H(view); } void O0(View view, z.a0 a0Var) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (childViewHolderInt == null || childViewHolderInt.v() || this.f2273a.n(childViewHolderInt.f2240a)) { return; } RecyclerView recyclerView = this.f2274b; P0(recyclerView.mRecycler, recyclerView.mState, view, a0Var); } public void P(View view, Rect rect) { RecyclerView.getDecoratedBoundsWithMarginsInt(view, rect); } public void P0(v vVar, a0 a0Var, View view, z.a0 a0Var2) { a0Var2.Z(a0.c.a(l() ? h0(view) : 0, 1, k() ? h0(view) : 0, 1, false, false)); } public int Q(View view) { return view.getLeft() - a0(view); } public View Q0(View view, int i10) { return null; } public int R(View view) { Rect rect = ((p) view.getLayoutParams()).f2298b; return view.getMeasuredHeight() + rect.top + rect.bottom; } public void R0(RecyclerView recyclerView, int i10, int i11) { } public int S(View view) { Rect rect = ((p) view.getLayoutParams()).f2298b; return view.getMeasuredWidth() + rect.left + rect.right; } public void S0(RecyclerView recyclerView) { } public int T(View view) { return view.getRight() + j0(view); } public void T0(RecyclerView recyclerView, int i10, int i11, int i12) { } public int U(View view) { return view.getTop() - m0(view); } public void U0(RecyclerView recyclerView, int i10, int i11) { } public View V() { View focusedChild; RecyclerView recyclerView = this.f2274b; if (recyclerView == null || (focusedChild = recyclerView.getFocusedChild()) == null || this.f2273a.n(focusedChild)) { return null; } return focusedChild; } public void V0(RecyclerView recyclerView, int i10, int i11) { } public int W() { return this.f2290r; } public void W0(RecyclerView recyclerView, int i10, int i11, Object obj) { V0(recyclerView, i10, i11); } public int X() { return this.f2288p; } public abstract void X0(v vVar, a0 a0Var); public int Y() { RecyclerView recyclerView = this.f2274b; g adapter = recyclerView != null ? recyclerView.getAdapter() : null; if (adapter != null) { return adapter.c(); } return 0; } public void Y0(a0 a0Var) { } public int Z() { return n0.B(this.f2274b); } public void Z0(v vVar, a0 a0Var, int i10, int i11) { this.f2274b.defaultOnMeasure(i10, i11); } public int a0(View view) { return ((p) view.getLayoutParams()).f2298b.left; } public boolean a1(RecyclerView recyclerView, View view, View view2) { return x0() || recyclerView.isComputingLayout(); } public void b(View view) { c(view, -1); } public int b0() { return n0.C(this.f2274b); } public boolean b1(RecyclerView recyclerView, a0 a0Var, View view, View view2) { return a1(recyclerView, view, view2); } public void c(View view, int i10) { f(view, i10, true); } public int c0() { return n0.D(this.f2274b); } public abstract void c1(Parcelable parcelable); public void d(View view) { e(view, -1); } public int d0() { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { return recyclerView.getPaddingBottom(); } return 0; } public abstract Parcelable d1(); public void e(View view, int i10) { f(view, i10, false); } public int e0() { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { return recyclerView.getPaddingLeft(); } return 0; } public void e1(int i10) { } public int f0() { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { return recyclerView.getPaddingRight(); } return 0; } void f1(z zVar) { if (this.f2279g == zVar) { this.f2279g = null; } } public void g(String str) { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { recyclerView.assertNotInLayoutOrScroll(str); } } public int g0() { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { return recyclerView.getPaddingTop(); } return 0; } boolean g1(int i10, Bundle bundle) { RecyclerView recyclerView = this.f2274b; return h1(recyclerView.mRecycler, recyclerView.mState, i10, bundle); } public void h(View view, int i10) { i(view, i10, (p) view.getLayoutParams()); } public int h0(View view) { return ((p) view.getLayoutParams()).a(); } public boolean h1(v vVar, a0 a0Var, int i10, Bundle bundle) { int W; int o02; int i11; int i12; RecyclerView recyclerView = this.f2274b; if (recyclerView == null) { return false; } if (i10 == 4096) { W = recyclerView.canScrollVertically(1) ? (W() - g0()) - d0() : 0; if (this.f2274b.canScrollHorizontally(1)) { o02 = (o0() - e0()) - f0(); i11 = W; i12 = o02; } i11 = W; i12 = 0; } else if (i10 != 8192) { i12 = 0; i11 = 0; } else { W = recyclerView.canScrollVertically(-1) ? -((W() - g0()) - d0()) : 0; if (this.f2274b.canScrollHorizontally(-1)) { o02 = -((o0() - e0()) - f0()); i11 = W; i12 = o02; } i11 = W; i12 = 0; } if (i11 == 0 && i12 == 0) { return false; } this.f2274b.smoothScrollBy(i12, i11, null, RecyclerView.UNDEFINED_DURATION, true); return true; } public void i(View view, int i10, p pVar) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (childViewHolderInt.v()) { this.f2274b.mViewInfoStore.b(childViewHolderInt); } else { this.f2274b.mViewInfoStore.p(childViewHolderInt); } this.f2273a.c(view, i10, pVar, childViewHolderInt.v()); } boolean i1(View view, int i10, Bundle bundle) { RecyclerView recyclerView = this.f2274b; return j1(recyclerView.mRecycler, recyclerView.mState, view, i10, bundle); } public void j(View view, Rect rect) { RecyclerView recyclerView = this.f2274b; if (recyclerView == null) { rect.set(0, 0, 0, 0); } else { rect.set(recyclerView.getItemDecorInsetsForChild(view)); } } public int j0(View view) { return ((p) view.getLayoutParams()).f2298b.right; } public boolean j1(v vVar, a0 a0Var, View view, int i10, Bundle bundle) { return false; } public abstract boolean k(); public int k0(v vVar, a0 a0Var) { RecyclerView recyclerView = this.f2274b; if (recyclerView == null || recyclerView.mAdapter == null || !l()) { return 1; } return this.f2274b.mAdapter.c(); } public void k1(v vVar) { for (int J = J() - 1; J >= 0; J--) { if (!RecyclerView.getChildViewHolderInt(I(J)).J()) { n1(J, vVar); } } } public abstract boolean l(); public int l0(v vVar, a0 a0Var) { return 0; } void l1(v vVar) { int j10 = vVar.j(); for (int i10 = j10 - 1; i10 >= 0; i10--) { View n10 = vVar.n(i10); d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(n10); if (!childViewHolderInt.J()) { childViewHolderInt.G(false); if (childViewHolderInt.x()) { this.f2274b.removeDetachedView(n10, false); } l lVar = this.f2274b.mItemAnimator; if (lVar != null) { lVar.j(childViewHolderInt); } childViewHolderInt.G(true); vVar.y(n10); } } vVar.e(); if (j10 > 0) { this.f2274b.invalidate(); } } public boolean m(p pVar) { return pVar != null; } public int m0(View view) { return ((p) view.getLayoutParams()).f2298b.top; } public void m1(View view, v vVar) { p1(view); vVar.B(view); } public void n0(View view, boolean z10, Rect rect) { Matrix matrix; if (z10) { Rect rect2 = ((p) view.getLayoutParams()).f2298b; rect.set(-rect2.left, -rect2.top, view.getWidth() + rect2.right, view.getHeight() + rect2.bottom); } else { rect.set(0, 0, view.getWidth(), view.getHeight()); } if (this.f2274b != null && (matrix = view.getMatrix()) != null && !matrix.isIdentity()) { RectF rectF = this.f2274b.mTempRectF; rectF.set(rect); matrix.mapRect(rectF); rect.set((int) Math.floor(rectF.left), (int) Math.floor(rectF.top), (int) Math.ceil(rectF.right), (int) Math.ceil(rectF.bottom)); } rect.offset(view.getLeft(), view.getTop()); } public void n1(int i10, v vVar) { View I = I(i10); q1(i10); vVar.B(I); } public abstract void o(int i10, int i11, a0 a0Var, c cVar); public int o0() { return this.f2289q; } public boolean o1(Runnable runnable) { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { return recyclerView.removeCallbacks(runnable); } return false; } public void p(int i10, c cVar) { } public int p0() { return this.f2287o; } public void p1(View view) { this.f2273a.p(view); } public abstract int q(a0 a0Var); boolean q0() { int J = J(); for (int i10 = 0; i10 < J; i10++) { ViewGroup.LayoutParams layoutParams = I(i10).getLayoutParams(); if (layoutParams.width < 0 && layoutParams.height < 0) { return true; } } return false; } public void q1(int i10) { if (I(i10) != null) { this.f2273a.q(i10); } } public abstract int r(a0 a0Var); public boolean r0() { return this.f2281i; } public boolean r1(RecyclerView recyclerView, View view, Rect rect, boolean z10) { return s1(recyclerView, view, rect, z10, false); } public abstract int s(a0 a0Var); public abstract boolean s0(); public boolean s1(RecyclerView recyclerView, View view, Rect rect, boolean z10, boolean z11) { int[] L = L(view, rect); int i10 = L[0]; int i11 = L[1]; if ((z11 && !t0(recyclerView, i10, i11)) || (i10 == 0 && i11 == 0)) { return false; } if (z10) { recyclerView.scrollBy(i10, i11); } else { recyclerView.smoothScrollBy(i10, i11); } return true; } public abstract int t(a0 a0Var); public void t1() { RecyclerView recyclerView = this.f2274b; if (recyclerView != null) { recyclerView.requestLayout(); } } public abstract int u(a0 a0Var); public final boolean u0() { return this.f2284l; } public void u1() { this.f2280h = true; } public abstract int v(a0 a0Var); public boolean v0(v vVar, a0 a0Var) { return false; } public void w(v vVar) { for (int J = J() - 1; J >= 0; J--) { v1(vVar, J, I(J)); } } public abstract int w1(int i10, v vVar, a0 a0Var); public void x(int i10) { y(i10, I(i10)); } public boolean x0() { z zVar = this.f2279g; return zVar != null && zVar.h(); } public abstract void x1(int i10); public boolean y0(View view, boolean z10, boolean z11) { boolean z12 = this.f2277e.b(view, 24579) && this.f2278f.b(view, 24579); return z10 ? z12 : !z12; } public abstract int y1(int i10, v vVar, a0 a0Var); void z(RecyclerView recyclerView) { this.f2281i = true; G0(recyclerView); } public void z0(View view, int i10, int i11, int i12, int i13) { p pVar = (p) view.getLayoutParams(); Rect rect = pVar.f2298b; view.layout(i10 + rect.left + ((ViewGroup.MarginLayoutParams) pVar).leftMargin, i11 + rect.top + ((ViewGroup.MarginLayoutParams) pVar).topMargin, (i12 - rect.right) - ((ViewGroup.MarginLayoutParams) pVar).rightMargin, (i13 - rect.bottom) - ((ViewGroup.MarginLayoutParams) pVar).bottomMargin); } void z1(RecyclerView recyclerView) { A1(View.MeasureSpec.makeMeasureSpec(recyclerView.getWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(recyclerView.getHeight(), 1073741824)); } } public interface q { } public static abstract class r { public abstract boolean a(int i10, int i11); } public interface s { void a(RecyclerView recyclerView, MotionEvent motionEvent); boolean b(RecyclerView recyclerView, MotionEvent motionEvent); void c(boolean z10); } public static abstract class t { public void a(RecyclerView recyclerView, int i10) { } public abstract void b(RecyclerView recyclerView, int i10, int i11); } public static class u { /* renamed from: a, reason: collision with root package name */ SparseArray f2301a = new SparseArray(); /* renamed from: b, reason: collision with root package name */ private int f2302b = 0; static class a { /* renamed from: a, reason: collision with root package name */ final ArrayList f2303a = new ArrayList(); /* renamed from: b, reason: collision with root package name */ int f2304b = 5; /* renamed from: c, reason: collision with root package name */ long f2305c = 0; /* renamed from: d, reason: collision with root package name */ long f2306d = 0; a() { } } private a g(int i10) { a aVar = (a) this.f2301a.get(i10); if (aVar != null) { return aVar; } a aVar2 = new a(); this.f2301a.put(i10, aVar2); return aVar2; } void a() { this.f2302b++; } public void b() { for (int i10 = 0; i10 < this.f2301a.size(); i10++) { ((a) this.f2301a.valueAt(i10)).f2303a.clear(); } } void c() { this.f2302b--; } void d(int i10, long j10) { a g10 = g(i10); g10.f2306d = j(g10.f2306d, j10); } void e(int i10, long j10) { a g10 = g(i10); g10.f2305c = j(g10.f2305c, j10); } public d0 f(int i10) { a aVar = (a) this.f2301a.get(i10); if (aVar == null || aVar.f2303a.isEmpty()) { return null; } ArrayList arrayList = aVar.f2303a; for (int size = arrayList.size() - 1; size >= 0; size--) { if (!((d0) arrayList.get(size)).r()) { return (d0) arrayList.remove(size); } } return null; } void h(g gVar, g gVar2, boolean z10) { if (gVar != null) { c(); } if (!z10 && this.f2302b == 0) { b(); } if (gVar2 != null) { a(); } } public void i(d0 d0Var) { int l10 = d0Var.l(); ArrayList arrayList = g(l10).f2303a; if (((a) this.f2301a.get(l10)).f2304b <= arrayList.size()) { return; } d0Var.D(); arrayList.add(d0Var); } long j(long j10, long j11) { return j10 == 0 ? j11 : ((j10 / 4) * 3) + (j11 / 4); } boolean k(int i10, long j10, long j11) { long j12 = g(i10).f2306d; return j12 == 0 || j10 + j12 < j11; } boolean l(int i10, long j10, long j11) { long j12 = g(i10).f2305c; return j12 == 0 || j10 + j12 < j11; } } public final class v { /* renamed from: a, reason: collision with root package name */ final ArrayList f2307a; /* renamed from: b, reason: collision with root package name */ ArrayList f2308b; /* renamed from: c, reason: collision with root package name */ final ArrayList f2309c; /* renamed from: d, reason: collision with root package name */ private final List f2310d; /* renamed from: e, reason: collision with root package name */ private int f2311e; /* renamed from: f, reason: collision with root package name */ int f2312f; /* renamed from: g, reason: collision with root package name */ u f2313g; public v() { ArrayList arrayList = new ArrayList(); this.f2307a = arrayList; this.f2308b = null; this.f2309c = new ArrayList(); this.f2310d = Collections.unmodifiableList(arrayList); this.f2311e = 2; this.f2312f = 2; } private boolean H(d0 d0Var, int i10, int i11, long j10) { d0Var.f2257r = RecyclerView.this; int l10 = d0Var.l(); long nanoTime = RecyclerView.this.getNanoTime(); if (j10 != RecyclerView.FOREVER_NS && !this.f2313g.k(l10, nanoTime, j10)) { return false; } RecyclerView.this.mAdapter.a(d0Var, i10); this.f2313g.d(d0Var.l(), RecyclerView.this.getNanoTime() - nanoTime); b(d0Var); if (!RecyclerView.this.mState.e()) { return true; } d0Var.f2246g = i11; return true; } private void b(d0 d0Var) { if (RecyclerView.this.isAccessibilityEnabled()) { View view = d0Var.f2240a; if (n0.z(view) == 0) { n0.w0(view, 1); } androidx.recyclerview.widget.l lVar = RecyclerView.this.mAccessibilityDelegate; if (lVar == null) { return; } androidx.core.view.a n10 = lVar.n(); if (n10 instanceof l.a) { ((l.a) n10).o(view); } n0.n0(view, n10); } } private void q(ViewGroup viewGroup, boolean z10) { for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) { View childAt = viewGroup.getChildAt(childCount); if (childAt instanceof ViewGroup) { q((ViewGroup) childAt, true); } } if (z10) { if (viewGroup.getVisibility() == 4) { viewGroup.setVisibility(0); viewGroup.setVisibility(4); } else { int visibility = viewGroup.getVisibility(); viewGroup.setVisibility(4); viewGroup.setVisibility(visibility); } } } private void r(d0 d0Var) { View view = d0Var.f2240a; if (view instanceof ViewGroup) { q((ViewGroup) view, false); } } void A(int i10) { a((d0) this.f2309c.get(i10), true); this.f2309c.remove(i10); } public void B(View view) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (childViewHolderInt.x()) { RecyclerView.this.removeDetachedView(view, false); } if (childViewHolderInt.w()) { childViewHolderInt.K(); } else if (childViewHolderInt.L()) { childViewHolderInt.e(); } C(childViewHolderInt); if (RecyclerView.this.mItemAnimator == null || childViewHolderInt.u()) { return; } RecyclerView.this.mItemAnimator.j(childViewHolderInt); } void C(d0 d0Var) { boolean z10; boolean z11 = true; if (d0Var.w() || d0Var.f2240a.getParent() != null) { StringBuilder sb = new StringBuilder(); sb.append("Scrapped or attached views may not be recycled. isScrap:"); sb.append(d0Var.w()); sb.append(" isAttached:"); sb.append(d0Var.f2240a.getParent() != null); sb.append(RecyclerView.this.exceptionLabel()); throw new IllegalArgumentException(sb.toString()); } if (d0Var.x()) { throw new IllegalArgumentException("Tmp detached view should be removed from RecyclerView before it can be recycled: " + d0Var + RecyclerView.this.exceptionLabel()); } if (d0Var.J()) { throw new IllegalArgumentException("Trying to recycle an ignored view holder. You should first call stopIgnoringView(view) before calling recycle." + RecyclerView.this.exceptionLabel()); } boolean h10 = d0Var.h(); g gVar = RecyclerView.this.mAdapter; if ((gVar != null && h10 && gVar.m(d0Var)) || d0Var.u()) { if (this.f2312f <= 0 || d0Var.p(526)) { z10 = false; } else { int size = this.f2309c.size(); if (size >= this.f2312f && size > 0) { A(0); size--; } if (RecyclerView.ALLOW_THREAD_GAP_WORK && size > 0 && !RecyclerView.this.mPrefetchRegistry.d(d0Var.f2242c)) { int i10 = size - 1; while (i10 >= 0) { if (!RecyclerView.this.mPrefetchRegistry.d(((d0) this.f2309c.get(i10)).f2242c)) { break; } else { i10--; } } size = i10 + 1; } this.f2309c.add(size, d0Var); z10 = true; } if (!z10) { a(d0Var, true); r1 = z10; RecyclerView.this.mViewInfoStore.q(d0Var); if (r1 && !z11 && h10) { d0Var.f2257r = null; return; } return; } r1 = z10; } z11 = false; RecyclerView.this.mViewInfoStore.q(d0Var); if (r1) { } } void D(View view) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); if (!childViewHolderInt.p(12) && childViewHolderInt.y() && !RecyclerView.this.canReuseUpdatedViewHolder(childViewHolderInt)) { if (this.f2308b == null) { this.f2308b = new ArrayList(); } childViewHolderInt.H(this, true); this.f2308b.add(childViewHolderInt); return; } if (!childViewHolderInt.t() || childViewHolderInt.v() || RecyclerView.this.mAdapter.g()) { childViewHolderInt.H(this, false); this.f2307a.add(childViewHolderInt); } else { throw new IllegalArgumentException("Called scrap view with an invalid view. Invalid views cannot be reused from scrap, they should rebound from recycler pool." + RecyclerView.this.exceptionLabel()); } } void E(u uVar) { u uVar2 = this.f2313g; if (uVar2 != null) { uVar2.c(); } this.f2313g = uVar; if (uVar == null || RecyclerView.this.getAdapter() == null) { return; } this.f2313g.a(); } void F(b0 b0Var) { } public void G(int i10) { this.f2311e = i10; K(); } /* JADX WARN: Removed duplicated region for block: B:15:0x0037 */ /* JADX WARN: Removed duplicated region for block: B:24:0x005c */ /* JADX WARN: Removed duplicated region for block: B:26:0x005f */ /* JADX WARN: Removed duplicated region for block: B:57:0x0130 */ /* JADX WARN: Removed duplicated region for block: B:63:0x014d */ /* JADX WARN: Removed duplicated region for block: B:66:0x0170 */ /* JADX WARN: Removed duplicated region for block: B:72:0x01a9 */ /* JADX WARN: Removed duplicated region for block: B:75:0x01d3 A[ADDED_TO_REGION] */ /* JADX WARN: Removed duplicated region for block: B:79:0x01b7 */ /* JADX WARN: Removed duplicated region for block: B:85:0x017f */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ androidx.recyclerview.widget.RecyclerView.d0 I(int r17, boolean r18, long r19) { /* Method dump skipped, instructions count: 530 To view this dump change 'Code comments level' option to 'DEBUG' */ throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.v.I(int, boolean, long):androidx.recyclerview.widget.RecyclerView$d0"); } void J(d0 d0Var) { if (d0Var.f2254o) { this.f2308b.remove(d0Var); } else { this.f2307a.remove(d0Var); } d0Var.f2253n = null; d0Var.f2254o = false; d0Var.e(); } void K() { o oVar = RecyclerView.this.mLayout; this.f2312f = this.f2311e + (oVar != null ? oVar.f2285m : 0); for (int size = this.f2309c.size() - 1; size >= 0 && this.f2309c.size() > this.f2312f; size--) { A(size); } } boolean L(d0 d0Var) { if (d0Var.v()) { return RecyclerView.this.mState.e(); } int i10 = d0Var.f2242c; if (i10 >= 0 && i10 < RecyclerView.this.mAdapter.c()) { if (RecyclerView.this.mState.e() || RecyclerView.this.mAdapter.e(d0Var.f2242c) == d0Var.l()) { return !RecyclerView.this.mAdapter.g() || d0Var.k() == RecyclerView.this.mAdapter.d(d0Var.f2242c); } return false; } throw new IndexOutOfBoundsException("Inconsistency detected. Invalid view holder adapter position" + d0Var + RecyclerView.this.exceptionLabel()); } void M(int i10, int i11) { int i12; int i13 = i11 + i10; for (int size = this.f2309c.size() - 1; size >= 0; size--) { d0 d0Var = (d0) this.f2309c.get(size); if (d0Var != null && (i12 = d0Var.f2242c) >= i10 && i12 < i13) { d0Var.b(2); A(size); } } } void a(d0 d0Var, boolean z10) { RecyclerView.clearNestedRecyclerViewIfNotNested(d0Var); View view = d0Var.f2240a; androidx.recyclerview.widget.l lVar = RecyclerView.this.mAccessibilityDelegate; if (lVar != null) { androidx.core.view.a n10 = lVar.n(); n0.n0(view, n10 instanceof l.a ? ((l.a) n10).n(view) : null); } if (z10) { g(d0Var); } d0Var.f2257r = null; i().i(d0Var); } public void c() { this.f2307a.clear(); z(); } void d() { int size = this.f2309c.size(); for (int i10 = 0; i10 < size; i10++) { ((d0) this.f2309c.get(i10)).c(); } int size2 = this.f2307a.size(); for (int i11 = 0; i11 < size2; i11++) { ((d0) this.f2307a.get(i11)).c(); } ArrayList arrayList = this.f2308b; if (arrayList != null) { int size3 = arrayList.size(); for (int i12 = 0; i12 < size3; i12++) { ((d0) this.f2308b.get(i12)).c(); } } } void e() { this.f2307a.clear(); ArrayList arrayList = this.f2308b; if (arrayList != null) { arrayList.clear(); } } public int f(int i10) { if (i10 >= 0 && i10 < RecyclerView.this.mState.b()) { return !RecyclerView.this.mState.e() ? i10 : RecyclerView.this.mAdapterHelper.m(i10); } throw new IndexOutOfBoundsException("invalid position " + i10 + ". State item count is " + RecyclerView.this.mState.b() + RecyclerView.this.exceptionLabel()); } void g(d0 d0Var) { RecyclerView.this.getClass(); g gVar = RecyclerView.this.mAdapter; if (gVar != null) { gVar.p(d0Var); } RecyclerView recyclerView = RecyclerView.this; if (recyclerView.mState != null) { recyclerView.mViewInfoStore.q(d0Var); } } d0 h(int i10) { int size; int m10; ArrayList arrayList = this.f2308b; if (arrayList != null && (size = arrayList.size()) != 0) { for (int i11 = 0; i11 < size; i11++) { d0 d0Var = (d0) this.f2308b.get(i11); if (!d0Var.L() && d0Var.m() == i10) { d0Var.b(32); return d0Var; } } if (RecyclerView.this.mAdapter.g() && (m10 = RecyclerView.this.mAdapterHelper.m(i10)) > 0 && m10 < RecyclerView.this.mAdapter.c()) { long d10 = RecyclerView.this.mAdapter.d(m10); for (int i12 = 0; i12 < size; i12++) { d0 d0Var2 = (d0) this.f2308b.get(i12); if (!d0Var2.L() && d0Var2.k() == d10) { d0Var2.b(32); return d0Var2; } } } } return null; } u i() { if (this.f2313g == null) { this.f2313g = new u(); } return this.f2313g; } int j() { return this.f2307a.size(); } public List k() { return this.f2310d; } d0 l(long j10, int i10, boolean z10) { for (int size = this.f2307a.size() - 1; size >= 0; size--) { d0 d0Var = (d0) this.f2307a.get(size); if (d0Var.k() == j10 && !d0Var.L()) { if (i10 == d0Var.l()) { d0Var.b(32); if (d0Var.v() && !RecyclerView.this.mState.e()) { d0Var.F(2, 14); } return d0Var; } if (!z10) { this.f2307a.remove(size); RecyclerView.this.removeDetachedView(d0Var.f2240a, false); y(d0Var.f2240a); } } } int size2 = this.f2309c.size(); while (true) { size2--; if (size2 < 0) { return null; } d0 d0Var2 = (d0) this.f2309c.get(size2); if (d0Var2.k() == j10 && !d0Var2.r()) { if (i10 == d0Var2.l()) { if (!z10) { this.f2309c.remove(size2); } return d0Var2; } if (!z10) { A(size2); return null; } } } } d0 m(int i10, boolean z10) { View e10; int size = this.f2307a.size(); for (int i11 = 0; i11 < size; i11++) { d0 d0Var = (d0) this.f2307a.get(i11); if (!d0Var.L() && d0Var.m() == i10 && !d0Var.t() && (RecyclerView.this.mState.f2220h || !d0Var.v())) { d0Var.b(32); return d0Var; } } if (z10 || (e10 = RecyclerView.this.mChildHelper.e(i10)) == null) { int size2 = this.f2309c.size(); for (int i12 = 0; i12 < size2; i12++) { d0 d0Var2 = (d0) this.f2309c.get(i12); if (!d0Var2.t() && d0Var2.m() == i10 && !d0Var2.r()) { if (!z10) { this.f2309c.remove(i12); } return d0Var2; } } return null; } d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(e10); RecyclerView.this.mChildHelper.s(e10); int m10 = RecyclerView.this.mChildHelper.m(e10); if (m10 != -1) { RecyclerView.this.mChildHelper.d(m10); D(e10); childViewHolderInt.b(8224); return childViewHolderInt; } throw new IllegalStateException("layout index should not be -1 after unhiding a view:" + childViewHolderInt + RecyclerView.this.exceptionLabel()); } View n(int i10) { return ((d0) this.f2307a.get(i10)).f2240a; } public View o(int i10) { return p(i10, false); } View p(int i10, boolean z10) { return I(i10, z10, RecyclerView.FOREVER_NS).f2240a; } void s() { int size = this.f2309c.size(); for (int i10 = 0; i10 < size; i10++) { p pVar = (p) ((d0) this.f2309c.get(i10)).f2240a.getLayoutParams(); if (pVar != null) { pVar.f2299c = true; } } } void t() { int size = this.f2309c.size(); for (int i10 = 0; i10 < size; i10++) { d0 d0Var = (d0) this.f2309c.get(i10); if (d0Var != null) { d0Var.b(6); d0Var.a(null); } } g gVar = RecyclerView.this.mAdapter; if (gVar == null || !gVar.g()) { z(); } } void u(int i10, int i11) { int size = this.f2309c.size(); for (int i12 = 0; i12 < size; i12++) { d0 d0Var = (d0) this.f2309c.get(i12); if (d0Var != null && d0Var.f2242c >= i10) { d0Var.A(i11, true); } } } void v(int i10, int i11) { int i12; int i13; int i14; int i15; if (i10 < i11) { i12 = -1; i14 = i10; i13 = i11; } else { i12 = 1; i13 = i10; i14 = i11; } int size = this.f2309c.size(); for (int i16 = 0; i16 < size; i16++) { d0 d0Var = (d0) this.f2309c.get(i16); if (d0Var != null && (i15 = d0Var.f2242c) >= i14 && i15 <= i13) { if (i15 == i10) { d0Var.A(i11 - i10, false); } else { d0Var.A(i12, false); } } } } void w(int i10, int i11, boolean z10) { int i12 = i10 + i11; for (int size = this.f2309c.size() - 1; size >= 0; size--) { d0 d0Var = (d0) this.f2309c.get(size); if (d0Var != null) { int i13 = d0Var.f2242c; if (i13 >= i12) { d0Var.A(-i11, z10); } else if (i13 >= i10) { d0Var.b(8); A(size); } } } } void x(g gVar, g gVar2, boolean z10) { c(); i().h(gVar, gVar2, z10); } void y(View view) { d0 childViewHolderInt = RecyclerView.getChildViewHolderInt(view); childViewHolderInt.f2253n = null; childViewHolderInt.f2254o = false; childViewHolderInt.e(); C(childViewHolderInt); } void z() { for (int size = this.f2309c.size() - 1; size >= 0; size--) { A(size); } this.f2309c.clear(); if (RecyclerView.ALLOW_THREAD_GAP_WORK) { RecyclerView.this.mPrefetchRegistry.b(); } } } public interface w { } private class x extends i { x() { } } public static abstract class z { /* renamed from: b, reason: collision with root package name */ private RecyclerView f2318b; /* renamed from: c, reason: collision with root package name */ private o f2319c; /* renamed from: d, reason: collision with root package name */ private boolean f2320d; /* renamed from: e, reason: collision with root package name */ private boolean f2321e; /* renamed from: f, reason: collision with root package name */ private View f2322f; /* renamed from: h, reason: collision with root package name */ private boolean f2324h; /* renamed from: a, reason: collision with root package name */ private int f2317a = -1; /* renamed from: g, reason: collision with root package name */ private final a f2323g = new a(0, 0); public static class a { /* renamed from: a, reason: collision with root package name */ private int f2325a; /* renamed from: b, reason: collision with root package name */ private int f2326b; /* renamed from: c, reason: collision with root package name */ private int f2327c; /* renamed from: d, reason: collision with root package name */ private int f2328d; /* renamed from: e, reason: collision with root package name */ private Interpolator f2329e; /* renamed from: f, reason: collision with root package name */ private boolean f2330f; /* renamed from: g, reason: collision with root package name */ private int f2331g; public a(int i10, int i11) { this(i10, i11, RecyclerView.UNDEFINED_DURATION, null); } private void e() { if (this.f2329e != null && this.f2327c < 1) { throw new IllegalStateException("If you provide an interpolator, you must set a positive duration"); } if (this.f2327c < 1) { throw new IllegalStateException("Scroll duration must be a positive number"); } } boolean a() { return this.f2328d >= 0; } public void b(int i10) { this.f2328d = i10; } void c(RecyclerView recyclerView) { int i10 = this.f2328d; if (i10 >= 0) { this.f2328d = -1; recyclerView.jumpToPositionForSmoothScroller(i10); this.f2330f = false; } else { if (!this.f2330f) { this.f2331g = 0; return; } e(); recyclerView.mViewFlinger.f(this.f2325a, this.f2326b, this.f2327c, this.f2329e); int i11 = this.f2331g + 1; this.f2331g = i11; if (i11 > 10) { Log.e(RecyclerView.TAG, "Smooth Scroll action is being updated too frequently. Make sure you are not changing it unless necessary"); } this.f2330f = false; } } public void d(int i10, int i11, int i12, Interpolator interpolator) { this.f2325a = i10; this.f2326b = i11; this.f2327c = i12; this.f2329e = interpolator; this.f2330f = true; } public a(int i10, int i11, int i12, Interpolator interpolator) { this.f2328d = -1; this.f2330f = false; this.f2331g = 0; this.f2325a = i10; this.f2326b = i11; this.f2327c = i12; this.f2329e = interpolator; } } public interface b { PointF a(int i10); } public PointF a(int i10) { Object e10 = e(); if (e10 instanceof b) { return ((b) e10).a(i10); } Log.w(RecyclerView.TAG, "You should override computeScrollVectorForPosition when the LayoutManager does not implement " + b.class.getCanonicalName()); return null; } public View b(int i10) { return this.f2318b.mLayout.C(i10); } public int c() { return this.f2318b.mLayout.J(); } public int d(View view) { return this.f2318b.getChildLayoutPosition(view); } public o e() { return this.f2319c; } public int f() { return this.f2317a; } public boolean g() { return this.f2320d; } public boolean h() { return this.f2321e; } protected void i(PointF pointF) { float f10 = pointF.x; float f11 = pointF.y; float sqrt = (float) Math.sqrt((f10 * f10) + (f11 * f11)); pointF.x /= sqrt; pointF.y /= sqrt; } void j(int i10, int i11) { PointF a10; RecyclerView recyclerView = this.f2318b; if (this.f2317a == -1 || recyclerView == null) { r(); } if (this.f2320d && this.f2322f == null && this.f2319c != null && (a10 = a(this.f2317a)) != null) { float f10 = a10.x; if (f10 != 0.0f || a10.y != 0.0f) { recyclerView.scrollStep((int) Math.signum(f10), (int) Math.signum(a10.y), null); } } this.f2320d = false; View view = this.f2322f; if (view != null) { if (d(view) == this.f2317a) { o(this.f2322f, recyclerView.mState, this.f2323g); this.f2323g.c(recyclerView); r(); } else { Log.e(RecyclerView.TAG, "Passed over target position while smooth scrolling."); this.f2322f = null; } } if (this.f2321e) { l(i10, i11, recyclerView.mState, this.f2323g); boolean a11 = this.f2323g.a(); this.f2323g.c(recyclerView); if (a11 && this.f2321e) { this.f2320d = true; recyclerView.mViewFlinger.e(); } } } protected void k(View view) { if (d(view) == f()) { this.f2322f = view; } } protected abstract void l(int i10, int i11, a0 a0Var, a aVar); protected abstract void m(); protected abstract void n(); protected abstract void o(View view, a0 a0Var, a aVar); public void p(int i10) { this.f2317a = i10; } void q(RecyclerView recyclerView, o oVar) { recyclerView.mViewFlinger.g(); if (this.f2324h) { Log.w(RecyclerView.TAG, "An instance of " + getClass().getSimpleName() + " was started more than once. Each instance of" + getClass().getSimpleName() + " is intended to only be used once. You should create a new instance for each use."); } this.f2318b = recyclerView; this.f2319c = oVar; int i10 = this.f2317a; if (i10 == -1) { throw new IllegalArgumentException("Invalid target position"); } recyclerView.mState.f2213a = i10; this.f2321e = true; this.f2320d = true; this.f2322f = b(f()); m(); this.f2318b.mViewFlinger.e(); this.f2324h = true; } protected final void r() { if (this.f2321e) { this.f2321e = false; n(); this.f2318b.mState.f2213a = -1; this.f2322f = null; this.f2317a = -1; this.f2320d = false; this.f2319c.f1(this); this.f2319c = null; this.f2318b = null; } } } static { int i10 = Build.VERSION.SDK_INT; FORCE_INVALIDATE_DISPLAY_LIST = false; ALLOW_SIZE_IN_UNSPECIFIED_SPEC = i10 >= 23; POST_UPDATES_ON_ANIMATION = true; ALLOW_THREAD_GAP_WORK = true; FORCE_ABS_FOCUS_SEARCH_DIRECTION = false; IGNORE_DETACHED_FOCUSED_CHILD = false; Class cls = Integer.TYPE; LAYOUT_MANAGER_CONSTRUCTOR_SIGNATURE = new Class[]{Context.class, AttributeSet.class, cls, cls}; sQuinticInterpolator = new c(); } public RecyclerView(Context context) { this(context, null); } private void addAnimatingView(d0 d0Var) { View view = d0Var.f2240a; boolean z10 = view.getParent() == this; this.mRecycler.J(getChildViewHolder(view)); if (d0Var.x()) { this.mChildHelper.c(view, -1, view.getLayoutParams(), true); } else if (z10) { this.mChildHelper.k(view); } else { this.mChildHelper.b(view, true); } } private void animateChange(d0 d0Var, d0 d0Var2, l.b bVar, l.b bVar2, boolean z10, boolean z11) { d0Var.G(false); if (z10) { addAnimatingView(d0Var); } if (d0Var != d0Var2) { if (z11) { addAnimatingView(d0Var2); } d0Var.f2247h = d0Var2; addAnimatingView(d0Var); this.mRecycler.J(d0Var); d0Var2.G(false); d0Var2.f2248i = d0Var; } if (this.mItemAnimator.b(d0Var, d0Var2, bVar, bVar2)) { postAnimationRunner(); } } private void cancelScroll() { resetScroll(); setScrollState(0); } static void clearNestedRecyclerViewIfNotNested(d0 d0Var) { WeakReference weakReference = d0Var.f2241b; if (weakReference != null) { View view = (View) weakReference.get(); while (view != null) { if (view == d0Var.f2240a) { return; } Object parent = view.getParent(); view = parent instanceof View ? (View) parent : null; } d0Var.f2241b = null; } } private void createLayoutManager(Context context, String str, AttributeSet attributeSet, int i10, int i11) { Constructor constructor; Object[] objArr; if (str != null) { String trim = str.trim(); if (trim.isEmpty()) { return; } String fullClassName = getFullClassName(context, trim); try { Class asSubclass = Class.forName(fullClassName, false, isInEditMode() ? getClass().getClassLoader() : context.getClassLoader()).asSubclass(o.class); try { constructor = asSubclass.getConstructor(LAYOUT_MANAGER_CONSTRUCTOR_SIGNATURE); objArr = new Object[]{context, attributeSet, Integer.valueOf(i10), Integer.valueOf(i11)}; } catch (NoSuchMethodException e10) { try { constructor = asSubclass.getConstructor(new Class[0]); objArr = null; } catch (NoSuchMethodException e11) { e11.initCause(e10); throw new IllegalStateException(attributeSet.getPositionDescription() + ": Error creating LayoutManager " + fullClassName, e11); } } constructor.setAccessible(true); setLayoutManager((o) constructor.newInstance(objArr)); } catch (ClassCastException e12) { throw new IllegalStateException(attributeSet.getPositionDescription() + ": Class is not a LayoutManager " + fullClassName, e12); } catch (ClassNotFoundException e13) { throw new IllegalStateException(attributeSet.getPositionDescription() + ": Unable to find LayoutManager " + fullClassName, e13); } catch (IllegalAccessException e14) { throw new IllegalStateException(attributeSet.getPositionDescription() + ": Cannot access non-public constructor " + fullClassName, e14); } catch (InstantiationException e15) { throw new IllegalStateException(attributeSet.getPositionDescription() + ": Could not instantiate the LayoutManager: " + fullClassName, e15); } catch (InvocationTargetException e16) { throw new IllegalStateException(attributeSet.getPositionDescription() + ": Could not instantiate the LayoutManager: " + fullClassName, e16); } } } private boolean didChildRangeChange(int i10, int i11) { findMinMaxChildLayoutPositions(this.mMinMaxLayoutPositions); int[] iArr = this.mMinMaxLayoutPositions; return (iArr[0] == i10 && iArr[1] == i11) ? false : true; } private void dispatchContentChangedIfNecessary() { int i10 = this.mEatenAccessibilityChangeFlags; this.mEatenAccessibilityChangeFlags = 0; if (i10 == 0 || !isAccessibilityEnabled()) { return; } AccessibilityEvent obtain = AccessibilityEvent.obtain(); obtain.setEventType(2048); z.b.b(obtain, i10); sendAccessibilityEventUnchecked(obtain); } private void dispatchLayoutStep1() { this.mState.a(1); fillRemainingScrollValues(this.mState); this.mState.f2222j = false; startInterceptRequestLayout(); this.mViewInfoStore.f(); onEnterLayoutOrScroll(); processAdapterUpdatesAndSetAnimationFlags(); saveFocusInfo(); a0 a0Var = this.mState; a0Var.f2221i = a0Var.f2223k && this.mItemsChanged; this.mItemsChanged = false; this.mItemsAddedOrRemoved = false; a0Var.f2220h = a0Var.f2224l; a0Var.f2218f = this.mAdapter.c(); findMinMaxChildLayoutPositions(this.mMinMaxLayoutPositions); if (this.mState.f2223k) { int g10 = this.mChildHelper.g(); for (int i10 = 0; i10 < g10; i10++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.f(i10)); if (!childViewHolderInt.J() && (!childViewHolderInt.t() || this.mAdapter.g())) { this.mViewInfoStore.e(childViewHolderInt, this.mItemAnimator.t(this.mState, childViewHolderInt, l.e(childViewHolderInt), childViewHolderInt.o())); if (this.mState.f2221i && childViewHolderInt.y() && !childViewHolderInt.v() && !childViewHolderInt.J() && !childViewHolderInt.t()) { this.mViewInfoStore.c(getChangedHolderKey(childViewHolderInt), childViewHolderInt); } } } } if (this.mState.f2224l) { saveOldPositions(); a0 a0Var2 = this.mState; boolean z10 = a0Var2.f2219g; a0Var2.f2219g = false; this.mLayout.X0(this.mRecycler, a0Var2); this.mState.f2219g = z10; for (int i11 = 0; i11 < this.mChildHelper.g(); i11++) { d0 childViewHolderInt2 = getChildViewHolderInt(this.mChildHelper.f(i11)); if (!childViewHolderInt2.J() && !this.mViewInfoStore.i(childViewHolderInt2)) { int e10 = l.e(childViewHolderInt2); boolean p10 = childViewHolderInt2.p(8192); if (!p10) { e10 |= 4096; } l.b t10 = this.mItemAnimator.t(this.mState, childViewHolderInt2, e10, childViewHolderInt2.o()); if (p10) { recordAnimationInfoIfBouncedHiddenView(childViewHolderInt2, t10); } else { this.mViewInfoStore.a(childViewHolderInt2, t10); } } } clearOldPositions(); } else { clearOldPositions(); } onExitLayoutOrScroll(); stopInterceptRequestLayout(false); this.mState.f2217e = 2; } private void dispatchLayoutStep2() { startInterceptRequestLayout(); onEnterLayoutOrScroll(); this.mState.a(6); this.mAdapterHelper.j(); this.mState.f2218f = this.mAdapter.c(); a0 a0Var = this.mState; a0Var.f2216d = 0; a0Var.f2220h = false; this.mLayout.X0(this.mRecycler, a0Var); a0 a0Var2 = this.mState; a0Var2.f2219g = false; this.mPendingSavedState = null; a0Var2.f2223k = a0Var2.f2223k && this.mItemAnimator != null; a0Var2.f2217e = 4; onExitLayoutOrScroll(); stopInterceptRequestLayout(false); } private void dispatchLayoutStep3() { this.mState.a(4); startInterceptRequestLayout(); onEnterLayoutOrScroll(); a0 a0Var = this.mState; a0Var.f2217e = 1; if (a0Var.f2223k) { for (int g10 = this.mChildHelper.g() - 1; g10 >= 0; g10--) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.f(g10)); if (!childViewHolderInt.J()) { long changedHolderKey = getChangedHolderKey(childViewHolderInt); l.b s10 = this.mItemAnimator.s(this.mState, childViewHolderInt); d0 g11 = this.mViewInfoStore.g(changedHolderKey); if (g11 == null || g11.J()) { this.mViewInfoStore.d(childViewHolderInt, s10); } else { boolean h10 = this.mViewInfoStore.h(g11); boolean h11 = this.mViewInfoStore.h(childViewHolderInt); if (h10 && g11 == childViewHolderInt) { this.mViewInfoStore.d(childViewHolderInt, s10); } else { l.b n10 = this.mViewInfoStore.n(g11); this.mViewInfoStore.d(childViewHolderInt, s10); l.b m10 = this.mViewInfoStore.m(childViewHolderInt); if (n10 == null) { handleMissingPreInfoForChangeError(changedHolderKey, childViewHolderInt, g11); } else { animateChange(g11, childViewHolderInt, n10, m10, h10, h11); } } } } } this.mViewInfoStore.o(this.mViewInfoProcessCallback); } this.mLayout.l1(this.mRecycler); a0 a0Var2 = this.mState; a0Var2.f2215c = a0Var2.f2218f; this.mDataSetHasChangedAfterLayout = false; this.mDispatchItemsChangedEvent = false; a0Var2.f2223k = false; a0Var2.f2224l = false; this.mLayout.f2280h = false; ArrayList arrayList = this.mRecycler.f2308b; if (arrayList != null) { arrayList.clear(); } o oVar = this.mLayout; if (oVar.f2286n) { oVar.f2285m = 0; oVar.f2286n = false; this.mRecycler.K(); } this.mLayout.Y0(this.mState); onExitLayoutOrScroll(); stopInterceptRequestLayout(false); this.mViewInfoStore.f(); int[] iArr = this.mMinMaxLayoutPositions; if (didChildRangeChange(iArr[0], iArr[1])) { dispatchOnScrolled(0, 0); } recoverFocusFromState(); resetFocusInfo(); } private boolean dispatchToOnItemTouchListeners(MotionEvent motionEvent) { s sVar = this.mInterceptingOnItemTouchListener; if (sVar == null) { if (motionEvent.getAction() == 0) { return false; } return findInterceptingOnItemTouchListener(motionEvent); } sVar.a(this, motionEvent); int action = motionEvent.getAction(); if (action == 3 || action == 1) { this.mInterceptingOnItemTouchListener = null; } return true; } private boolean findInterceptingOnItemTouchListener(MotionEvent motionEvent) { int action = motionEvent.getAction(); int size = this.mOnItemTouchListeners.size(); for (int i10 = 0; i10 < size; i10++) { s sVar = this.mOnItemTouchListeners.get(i10); if (sVar.b(this, motionEvent) && action != 3) { this.mInterceptingOnItemTouchListener = sVar; return true; } } return false; } private void findMinMaxChildLayoutPositions(int[] iArr) { int g10 = this.mChildHelper.g(); if (g10 == 0) { iArr[0] = -1; iArr[1] = -1; return; } int i10 = Api.BaseClientBuilder.API_PRIORITY_OTHER; int i11 = UNDEFINED_DURATION; for (int i12 = 0; i12 < g10; i12++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.f(i12)); if (!childViewHolderInt.J()) { int m10 = childViewHolderInt.m(); if (m10 < i10) { i10 = m10; } if (m10 > i11) { i11 = m10; } } } iArr[0] = i10; iArr[1] = i11; } static RecyclerView findNestedRecyclerView(View view) { if (!(view instanceof ViewGroup)) { return null; } if (view instanceof RecyclerView) { return (RecyclerView) view; } ViewGroup viewGroup = (ViewGroup) view; int childCount = viewGroup.getChildCount(); for (int i10 = 0; i10 < childCount; i10++) { RecyclerView findNestedRecyclerView = findNestedRecyclerView(viewGroup.getChildAt(i10)); if (findNestedRecyclerView != null) { return findNestedRecyclerView; } } return null; } private View findNextViewToFocus() { d0 findViewHolderForAdapterPosition; a0 a0Var = this.mState; int i10 = a0Var.f2225m; if (i10 == -1) { i10 = 0; } int b10 = a0Var.b(); for (int i11 = i10; i11 < b10; i11++) { d0 findViewHolderForAdapterPosition2 = findViewHolderForAdapterPosition(i11); if (findViewHolderForAdapterPosition2 == null) { break; } if (findViewHolderForAdapterPosition2.f2240a.hasFocusable()) { return findViewHolderForAdapterPosition2.f2240a; } } int min = Math.min(b10, i10); do { min--; if (min < 0 || (findViewHolderForAdapterPosition = findViewHolderForAdapterPosition(min)) == null) { return null; } } while (!findViewHolderForAdapterPosition.f2240a.hasFocusable()); return findViewHolderForAdapterPosition.f2240a; } static d0 getChildViewHolderInt(View view) { if (view == null) { return null; } return ((p) view.getLayoutParams()).f2297a; } static void getDecoratedBoundsWithMarginsInt(View view, Rect rect) { p pVar = (p) view.getLayoutParams(); Rect rect2 = pVar.f2298b; rect.set((view.getLeft() - rect2.left) - ((ViewGroup.MarginLayoutParams) pVar).leftMargin, (view.getTop() - rect2.top) - ((ViewGroup.MarginLayoutParams) pVar).topMargin, view.getRight() + rect2.right + ((ViewGroup.MarginLayoutParams) pVar).rightMargin, view.getBottom() + rect2.bottom + ((ViewGroup.MarginLayoutParams) pVar).bottomMargin); } private int getDeepestFocusedViewWithId(View view) { int id = view.getId(); while (!view.isFocused() && (view instanceof ViewGroup) && view.hasFocus()) { view = ((ViewGroup) view).getFocusedChild(); if (view.getId() != -1) { id = view.getId(); } } return id; } private String getFullClassName(Context context, String str) { if (str.charAt(0) == '.') { return context.getPackageName() + str; } if (str.contains(".")) { return str; } return RecyclerView.class.getPackage().getName() + '.' + str; } private e0 getScrollingChildHelper() { if (this.mScrollingChildHelper == null) { this.mScrollingChildHelper = new e0(this); } return this.mScrollingChildHelper; } private void handleMissingPreInfoForChangeError(long j10, d0 d0Var, d0 d0Var2) { int g10 = this.mChildHelper.g(); for (int i10 = 0; i10 < g10; i10++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.f(i10)); if (childViewHolderInt != d0Var && getChangedHolderKey(childViewHolderInt) == j10) { g gVar = this.mAdapter; if (gVar == null || !gVar.g()) { throw new IllegalStateException("Two different ViewHolders have the same change ID. This might happen due to inconsistent Adapter update events or if the LayoutManager lays out the same View multiple times.\n ViewHolder 1:" + childViewHolderInt + " \n View Holder 2:" + d0Var + exceptionLabel()); } throw new IllegalStateException("Two different ViewHolders have the same stable ID. Stable IDs in your adapter MUST BE unique and SHOULD NOT change.\n ViewHolder 1:" + childViewHolderInt + " \n View Holder 2:" + d0Var + exceptionLabel()); } } Log.e(TAG, "Problem while matching changed view holders with the newones. The pre-layout information for the change holder " + d0Var2 + " cannot be found but it is necessary for " + d0Var + exceptionLabel()); } private boolean hasUpdatedView() { int g10 = this.mChildHelper.g(); for (int i10 = 0; i10 < g10; i10++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.f(i10)); if (childViewHolderInt != null && !childViewHolderInt.J() && childViewHolderInt.y()) { return true; } } return false; } @SuppressLint({"InlinedApi"}) private void initAutofill() { if (n0.A(this) == 0) { n0.x0(this, 8); } } private void initChildrenHelper() { this.mChildHelper = new androidx.recyclerview.widget.b(new e()); } private boolean isPreferredNextFocus(View view, View view2, int i10) { int i11; if (view2 == null || view2 == this || findContainingItemView(view2) == null) { return false; } if (view == null || findContainingItemView(view) == null) { return true; } this.mTempRect.set(0, 0, view.getWidth(), view.getHeight()); this.mTempRect2.set(0, 0, view2.getWidth(), view2.getHeight()); offsetDescendantRectToMyCoords(view, this.mTempRect); offsetDescendantRectToMyCoords(view2, this.mTempRect2); char c10 = 65535; int i12 = this.mLayout.Z() == 1 ? -1 : 1; Rect rect = this.mTempRect; int i13 = rect.left; Rect rect2 = this.mTempRect2; int i14 = rect2.left; if ((i13 < i14 || rect.right <= i14) && rect.right < rect2.right) { i11 = 1; } else { int i15 = rect.right; int i16 = rect2.right; i11 = ((i15 > i16 || i13 >= i16) && i13 > i14) ? -1 : 0; } int i17 = rect.top; int i18 = rect2.top; if ((i17 < i18 || rect.bottom <= i18) && rect.bottom < rect2.bottom) { c10 = 1; } else { int i19 = rect.bottom; int i20 = rect2.bottom; if ((i19 <= i20 && i17 < i20) || i17 <= i18) { c10 = 0; } } if (i10 == 1) { return c10 < 0 || (c10 == 0 && i11 * i12 <= 0); } if (i10 == 2) { return c10 > 0 || (c10 == 0 && i11 * i12 >= 0); } if (i10 == 17) { return i11 < 0; } if (i10 == 33) { return c10 < 0; } if (i10 == 66) { return i11 > 0; } if (i10 == 130) { return c10 > 0; } throw new IllegalArgumentException("Invalid direction: " + i10 + exceptionLabel()); } private void onPointerUp(MotionEvent motionEvent) { int actionIndex = motionEvent.getActionIndex(); if (motionEvent.getPointerId(actionIndex) == this.mScrollPointerId) { int i10 = actionIndex == 0 ? 1 : 0; this.mScrollPointerId = motionEvent.getPointerId(i10); int x10 = (int) (motionEvent.getX(i10) + 0.5f); this.mLastTouchX = x10; this.mInitialTouchX = x10; int y10 = (int) (motionEvent.getY(i10) + 0.5f); this.mLastTouchY = y10; this.mInitialTouchY = y10; } } private boolean predictiveItemAnimationsEnabled() { return this.mItemAnimator != null && this.mLayout.L1(); } private void processAdapterUpdatesAndSetAnimationFlags() { boolean z10; if (this.mDataSetHasChangedAfterLayout) { this.mAdapterHelper.u(); if (this.mDispatchItemsChangedEvent) { this.mLayout.S0(this); } } if (predictiveItemAnimationsEnabled()) { this.mAdapterHelper.s(); } else { this.mAdapterHelper.j(); } boolean z11 = false; boolean z12 = this.mItemsAddedOrRemoved || this.mItemsChanged; this.mState.f2223k = this.mFirstLayoutComplete && this.mItemAnimator != null && ((z10 = this.mDataSetHasChangedAfterLayout) || z12 || this.mLayout.f2280h) && (!z10 || this.mAdapter.g()); a0 a0Var = this.mState; if (a0Var.f2223k && z12 && !this.mDataSetHasChangedAfterLayout && predictiveItemAnimationsEnabled()) { z11 = true; } a0Var.f2224l = z11; } /* JADX WARN: Removed duplicated region for block: B:17:0x0056 */ /* JADX WARN: Removed duplicated region for block: B:7:0x0040 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ private void pullGlows(float r7, float r8, float r9, float r10) { /* r6 = this; r0 = 1065353216(0x3f800000, float:1.0) r1 = 1 r2 = 0 int r3 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1)) if (r3 >= 0) goto L21 r6.ensureLeftGlow() android.widget.EdgeEffect r3 = r6.mLeftGlow float r4 = -r8 int r5 = r6.getWidth() float r5 = (float) r5 float r4 = r4 / r5 int r5 = r6.getHeight() float r5 = (float) r5 float r9 = r9 / r5 float r9 = r0 - r9 androidx.core.widget.e.c(r3, r4, r9) L1f: r9 = 1 goto L3c L21: int r3 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1)) if (r3 <= 0) goto L3b r6.ensureRightGlow() android.widget.EdgeEffect r3 = r6.mRightGlow int r4 = r6.getWidth() float r4 = (float) r4 float r4 = r8 / r4 int r5 = r6.getHeight() float r5 = (float) r5 float r9 = r9 / r5 androidx.core.widget.e.c(r3, r4, r9) goto L1f L3b: r9 = 0 L3c: int r3 = (r10 > r2 ? 1 : (r10 == r2 ? 0 : -1)) if (r3 >= 0) goto L56 r6.ensureTopGlow() android.widget.EdgeEffect r9 = r6.mTopGlow float r0 = -r10 int r3 = r6.getHeight() float r3 = (float) r3 float r0 = r0 / r3 int r3 = r6.getWidth() float r3 = (float) r3 float r7 = r7 / r3 androidx.core.widget.e.c(r9, r0, r7) goto L72 L56: int r3 = (r10 > r2 ? 1 : (r10 == r2 ? 0 : -1)) if (r3 <= 0) goto L71 r6.ensureBottomGlow() android.widget.EdgeEffect r9 = r6.mBottomGlow int r3 = r6.getHeight() float r3 = (float) r3 float r3 = r10 / r3 int r4 = r6.getWidth() float r4 = (float) r4 float r7 = r7 / r4 float r0 = r0 - r7 androidx.core.widget.e.c(r9, r3, r0) goto L72 L71: r1 = r9 L72: if (r1 != 0) goto L7c int r7 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1)) if (r7 != 0) goto L7c int r7 = (r10 > r2 ? 1 : (r10 == r2 ? 0 : -1)) if (r7 == 0) goto L7f L7c: androidx.core.view.n0.e0(r6) L7f: return */ throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.pullGlows(float, float, float, float):void"); } private void recoverFocusFromState() { View findViewById; if (!this.mPreserveFocusAfterLayout || this.mAdapter == null || !hasFocus() || getDescendantFocusability() == 393216) { return; } if (getDescendantFocusability() == 131072 && isFocused()) { return; } if (!isFocused()) { View focusedChild = getFocusedChild(); if (!IGNORE_DETACHED_FOCUSED_CHILD || (focusedChild.getParent() != null && focusedChild.hasFocus())) { if (!this.mChildHelper.n(focusedChild)) { return; } } else if (this.mChildHelper.g() == 0) { requestFocus(); return; } } View view = null; d0 findViewHolderForItemId = (this.mState.f2226n == -1 || !this.mAdapter.g()) ? null : findViewHolderForItemId(this.mState.f2226n); if (findViewHolderForItemId != null && !this.mChildHelper.n(findViewHolderForItemId.f2240a) && findViewHolderForItemId.f2240a.hasFocusable()) { view = findViewHolderForItemId.f2240a; } else if (this.mChildHelper.g() > 0) { view = findNextViewToFocus(); } if (view != null) { int i10 = this.mState.f2227o; if (i10 != -1 && (findViewById = view.findViewById(i10)) != null && findViewById.isFocusable()) { view = findViewById; } view.requestFocus(); } } private void releaseGlows() { boolean z10; EdgeEffect edgeEffect = this.mLeftGlow; if (edgeEffect != null) { edgeEffect.onRelease(); z10 = this.mLeftGlow.isFinished(); } else { z10 = false; } EdgeEffect edgeEffect2 = this.mTopGlow; if (edgeEffect2 != null) { edgeEffect2.onRelease(); z10 |= this.mTopGlow.isFinished(); } EdgeEffect edgeEffect3 = this.mRightGlow; if (edgeEffect3 != null) { edgeEffect3.onRelease(); z10 |= this.mRightGlow.isFinished(); } EdgeEffect edgeEffect4 = this.mBottomGlow; if (edgeEffect4 != null) { edgeEffect4.onRelease(); z10 |= this.mBottomGlow.isFinished(); } if (z10) { n0.e0(this); } } private void requestChildOnScreen(View view, View view2) { View view3 = view2 != null ? view2 : view; this.mTempRect.set(0, 0, view3.getWidth(), view3.getHeight()); ViewGroup.LayoutParams layoutParams = view3.getLayoutParams(); if (layoutParams instanceof p) { p pVar = (p) layoutParams; if (!pVar.f2299c) { Rect rect = pVar.f2298b; Rect rect2 = this.mTempRect; rect2.left -= rect.left; rect2.right += rect.right; rect2.top -= rect.top; rect2.bottom += rect.bottom; } } if (view2 != null) { offsetDescendantRectToMyCoords(view2, this.mTempRect); offsetRectIntoDescendantCoords(view, this.mTempRect); } this.mLayout.s1(this, view, this.mTempRect, !this.mFirstLayoutComplete, view2 == null); } private void resetFocusInfo() { a0 a0Var = this.mState; a0Var.f2226n = -1L; a0Var.f2225m = -1; a0Var.f2227o = -1; } private void resetScroll() { VelocityTracker velocityTracker = this.mVelocityTracker; if (velocityTracker != null) { velocityTracker.clear(); } stopNestedScroll(0); releaseGlows(); } private void saveFocusInfo() { View focusedChild = (this.mPreserveFocusAfterLayout && hasFocus() && this.mAdapter != null) ? getFocusedChild() : null; d0 findContainingViewHolder = focusedChild != null ? findContainingViewHolder(focusedChild) : null; if (findContainingViewHolder == null) { resetFocusInfo(); return; } this.mState.f2226n = this.mAdapter.g() ? findContainingViewHolder.k() : -1L; this.mState.f2225m = this.mDataSetHasChangedAfterLayout ? -1 : findContainingViewHolder.v() ? findContainingViewHolder.f2243d : findContainingViewHolder.j(); this.mState.f2227o = getDeepestFocusedViewWithId(findContainingViewHolder.f2240a); } private void setAdapterInternal(g gVar, boolean z10, boolean z11) { g gVar2 = this.mAdapter; if (gVar2 != null) { gVar2.s(this.mObserver); this.mAdapter.l(this); } if (!z10 || z11) { removeAndRecycleViews(); } this.mAdapterHelper.u(); g gVar3 = this.mAdapter; this.mAdapter = gVar; if (gVar != null) { gVar.q(this.mObserver); gVar.h(this); } o oVar = this.mLayout; if (oVar != null) { oVar.E0(gVar3, this.mAdapter); } this.mRecycler.x(gVar3, this.mAdapter, z10); this.mState.f2219g = true; } private void stopScrollersInternal() { this.mViewFlinger.g(); o oVar = this.mLayout; if (oVar != null) { oVar.K1(); } } void absorbGlows(int i10, int i11) { if (i10 < 0) { ensureLeftGlow(); if (this.mLeftGlow.isFinished()) { this.mLeftGlow.onAbsorb(-i10); } } else if (i10 > 0) { ensureRightGlow(); if (this.mRightGlow.isFinished()) { this.mRightGlow.onAbsorb(i10); } } if (i11 < 0) { ensureTopGlow(); if (this.mTopGlow.isFinished()) { this.mTopGlow.onAbsorb(-i11); } } else if (i11 > 0) { ensureBottomGlow(); if (this.mBottomGlow.isFinished()) { this.mBottomGlow.onAbsorb(i11); } } if (i10 == 0 && i11 == 0) { return; } n0.e0(this); } @Override // android.view.ViewGroup, android.view.View public void addFocusables(ArrayList arrayList, int i10, int i11) { o oVar = this.mLayout; if (oVar == null || !oVar.F0(this, arrayList, i10, i11)) { super.addFocusables(arrayList, i10, i11); } } public void addItemDecoration(n nVar, int i10) { o oVar = this.mLayout; if (oVar != null) { oVar.g("Cannot add item decoration during a scroll or layout"); } if (this.mItemDecorations.isEmpty()) { setWillNotDraw(false); } if (i10 < 0) { this.mItemDecorations.add(nVar); } else { this.mItemDecorations.add(i10, nVar); } markItemDecorInsetsDirty(); requestLayout(); } public void addOnChildAttachStateChangeListener(q qVar) { if (this.mOnChildAttachStateListeners == null) { this.mOnChildAttachStateListeners = new ArrayList(); } this.mOnChildAttachStateListeners.add(qVar); } public void addOnItemTouchListener(s sVar) { this.mOnItemTouchListeners.add(sVar); } public void addOnScrollListener(t tVar) { if (this.mScrollListeners == null) { this.mScrollListeners = new ArrayList(); } this.mScrollListeners.add(tVar); } void animateAppearance(d0 d0Var, l.b bVar, l.b bVar2) { d0Var.G(false); if (this.mItemAnimator.a(d0Var, bVar, bVar2)) { postAnimationRunner(); } } void animateDisappearance(d0 d0Var, l.b bVar, l.b bVar2) { addAnimatingView(d0Var); d0Var.G(false); if (this.mItemAnimator.c(d0Var, bVar, bVar2)) { postAnimationRunner(); } } void assertInLayoutOrScroll(String str) { if (isComputingLayout()) { return; } if (str == null) { throw new IllegalStateException("Cannot call this method unless RecyclerView is computing a layout or scrolling" + exceptionLabel()); } throw new IllegalStateException(str + exceptionLabel()); } void assertNotInLayoutOrScroll(String str) { if (isComputingLayout()) { if (str != null) { throw new IllegalStateException(str); } throw new IllegalStateException("Cannot call this method while RecyclerView is computing a layout or scrolling" + exceptionLabel()); } if (this.mDispatchScrollCounter > 0) { Log.w(TAG, "Cannot call this method in a scroll callback. Scroll callbacks mightbe run during a measure & layout pass where you cannot change theRecyclerView data. Any method call that might change the structureof the RecyclerView or the adapter contents should be postponed tothe next frame.", new IllegalStateException(RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED + exceptionLabel())); } } boolean canReuseUpdatedViewHolder(d0 d0Var) { l lVar = this.mItemAnimator; return lVar == null || lVar.g(d0Var, d0Var.o()); } @Override // android.view.ViewGroup protected boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) { return (layoutParams instanceof p) && this.mLayout.m((p) layoutParams); } void clearOldPositions() { int j10 = this.mChildHelper.j(); for (int i10 = 0; i10 < j10; i10++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.i(i10)); if (!childViewHolderInt.J()) { childViewHolderInt.c(); } } this.mRecycler.d(); } public void clearOnChildAttachStateChangeListeners() { List list = this.mOnChildAttachStateListeners; if (list != null) { list.clear(); } } public void clearOnScrollListeners() { List list = this.mScrollListeners; if (list != null) { list.clear(); } } @Override // android.view.View public int computeHorizontalScrollExtent() { o oVar = this.mLayout; if (oVar != null && oVar.k()) { return this.mLayout.q(this.mState); } return 0; } @Override // android.view.View public int computeHorizontalScrollOffset() { o oVar = this.mLayout; if (oVar != null && oVar.k()) { return this.mLayout.r(this.mState); } return 0; } @Override // android.view.View public int computeHorizontalScrollRange() { o oVar = this.mLayout; if (oVar != null && oVar.k()) { return this.mLayout.s(this.mState); } return 0; } @Override // android.view.View public int computeVerticalScrollExtent() { o oVar = this.mLayout; if (oVar != null && oVar.l()) { return this.mLayout.t(this.mState); } return 0; } @Override // android.view.View public int computeVerticalScrollOffset() { o oVar = this.mLayout; if (oVar != null && oVar.l()) { return this.mLayout.u(this.mState); } return 0; } @Override // android.view.View public int computeVerticalScrollRange() { o oVar = this.mLayout; if (oVar != null && oVar.l()) { return this.mLayout.v(this.mState); } return 0; } void considerReleasingGlowsOnScroll(int i10, int i11) { boolean z10; EdgeEffect edgeEffect = this.mLeftGlow; if (edgeEffect == null || edgeEffect.isFinished() || i10 <= 0) { z10 = false; } else { this.mLeftGlow.onRelease(); z10 = this.mLeftGlow.isFinished(); } EdgeEffect edgeEffect2 = this.mRightGlow; if (edgeEffect2 != null && !edgeEffect2.isFinished() && i10 < 0) { this.mRightGlow.onRelease(); z10 |= this.mRightGlow.isFinished(); } EdgeEffect edgeEffect3 = this.mTopGlow; if (edgeEffect3 != null && !edgeEffect3.isFinished() && i11 > 0) { this.mTopGlow.onRelease(); z10 |= this.mTopGlow.isFinished(); } EdgeEffect edgeEffect4 = this.mBottomGlow; if (edgeEffect4 != null && !edgeEffect4.isFinished() && i11 < 0) { this.mBottomGlow.onRelease(); z10 |= this.mBottomGlow.isFinished(); } if (z10) { n0.e0(this); } } void consumePendingUpdateOperations() { if (!this.mFirstLayoutComplete || this.mDataSetHasChangedAfterLayout) { v.p.a(TRACE_ON_DATA_SET_CHANGE_LAYOUT_TAG); dispatchLayout(); v.p.b(); return; } if (this.mAdapterHelper.p()) { if (!this.mAdapterHelper.o(4) || this.mAdapterHelper.o(11)) { if (this.mAdapterHelper.p()) { v.p.a(TRACE_ON_DATA_SET_CHANGE_LAYOUT_TAG); dispatchLayout(); v.p.b(); return; } return; } v.p.a(TRACE_HANDLE_ADAPTER_UPDATES_TAG); startInterceptRequestLayout(); onEnterLayoutOrScroll(); this.mAdapterHelper.s(); if (!this.mLayoutWasDefered) { if (hasUpdatedView()) { dispatchLayout(); } else { this.mAdapterHelper.i(); } } stopInterceptRequestLayout(true); onExitLayoutOrScroll(); v.p.b(); } } void defaultOnMeasure(int i10, int i11) { setMeasuredDimension(o.n(i10, getPaddingLeft() + getPaddingRight(), n0.D(this)), o.n(i11, getPaddingTop() + getPaddingBottom(), n0.C(this))); } void dispatchChildAttached(View view) { int size; d0 childViewHolderInt = getChildViewHolderInt(view); onChildAttachedToWindow(view); g gVar = this.mAdapter; if (gVar != null && childViewHolderInt != null) { gVar.n(childViewHolderInt); } if (this.mOnChildAttachStateListeners == null || r2.size() - 1 < 0) { return; } androidx.appcompat.app.m.a(this.mOnChildAttachStateListeners.get(size)); throw null; } void dispatchChildDetached(View view) { int size; d0 childViewHolderInt = getChildViewHolderInt(view); onChildDetachedFromWindow(view); g gVar = this.mAdapter; if (gVar != null && childViewHolderInt != null) { gVar.o(childViewHolderInt); } if (this.mOnChildAttachStateListeners == null || r2.size() - 1 < 0) { return; } androidx.appcompat.app.m.a(this.mOnChildAttachStateListeners.get(size)); throw null; } void dispatchLayout() { if (this.mAdapter == null) { Log.e(TAG, "No adapter attached; skipping layout"); return; } if (this.mLayout == null) { Log.e(TAG, "No layout manager attached; skipping layout"); return; } a0 a0Var = this.mState; a0Var.f2222j = false; if (a0Var.f2217e == 1) { dispatchLayoutStep1(); this.mLayout.z1(this); dispatchLayoutStep2(); } else if (!this.mAdapterHelper.q() && this.mLayout.o0() == getWidth() && this.mLayout.W() == getHeight()) { this.mLayout.z1(this); } else { this.mLayout.z1(this); dispatchLayoutStep2(); } dispatchLayoutStep3(); } @Override // android.view.View public boolean dispatchNestedFling(float f10, float f11, boolean z10) { return getScrollingChildHelper().a(f10, f11, z10); } @Override // android.view.View public boolean dispatchNestedPreFling(float f10, float f11) { return getScrollingChildHelper().b(f10, f11); } @Override // android.view.View public boolean dispatchNestedPreScroll(int i10, int i11, int[] iArr, int[] iArr2) { return getScrollingChildHelper().c(i10, i11, iArr, iArr2); } @Override // android.view.View public boolean dispatchNestedScroll(int i10, int i11, int i12, int i13, int[] iArr) { return getScrollingChildHelper().f(i10, i11, i12, i13, iArr); } void dispatchOnScrollStateChanged(int i10) { o oVar = this.mLayout; if (oVar != null) { oVar.e1(i10); } onScrollStateChanged(i10); t tVar = this.mScrollListener; if (tVar != null) { tVar.a(this, i10); } List list = this.mScrollListeners; if (list != null) { for (int size = list.size() - 1; size >= 0; size--) { this.mScrollListeners.get(size).a(this, i10); } } } void dispatchOnScrolled(int i10, int i11) { this.mDispatchScrollCounter++; int scrollX = getScrollX(); int scrollY = getScrollY(); onScrollChanged(scrollX, scrollY, scrollX - i10, scrollY - i11); onScrolled(i10, i11); t tVar = this.mScrollListener; if (tVar != null) { tVar.b(this, i10, i11); } List list = this.mScrollListeners; if (list != null) { for (int size = list.size() - 1; size >= 0; size--) { this.mScrollListeners.get(size).b(this, i10, i11); } } this.mDispatchScrollCounter--; } void dispatchPendingImportantForAccessibilityChanges() { int i10; for (int size = this.mPendingAccessibilityImportanceChange.size() - 1; size >= 0; size--) { d0 d0Var = this.mPendingAccessibilityImportanceChange.get(size); if (d0Var.f2240a.getParent() == this && !d0Var.J() && (i10 = d0Var.f2256q) != -1) { n0.w0(d0Var.f2240a, i10); d0Var.f2256q = -1; } } this.mPendingAccessibilityImportanceChange.clear(); } @Override // android.view.View public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent accessibilityEvent) { onPopulateAccessibilityEvent(accessibilityEvent); return true; } @Override // android.view.ViewGroup, android.view.View protected void dispatchRestoreInstanceState(SparseArray sparseArray) { dispatchThawSelfOnly(sparseArray); } @Override // android.view.ViewGroup, android.view.View protected void dispatchSaveInstanceState(SparseArray sparseArray) { dispatchFreezeSelfOnly(sparseArray); } @Override // android.view.View public void draw(Canvas canvas) { boolean z10; super.draw(canvas); int size = this.mItemDecorations.size(); boolean z11 = false; for (int i10 = 0; i10 < size; i10++) { this.mItemDecorations.get(i10).i(canvas, this, this.mState); } EdgeEffect edgeEffect = this.mLeftGlow; if (edgeEffect == null || edgeEffect.isFinished()) { z10 = false; } else { int save = canvas.save(); int paddingBottom = this.mClipToPadding ? getPaddingBottom() : 0; canvas.rotate(270.0f); canvas.translate((-getHeight()) + paddingBottom, 0.0f); EdgeEffect edgeEffect2 = this.mLeftGlow; z10 = edgeEffect2 != null && edgeEffect2.draw(canvas); canvas.restoreToCount(save); } EdgeEffect edgeEffect3 = this.mTopGlow; if (edgeEffect3 != null && !edgeEffect3.isFinished()) { int save2 = canvas.save(); if (this.mClipToPadding) { canvas.translate(getPaddingLeft(), getPaddingTop()); } EdgeEffect edgeEffect4 = this.mTopGlow; z10 |= edgeEffect4 != null && edgeEffect4.draw(canvas); canvas.restoreToCount(save2); } EdgeEffect edgeEffect5 = this.mRightGlow; if (edgeEffect5 != null && !edgeEffect5.isFinished()) { int save3 = canvas.save(); int width = getWidth(); int paddingTop = this.mClipToPadding ? getPaddingTop() : 0; canvas.rotate(90.0f); canvas.translate(-paddingTop, -width); EdgeEffect edgeEffect6 = this.mRightGlow; z10 |= edgeEffect6 != null && edgeEffect6.draw(canvas); canvas.restoreToCount(save3); } EdgeEffect edgeEffect7 = this.mBottomGlow; if (edgeEffect7 != null && !edgeEffect7.isFinished()) { int save4 = canvas.save(); canvas.rotate(180.0f); if (this.mClipToPadding) { canvas.translate((-getWidth()) + getPaddingRight(), (-getHeight()) + getPaddingBottom()); } else { canvas.translate(-getWidth(), -getHeight()); } EdgeEffect edgeEffect8 = this.mBottomGlow; if (edgeEffect8 != null && edgeEffect8.draw(canvas)) { z11 = true; } z10 |= z11; canvas.restoreToCount(save4); } if ((z10 || this.mItemAnimator == null || this.mItemDecorations.size() <= 0 || !this.mItemAnimator.p()) ? z10 : true) { n0.e0(this); } } @Override // android.view.ViewGroup public boolean drawChild(Canvas canvas, View view, long j10) { return super.drawChild(canvas, view, j10); } void ensureBottomGlow() { if (this.mBottomGlow != null) { return; } EdgeEffect a10 = this.mEdgeEffectFactory.a(this, 3); this.mBottomGlow = a10; if (this.mClipToPadding) { a10.setSize((getMeasuredWidth() - getPaddingLeft()) - getPaddingRight(), (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom()); } else { a10.setSize(getMeasuredWidth(), getMeasuredHeight()); } } void ensureLeftGlow() { if (this.mLeftGlow != null) { return; } EdgeEffect a10 = this.mEdgeEffectFactory.a(this, 0); this.mLeftGlow = a10; if (this.mClipToPadding) { a10.setSize((getMeasuredHeight() - getPaddingTop()) - getPaddingBottom(), (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight()); } else { a10.setSize(getMeasuredHeight(), getMeasuredWidth()); } } void ensureRightGlow() { if (this.mRightGlow != null) { return; } EdgeEffect a10 = this.mEdgeEffectFactory.a(this, 2); this.mRightGlow = a10; if (this.mClipToPadding) { a10.setSize((getMeasuredHeight() - getPaddingTop()) - getPaddingBottom(), (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight()); } else { a10.setSize(getMeasuredHeight(), getMeasuredWidth()); } } void ensureTopGlow() { if (this.mTopGlow != null) { return; } EdgeEffect a10 = this.mEdgeEffectFactory.a(this, 1); this.mTopGlow = a10; if (this.mClipToPadding) { a10.setSize((getMeasuredWidth() - getPaddingLeft()) - getPaddingRight(), (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom()); } else { a10.setSize(getMeasuredWidth(), getMeasuredHeight()); } } String exceptionLabel() { return " " + super.toString() + ", adapter:" + this.mAdapter + ", layout:" + this.mLayout + ", context:" + getContext(); } final void fillRemainingScrollValues(a0 a0Var) { if (getScrollState() != 2) { a0Var.f2228p = 0; a0Var.f2229q = 0; } else { OverScroller overScroller = this.mViewFlinger.f2233c; a0Var.f2228p = overScroller.getFinalX() - overScroller.getCurrX(); a0Var.f2229q = overScroller.getFinalY() - overScroller.getCurrY(); } } public View findChildViewUnder(float f10, float f11) { for (int g10 = this.mChildHelper.g() - 1; g10 >= 0; g10--) { View f12 = this.mChildHelper.f(g10); float translationX = f12.getTranslationX(); float translationY = f12.getTranslationY(); if (f10 >= f12.getLeft() + translationX && f10 <= f12.getRight() + translationX && f11 >= f12.getTop() + translationY && f11 <= f12.getBottom() + translationY) { return f12; } } return null; } /* JADX WARN: Code restructure failed: missing block: B:11:?, code lost: return r3; */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public android.view.View findContainingItemView(android.view.View r3) { /* r2 = this; android.view.ViewParent r0 = r3.getParent() L4: if (r0 == 0) goto L14 if (r0 == r2) goto L14 boolean r1 = r0 instanceof android.view.View if (r1 == 0) goto L14 r3 = r0 android.view.View r3 = (android.view.View) r3 android.view.ViewParent r0 = r3.getParent() goto L4 L14: if (r0 != r2) goto L17 goto L18 L17: r3 = 0 L18: return r3 */ throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.findContainingItemView(android.view.View):android.view.View"); } public d0 findContainingViewHolder(View view) { View findContainingItemView = findContainingItemView(view); if (findContainingItemView == null) { return null; } return getChildViewHolder(findContainingItemView); } public d0 findViewHolderForAdapterPosition(int i10) { d0 d0Var = null; if (this.mDataSetHasChangedAfterLayout) { return null; } int j10 = this.mChildHelper.j(); for (int i11 = 0; i11 < j10; i11++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.i(i11)); if (childViewHolderInt != null && !childViewHolderInt.v() && getAdapterPositionFor(childViewHolderInt) == i10) { if (!this.mChildHelper.n(childViewHolderInt.f2240a)) { return childViewHolderInt; } d0Var = childViewHolderInt; } } return d0Var; } public d0 findViewHolderForItemId(long j10) { g gVar = this.mAdapter; d0 d0Var = null; if (gVar != null && gVar.g()) { int j11 = this.mChildHelper.j(); for (int i10 = 0; i10 < j11; i10++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.i(i10)); if (childViewHolderInt != null && !childViewHolderInt.v() && childViewHolderInt.k() == j10) { if (!this.mChildHelper.n(childViewHolderInt.f2240a)) { return childViewHolderInt; } d0Var = childViewHolderInt; } } } return d0Var; } public d0 findViewHolderForLayoutPosition(int i10) { return findViewHolderForPosition(i10, false); } @Deprecated public d0 findViewHolderForPosition(int i10) { return findViewHolderForPosition(i10, false); } /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Type inference failed for: r0v1, types: [boolean] */ /* JADX WARN: Type inference failed for: r0v6 */ public boolean fling(int i10, int i11) { o oVar = this.mLayout; if (oVar == null) { Log.e(TAG, "Cannot fling without a LayoutManager set. Call setLayoutManager with a non-null argument."); return false; } if (this.mLayoutSuppressed) { return false; } int k10 = oVar.k(); boolean l10 = this.mLayout.l(); if (k10 == 0 || Math.abs(i10) < this.mMinFlingVelocity) { i10 = 0; } if (!l10 || Math.abs(i11) < this.mMinFlingVelocity) { i11 = 0; } if (i10 == 0 && i11 == 0) { return false; } float f10 = i10; float f11 = i11; if (!dispatchNestedPreFling(f10, f11)) { boolean z10 = k10 != 0 || l10; dispatchNestedFling(f10, f11, z10); r rVar = this.mOnFlingListener; if (rVar != null && rVar.a(i10, i11)) { return true; } if (z10) { if (l10) { k10 = (k10 == true ? 1 : 0) | 2; } startNestedScroll(k10, 1); int i12 = this.mMaxFlingVelocity; int max = Math.max(-i12, Math.min(i10, i12)); int i13 = this.mMaxFlingVelocity; this.mViewFlinger.c(max, Math.max(-i13, Math.min(i11, i13))); return true; } } return false; } @Override // android.view.ViewGroup, android.view.ViewParent public View focusSearch(View view, int i10) { View view2; boolean z10; View Q0 = this.mLayout.Q0(view, i10); if (Q0 != null) { return Q0; } boolean z11 = (this.mAdapter == null || this.mLayout == null || isComputingLayout() || this.mLayoutSuppressed) ? false : true; FocusFinder focusFinder = FocusFinder.getInstance(); if (z11 && (i10 == 2 || i10 == 1)) { if (this.mLayout.l()) { int i11 = i10 == 2 ? 130 : 33; z10 = focusFinder.findNextFocus(this, view, i11) == null; if (FORCE_ABS_FOCUS_SEARCH_DIRECTION) { i10 = i11; } } else { z10 = false; } if (!z10 && this.mLayout.k()) { int i12 = (this.mLayout.Z() == 1) ^ (i10 == 2) ? 66 : 17; boolean z12 = focusFinder.findNextFocus(this, view, i12) == null; if (FORCE_ABS_FOCUS_SEARCH_DIRECTION) { i10 = i12; } z10 = z12; } if (z10) { consumePendingUpdateOperations(); if (findContainingItemView(view) == null) { return null; } startInterceptRequestLayout(); this.mLayout.J0(view, i10, this.mRecycler, this.mState); stopInterceptRequestLayout(false); } view2 = focusFinder.findNextFocus(this, view, i10); } else { View findNextFocus = focusFinder.findNextFocus(this, view, i10); if (findNextFocus == null && z11) { consumePendingUpdateOperations(); if (findContainingItemView(view) == null) { return null; } startInterceptRequestLayout(); view2 = this.mLayout.J0(view, i10, this.mRecycler, this.mState); stopInterceptRequestLayout(false); } else { view2 = findNextFocus; } } if (view2 == null || view2.hasFocusable()) { return isPreferredNextFocus(view, view2, i10) ? view2 : super.focusSearch(view, i10); } if (getFocusedChild() == null) { return super.focusSearch(view, i10); } requestChildOnScreen(view2, null); return view; } @Override // android.view.ViewGroup protected ViewGroup.LayoutParams generateDefaultLayoutParams() { o oVar = this.mLayout; if (oVar != null) { return oVar.D(); } throw new IllegalStateException("RecyclerView has no LayoutManager" + exceptionLabel()); } @Override // android.view.ViewGroup public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attributeSet) { o oVar = this.mLayout; if (oVar != null) { return oVar.E(getContext(), attributeSet); } throw new IllegalStateException("RecyclerView has no LayoutManager" + exceptionLabel()); } @Override // android.view.ViewGroup, android.view.View public CharSequence getAccessibilityClassName() { return "androidx.recyclerview.widget.RecyclerView"; } public g getAdapter() { return this.mAdapter; } int getAdapterPositionFor(d0 d0Var) { if (d0Var.p(524) || !d0Var.s()) { return -1; } return this.mAdapterHelper.e(d0Var.f2242c); } @Override // android.view.View public int getBaseline() { o oVar = this.mLayout; return oVar != null ? oVar.G() : super.getBaseline(); } long getChangedHolderKey(d0 d0Var) { return this.mAdapter.g() ? d0Var.k() : d0Var.f2242c; } public int getChildAdapterPosition(View view) { d0 childViewHolderInt = getChildViewHolderInt(view); if (childViewHolderInt != null) { return childViewHolderInt.j(); } return -1; } @Override // android.view.ViewGroup protected int getChildDrawingOrder(int i10, int i11) { return super.getChildDrawingOrder(i10, i11); } public long getChildItemId(View view) { d0 childViewHolderInt; g gVar = this.mAdapter; if (gVar == null || !gVar.g() || (childViewHolderInt = getChildViewHolderInt(view)) == null) { return -1L; } return childViewHolderInt.k(); } public int getChildLayoutPosition(View view) { d0 childViewHolderInt = getChildViewHolderInt(view); if (childViewHolderInt != null) { return childViewHolderInt.m(); } return -1; } @Deprecated public int getChildPosition(View view) { return getChildAdapterPosition(view); } public d0 getChildViewHolder(View view) { ViewParent parent = view.getParent(); if (parent == null || parent == this) { return getChildViewHolderInt(view); } throw new IllegalArgumentException("View " + view + " is not a direct child of " + this); } @Override // android.view.ViewGroup public boolean getClipToPadding() { return this.mClipToPadding; } public androidx.recyclerview.widget.l getCompatAccessibilityDelegate() { return this.mAccessibilityDelegate; } public void getDecoratedBoundsWithMargins(View view, Rect rect) { getDecoratedBoundsWithMarginsInt(view, rect); } public k getEdgeEffectFactory() { return this.mEdgeEffectFactory; } public l getItemAnimator() { return this.mItemAnimator; } Rect getItemDecorInsetsForChild(View view) { p pVar = (p) view.getLayoutParams(); if (!pVar.f2299c) { return pVar.f2298b; } if (this.mState.e() && (pVar.b() || pVar.d())) { return pVar.f2298b; } Rect rect = pVar.f2298b; rect.set(0, 0, 0, 0); int size = this.mItemDecorations.size(); for (int i10 = 0; i10 < size; i10++) { this.mTempRect.set(0, 0, 0, 0); this.mItemDecorations.get(i10).e(this.mTempRect, view, this, this.mState); int i11 = rect.left; Rect rect2 = this.mTempRect; rect.left = i11 + rect2.left; rect.top += rect2.top; rect.right += rect2.right; rect.bottom += rect2.bottom; } pVar.f2299c = false; return rect; } public n getItemDecorationAt(int i10) { int itemDecorationCount = getItemDecorationCount(); if (i10 >= 0 && i10 < itemDecorationCount) { return this.mItemDecorations.get(i10); } throw new IndexOutOfBoundsException(i10 + " is an invalid index for size " + itemDecorationCount); } public int getItemDecorationCount() { return this.mItemDecorations.size(); } public o getLayoutManager() { return this.mLayout; } public int getMaxFlingVelocity() { return this.mMaxFlingVelocity; } public int getMinFlingVelocity() { return this.mMinFlingVelocity; } long getNanoTime() { if (ALLOW_THREAD_GAP_WORK) { return System.nanoTime(); } return 0L; } public r getOnFlingListener() { return this.mOnFlingListener; } public boolean getPreserveFocusAfterLayout() { return this.mPreserveFocusAfterLayout; } public u getRecycledViewPool() { return this.mRecycler.i(); } public int getScrollState() { return this.mScrollState; } public boolean hasFixedSize() { return this.mHasFixedSize; } @Override // android.view.View public boolean hasNestedScrollingParent() { return getScrollingChildHelper().k(); } public boolean hasPendingAdapterUpdates() { return !this.mFirstLayoutComplete || this.mDataSetHasChangedAfterLayout || this.mAdapterHelper.p(); } void initAdapterManager() { this.mAdapterHelper = new androidx.recyclerview.widget.a(new f()); } void initFastScroller(StateListDrawable stateListDrawable, Drawable drawable, StateListDrawable stateListDrawable2, Drawable drawable2) { if (stateListDrawable != null && drawable != null && stateListDrawable2 != null && drawable2 != null) { Resources resources = getContext().getResources(); new androidx.recyclerview.widget.d(this, stateListDrawable, drawable, stateListDrawable2, drawable2, resources.getDimensionPixelSize(l0.b.f11563a), resources.getDimensionPixelSize(l0.b.f11565c), resources.getDimensionPixelOffset(l0.b.f11564b)); } else { throw new IllegalArgumentException("Trying to set fast scroller without both required drawables." + exceptionLabel()); } } void invalidateGlows() { this.mBottomGlow = null; this.mTopGlow = null; this.mRightGlow = null; this.mLeftGlow = null; } public void invalidateItemDecorations() { if (this.mItemDecorations.size() == 0) { return; } o oVar = this.mLayout; if (oVar != null) { oVar.g("Cannot invalidate item decorations during a scroll or layout"); } markItemDecorInsetsDirty(); requestLayout(); } boolean isAccessibilityEnabled() { AccessibilityManager accessibilityManager = this.mAccessibilityManager; return accessibilityManager != null && accessibilityManager.isEnabled(); } public boolean isAnimating() { l lVar = this.mItemAnimator; return lVar != null && lVar.p(); } @Override // android.view.View public boolean isAttachedToWindow() { return this.mIsAttached; } public boolean isComputingLayout() { return this.mLayoutOrScrollCounter > 0; } @Deprecated public boolean isLayoutFrozen() { return isLayoutSuppressed(); } @Override // android.view.ViewGroup public final boolean isLayoutSuppressed() { return this.mLayoutSuppressed; } @Override // android.view.View public boolean isNestedScrollingEnabled() { return getScrollingChildHelper().m(); } void jumpToPositionForSmoothScroller(int i10) { if (this.mLayout == null) { return; } setScrollState(2); this.mLayout.x1(i10); awakenScrollBars(); } void markItemDecorInsetsDirty() { int j10 = this.mChildHelper.j(); for (int i10 = 0; i10 < j10; i10++) { ((p) this.mChildHelper.i(i10).getLayoutParams()).f2299c = true; } this.mRecycler.s(); } void markKnownViewsInvalid() { int j10 = this.mChildHelper.j(); for (int i10 = 0; i10 < j10; i10++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.i(i10)); if (childViewHolderInt != null && !childViewHolderInt.J()) { childViewHolderInt.b(6); } } markItemDecorInsetsDirty(); this.mRecycler.t(); } public void offsetChildrenHorizontal(int i10) { int g10 = this.mChildHelper.g(); for (int i11 = 0; i11 < g10; i11++) { this.mChildHelper.f(i11).offsetLeftAndRight(i10); } } public void offsetChildrenVertical(int i10) { int g10 = this.mChildHelper.g(); for (int i11 = 0; i11 < g10; i11++) { this.mChildHelper.f(i11).offsetTopAndBottom(i10); } } void offsetPositionRecordsForInsert(int i10, int i11) { int j10 = this.mChildHelper.j(); for (int i12 = 0; i12 < j10; i12++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.i(i12)); if (childViewHolderInt != null && !childViewHolderInt.J() && childViewHolderInt.f2242c >= i10) { childViewHolderInt.A(i11, false); this.mState.f2219g = true; } } this.mRecycler.u(i10, i11); requestLayout(); } void offsetPositionRecordsForMove(int i10, int i11) { int i12; int i13; int i14; int i15; int j10 = this.mChildHelper.j(); if (i10 < i11) { i14 = -1; i13 = i10; i12 = i11; } else { i12 = i10; i13 = i11; i14 = 1; } for (int i16 = 0; i16 < j10; i16++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.i(i16)); if (childViewHolderInt != null && (i15 = childViewHolderInt.f2242c) >= i13 && i15 <= i12) { if (i15 == i10) { childViewHolderInt.A(i11 - i10, false); } else { childViewHolderInt.A(i14, false); } this.mState.f2219g = true; } } this.mRecycler.v(i10, i11); requestLayout(); } void offsetPositionRecordsForRemove(int i10, int i11, boolean z10) { int i12 = i10 + i11; int j10 = this.mChildHelper.j(); for (int i13 = 0; i13 < j10; i13++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.i(i13)); if (childViewHolderInt != null && !childViewHolderInt.J()) { int i14 = childViewHolderInt.f2242c; if (i14 >= i12) { childViewHolderInt.A(-i11, z10); this.mState.f2219g = true; } else if (i14 >= i10) { childViewHolderInt.i(i10 - 1, -i11, z10); this.mState.f2219g = true; } } } this.mRecycler.w(i10, i11, z10); requestLayout(); } /* JADX WARN: Code restructure failed: missing block: B:16:0x004b, code lost: if (r1 >= 30.0f) goto L22; */ @Override // android.view.ViewGroup, android.view.View /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ protected void onAttachedToWindow() { /* r5 = this; super.onAttachedToWindow() r0 = 0 r5.mLayoutOrScrollCounter = r0 r1 = 1 r5.mIsAttached = r1 boolean r2 = r5.mFirstLayoutComplete if (r2 == 0) goto L14 boolean r2 = r5.isLayoutRequested() if (r2 != 0) goto L14 goto L15 L14: r1 = 0 L15: r5.mFirstLayoutComplete = r1 androidx.recyclerview.widget.RecyclerView$o r1 = r5.mLayout if (r1 == 0) goto L1e r1.z(r5) L1e: r5.mPostedAnimatorRunner = r0 boolean r0 = androidx.recyclerview.widget.RecyclerView.ALLOW_THREAD_GAP_WORK if (r0 == 0) goto L61 java.lang.ThreadLocal r0 = androidx.recyclerview.widget.e.f2471e java.lang.Object r1 = r0.get() androidx.recyclerview.widget.e r1 = (androidx.recyclerview.widget.e) r1 r5.mGapWorker = r1 if (r1 != 0) goto L5c androidx.recyclerview.widget.e r1 = new androidx.recyclerview.widget.e r1.() r5.mGapWorker = r1 android.view.Display r1 = androidx.core.view.n0.u(r5) boolean r2 = r5.isInEditMode() if (r2 != 0) goto L4e if (r1 == 0) goto L4e float r1 = r1.getRefreshRate() r2 = 1106247680(0x41f00000, float:30.0) int r2 = (r1 > r2 ? 1 : (r1 == r2 ? 0 : -1)) if (r2 < 0) goto L4e goto L50 L4e: r1 = 1114636288(0x42700000, float:60.0) L50: androidx.recyclerview.widget.e r2 = r5.mGapWorker r3 = 1315859240(0x4e6e6b28, float:1.0E9) float r3 = r3 / r1 long r3 = (long) r3 r2.f2475c = r3 r0.set(r2) L5c: androidx.recyclerview.widget.e r0 = r5.mGapWorker r0.a(r5) L61: return */ throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.onAttachedToWindow():void"); } public void onChildAttachedToWindow(View view) { } public void onChildDetachedFromWindow(View view) { } @Override // android.view.ViewGroup, android.view.View protected void onDetachedFromWindow() { androidx.recyclerview.widget.e eVar; super.onDetachedFromWindow(); l lVar = this.mItemAnimator; if (lVar != null) { lVar.k(); } stopScroll(); this.mIsAttached = false; o oVar = this.mLayout; if (oVar != null) { oVar.A(this, this.mRecycler); } this.mPendingAccessibilityImportanceChange.clear(); removeCallbacks(this.mItemAnimatorRunner); this.mViewInfoStore.j(); if (!ALLOW_THREAD_GAP_WORK || (eVar = this.mGapWorker) == null) { return; } eVar.j(this); this.mGapWorker = null; } @Override // android.view.View public void onDraw(Canvas canvas) { super.onDraw(canvas); int size = this.mItemDecorations.size(); for (int i10 = 0; i10 < size; i10++) { this.mItemDecorations.get(i10).g(canvas, this, this.mState); } } void onEnterLayoutOrScroll() { this.mLayoutOrScrollCounter++; } void onExitLayoutOrScroll() { onExitLayoutOrScroll(true); } /* JADX WARN: Removed duplicated region for block: B:20:0x0066 */ @Override // android.view.View /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public boolean onGenericMotionEvent(android.view.MotionEvent r6) { /* r5 = this; androidx.recyclerview.widget.RecyclerView$o r0 = r5.mLayout r1 = 0 if (r0 != 0) goto L6 return r1 L6: boolean r0 = r5.mLayoutSuppressed if (r0 == 0) goto Lb return r1 Lb: int r0 = r6.getAction() r2 = 8 if (r0 != r2) goto L77 int r0 = r6.getSource() r0 = r0 & 2 r2 = 0 if (r0 == 0) goto L3c androidx.recyclerview.widget.RecyclerView$o r0 = r5.mLayout boolean r0 = r0.l() if (r0 == 0) goto L2c r0 = 9 float r0 = r6.getAxisValue(r0) float r0 = -r0 goto L2d L2c: r0 = 0 L2d: androidx.recyclerview.widget.RecyclerView$o r3 = r5.mLayout boolean r3 = r3.k() if (r3 == 0) goto L61 r3 = 10 float r3 = r6.getAxisValue(r3) goto L62 L3c: int r0 = r6.getSource() r3 = 4194304(0x400000, float:5.877472E-39) r0 = r0 & r3 if (r0 == 0) goto L60 r0 = 26 float r0 = r6.getAxisValue(r0) androidx.recyclerview.widget.RecyclerView$o r3 = r5.mLayout boolean r3 = r3.l() if (r3 == 0) goto L55 float r0 = -r0 goto L61 L55: androidx.recyclerview.widget.RecyclerView$o r3 = r5.mLayout boolean r3 = r3.k() if (r3 == 0) goto L60 r3 = r0 r0 = 0 goto L62 L60: r0 = 0 L61: r3 = 0 L62: int r4 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1)) if (r4 != 0) goto L6a int r2 = (r3 > r2 ? 1 : (r3 == r2 ? 0 : -1)) if (r2 == 0) goto L77 L6a: float r2 = r5.mScaledHorizontalScrollFactor float r3 = r3 * r2 int r2 = (int) r3 float r3 = r5.mScaledVerticalScrollFactor float r0 = r0 * r3 int r0 = (int) r0 r5.scrollByInternal(r2, r0, r6) L77: return r1 */ throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.onGenericMotionEvent(android.view.MotionEvent):boolean"); } /* JADX WARN: Multi-variable type inference failed */ @Override // android.view.ViewGroup public boolean onInterceptTouchEvent(MotionEvent motionEvent) { boolean z10; if (this.mLayoutSuppressed) { return false; } this.mInterceptingOnItemTouchListener = null; if (findInterceptingOnItemTouchListener(motionEvent)) { cancelScroll(); return true; } o oVar = this.mLayout; if (oVar == null) { return false; } boolean k10 = oVar.k(); boolean l10 = this.mLayout.l(); if (this.mVelocityTracker == null) { this.mVelocityTracker = VelocityTracker.obtain(); } this.mVelocityTracker.addMovement(motionEvent); int actionMasked = motionEvent.getActionMasked(); int actionIndex = motionEvent.getActionIndex(); if (actionMasked == 0) { if (this.mIgnoreMotionEventTillDown) { this.mIgnoreMotionEventTillDown = false; } this.mScrollPointerId = motionEvent.getPointerId(0); int x10 = (int) (motionEvent.getX() + 0.5f); this.mLastTouchX = x10; this.mInitialTouchX = x10; int y10 = (int) (motionEvent.getY() + 0.5f); this.mLastTouchY = y10; this.mInitialTouchY = y10; if (this.mScrollState == 2) { getParent().requestDisallowInterceptTouchEvent(true); setScrollState(1); stopNestedScroll(1); } int[] iArr = this.mNestedOffsets; iArr[1] = 0; iArr[0] = 0; int i10 = k10; if (l10) { i10 = (k10 ? 1 : 0) | 2; } startNestedScroll(i10, 0); } else if (actionMasked == 1) { this.mVelocityTracker.clear(); stopNestedScroll(0); } else if (actionMasked == 2) { int findPointerIndex = motionEvent.findPointerIndex(this.mScrollPointerId); if (findPointerIndex < 0) { Log.e(TAG, "Error processing scroll; pointer index for id " + this.mScrollPointerId + " not found. Did any MotionEvents get skipped?"); return false; } int x11 = (int) (motionEvent.getX(findPointerIndex) + 0.5f); int y11 = (int) (motionEvent.getY(findPointerIndex) + 0.5f); if (this.mScrollState != 1) { int i11 = x11 - this.mInitialTouchX; int i12 = y11 - this.mInitialTouchY; if (k10 == 0 || Math.abs(i11) <= this.mTouchSlop) { z10 = false; } else { this.mLastTouchX = x11; z10 = true; } if (l10 && Math.abs(i12) > this.mTouchSlop) { this.mLastTouchY = y11; z10 = true; } if (z10) { setScrollState(1); } } } else if (actionMasked == 3) { cancelScroll(); } else if (actionMasked == 5) { this.mScrollPointerId = motionEvent.getPointerId(actionIndex); int x12 = (int) (motionEvent.getX(actionIndex) + 0.5f); this.mLastTouchX = x12; this.mInitialTouchX = x12; int y12 = (int) (motionEvent.getY(actionIndex) + 0.5f); this.mLastTouchY = y12; this.mInitialTouchY = y12; } else if (actionMasked == 6) { onPointerUp(motionEvent); } return this.mScrollState == 1; } @Override // android.view.ViewGroup, android.view.View protected void onLayout(boolean z10, int i10, int i11, int i12, int i13) { v.p.a(TRACE_ON_LAYOUT_TAG); dispatchLayout(); v.p.b(); this.mFirstLayoutComplete = true; } @Override // android.view.View protected void onMeasure(int i10, int i11) { o oVar = this.mLayout; if (oVar == null) { defaultOnMeasure(i10, i11); return; } boolean z10 = false; if (oVar.s0()) { int mode = View.MeasureSpec.getMode(i10); int mode2 = View.MeasureSpec.getMode(i11); this.mLayout.Z0(this.mRecycler, this.mState, i10, i11); if (mode == 1073741824 && mode2 == 1073741824) { z10 = true; } if (z10 || this.mAdapter == null) { return; } if (this.mState.f2217e == 1) { dispatchLayoutStep1(); } this.mLayout.A1(i10, i11); this.mState.f2222j = true; dispatchLayoutStep2(); this.mLayout.D1(i10, i11); if (this.mLayout.G1()) { this.mLayout.A1(View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), 1073741824)); this.mState.f2222j = true; dispatchLayoutStep2(); this.mLayout.D1(i10, i11); return; } return; } if (this.mHasFixedSize) { this.mLayout.Z0(this.mRecycler, this.mState, i10, i11); return; } if (this.mAdapterUpdateDuringMeasure) { startInterceptRequestLayout(); onEnterLayoutOrScroll(); processAdapterUpdatesAndSetAnimationFlags(); onExitLayoutOrScroll(); a0 a0Var = this.mState; if (a0Var.f2224l) { a0Var.f2220h = true; } else { this.mAdapterHelper.j(); this.mState.f2220h = false; } this.mAdapterUpdateDuringMeasure = false; stopInterceptRequestLayout(false); } else if (this.mState.f2224l) { setMeasuredDimension(getMeasuredWidth(), getMeasuredHeight()); return; } g gVar = this.mAdapter; if (gVar != null) { this.mState.f2218f = gVar.c(); } else { this.mState.f2218f = 0; } startInterceptRequestLayout(); this.mLayout.Z0(this.mRecycler, this.mState, i10, i11); stopInterceptRequestLayout(false); this.mState.f2220h = false; } @Override // android.view.ViewGroup protected boolean onRequestFocusInDescendants(int i10, Rect rect) { if (isComputingLayout()) { return false; } return super.onRequestFocusInDescendants(i10, rect); } @Override // android.view.View protected void onRestoreInstanceState(Parcelable parcelable) { Parcelable parcelable2; if (!(parcelable instanceof y)) { super.onRestoreInstanceState(parcelable); return; } y yVar = (y) parcelable; this.mPendingSavedState = yVar; super.onRestoreInstanceState(yVar.a()); o oVar = this.mLayout; if (oVar == null || (parcelable2 = this.mPendingSavedState.f2316c) == null) { return; } oVar.c1(parcelable2); } @Override // android.view.View protected Parcelable onSaveInstanceState() { y yVar = new y(super.onSaveInstanceState()); y yVar2 = this.mPendingSavedState; if (yVar2 != null) { yVar.b(yVar2); } else { o oVar = this.mLayout; if (oVar != null) { yVar.f2316c = oVar.d1(); } else { yVar.f2316c = null; } } return yVar; } public void onScrollStateChanged(int i10) { } public void onScrolled(int i10, int i11) { } @Override // android.view.View protected void onSizeChanged(int i10, int i11, int i12, int i13) { super.onSizeChanged(i10, i11, i12, i13); if (i10 == i12 && i11 == i13) { return; } invalidateGlows(); } /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Removed duplicated region for block: B:49:0x00e2 */ /* JADX WARN: Removed duplicated region for block: B:55:0x00f8 */ @Override // android.view.View /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public boolean onTouchEvent(android.view.MotionEvent r18) { /* Method dump skipped, instructions count: 480 To view this dump change 'Code comments level' option to 'DEBUG' */ throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.onTouchEvent(android.view.MotionEvent):boolean"); } void postAnimationRunner() { if (this.mPostedAnimatorRunner || !this.mIsAttached) { return; } n0.f0(this, this.mItemAnimatorRunner); this.mPostedAnimatorRunner = true; } void processDataSetCompletelyChanged(boolean z10) { this.mDispatchItemsChangedEvent = z10 | this.mDispatchItemsChangedEvent; this.mDataSetHasChangedAfterLayout = true; markKnownViewsInvalid(); } void recordAnimationInfoIfBouncedHiddenView(d0 d0Var, l.b bVar) { d0Var.F(0, 8192); if (this.mState.f2221i && d0Var.y() && !d0Var.v() && !d0Var.J()) { this.mViewInfoStore.c(getChangedHolderKey(d0Var), d0Var); } this.mViewInfoStore.e(d0Var, bVar); } void removeAndRecycleViews() { l lVar = this.mItemAnimator; if (lVar != null) { lVar.k(); } o oVar = this.mLayout; if (oVar != null) { oVar.k1(this.mRecycler); this.mLayout.l1(this.mRecycler); } this.mRecycler.c(); } boolean removeAnimatingView(View view) { startInterceptRequestLayout(); boolean r10 = this.mChildHelper.r(view); if (r10) { d0 childViewHolderInt = getChildViewHolderInt(view); this.mRecycler.J(childViewHolderInt); this.mRecycler.C(childViewHolderInt); } stopInterceptRequestLayout(!r10); return r10; } @Override // android.view.ViewGroup protected void removeDetachedView(View view, boolean z10) { d0 childViewHolderInt = getChildViewHolderInt(view); if (childViewHolderInt != null) { if (childViewHolderInt.x()) { childViewHolderInt.f(); } else if (!childViewHolderInt.J()) { throw new IllegalArgumentException("Called removeDetachedView with a view which is not flagged as tmp detached." + childViewHolderInt + exceptionLabel()); } } view.clearAnimation(); dispatchChildDetached(view); super.removeDetachedView(view, z10); } public void removeItemDecoration(n nVar) { o oVar = this.mLayout; if (oVar != null) { oVar.g("Cannot remove item decoration during a scroll or layout"); } this.mItemDecorations.remove(nVar); if (this.mItemDecorations.isEmpty()) { setWillNotDraw(getOverScrollMode() == 2); } markItemDecorInsetsDirty(); requestLayout(); } public void removeItemDecorationAt(int i10) { int itemDecorationCount = getItemDecorationCount(); if (i10 >= 0 && i10 < itemDecorationCount) { removeItemDecoration(getItemDecorationAt(i10)); return; } throw new IndexOutOfBoundsException(i10 + " is an invalid index for size " + itemDecorationCount); } public void removeOnChildAttachStateChangeListener(q qVar) { List list = this.mOnChildAttachStateListeners; if (list == null) { return; } list.remove(qVar); } public void removeOnItemTouchListener(s sVar) { this.mOnItemTouchListeners.remove(sVar); if (this.mInterceptingOnItemTouchListener == sVar) { this.mInterceptingOnItemTouchListener = null; } } public void removeOnScrollListener(t tVar) { List list = this.mScrollListeners; if (list != null) { list.remove(tVar); } } void repositionShadowingViews() { d0 d0Var; int g10 = this.mChildHelper.g(); for (int i10 = 0; i10 < g10; i10++) { View f10 = this.mChildHelper.f(i10); d0 childViewHolder = getChildViewHolder(f10); if (childViewHolder != null && (d0Var = childViewHolder.f2248i) != null) { View view = d0Var.f2240a; int left = f10.getLeft(); int top = f10.getTop(); if (left != view.getLeft() || top != view.getTop()) { view.layout(left, top, view.getWidth() + left, view.getHeight() + top); } } } } @Override // android.view.ViewGroup, android.view.ViewParent public void requestChildFocus(View view, View view2) { if (!this.mLayout.b1(this, this.mState, view, view2) && view2 != null) { requestChildOnScreen(view, view2); } super.requestChildFocus(view, view2); } @Override // android.view.ViewGroup, android.view.ViewParent public boolean requestChildRectangleOnScreen(View view, Rect rect, boolean z10) { return this.mLayout.r1(this, view, rect, z10); } @Override // android.view.ViewGroup, android.view.ViewParent public void requestDisallowInterceptTouchEvent(boolean z10) { int size = this.mOnItemTouchListeners.size(); for (int i10 = 0; i10 < size; i10++) { this.mOnItemTouchListeners.get(i10).c(z10); } super.requestDisallowInterceptTouchEvent(z10); } @Override // android.view.View, android.view.ViewParent public void requestLayout() { if (this.mInterceptRequestLayoutDepth != 0 || this.mLayoutSuppressed) { this.mLayoutWasDefered = true; } else { super.requestLayout(); } } void saveOldPositions() { int j10 = this.mChildHelper.j(); for (int i10 = 0; i10 < j10; i10++) { d0 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.i(i10)); if (!childViewHolderInt.J()) { childViewHolderInt.E(); } } } @Override // android.view.View public void scrollBy(int i10, int i11) { o oVar = this.mLayout; if (oVar == null) { Log.e(TAG, "Cannot scroll without a LayoutManager set. Call setLayoutManager with a non-null argument."); return; } if (this.mLayoutSuppressed) { return; } boolean k10 = oVar.k(); boolean l10 = this.mLayout.l(); if (k10 || l10) { if (!k10) { i10 = 0; } if (!l10) { i11 = 0; } scrollByInternal(i10, i11, null); } } boolean scrollByInternal(int i10, int i11, MotionEvent motionEvent) { int i12; int i13; int i14; int i15; consumePendingUpdateOperations(); if (this.mAdapter != null) { int[] iArr = this.mReusableIntPair; iArr[0] = 0; iArr[1] = 0; scrollStep(i10, i11, iArr); int[] iArr2 = this.mReusableIntPair; int i16 = iArr2[0]; int i17 = iArr2[1]; i12 = i17; i13 = i16; i14 = i10 - i16; i15 = i11 - i17; } else { i12 = 0; i13 = 0; i14 = 0; i15 = 0; } if (!this.mItemDecorations.isEmpty()) { invalidate(); } int[] iArr3 = this.mReusableIntPair; iArr3[0] = 0; iArr3[1] = 0; dispatchNestedScroll(i13, i12, i14, i15, this.mScrollOffset, 0, iArr3); int[] iArr4 = this.mReusableIntPair; int i18 = iArr4[0]; int i19 = i14 - i18; int i20 = iArr4[1]; int i21 = i15 - i20; boolean z10 = (i18 == 0 && i20 == 0) ? false : true; int i22 = this.mLastTouchX; int[] iArr5 = this.mScrollOffset; int i23 = iArr5[0]; this.mLastTouchX = i22 - i23; int i24 = this.mLastTouchY; int i25 = iArr5[1]; this.mLastTouchY = i24 - i25; int[] iArr6 = this.mNestedOffsets; iArr6[0] = iArr6[0] + i23; iArr6[1] = iArr6[1] + i25; if (getOverScrollMode() != 2) { if (motionEvent != null && !androidx.core.view.d0.a(motionEvent, 8194)) { pullGlows(motionEvent.getX(), i19, motionEvent.getY(), i21); } considerReleasingGlowsOnScroll(i10, i11); } if (i13 != 0 || i12 != 0) { dispatchOnScrolled(i13, i12); } if (!awakenScrollBars()) { invalidate(); } return (!z10 && i13 == 0 && i12 == 0) ? false : true; } void scrollStep(int i10, int i11, int[] iArr) { startInterceptRequestLayout(); onEnterLayoutOrScroll(); v.p.a(TRACE_SCROLL_TAG); fillRemainingScrollValues(this.mState); int w12 = i10 != 0 ? this.mLayout.w1(i10, this.mRecycler, this.mState) : 0; int y12 = i11 != 0 ? this.mLayout.y1(i11, this.mRecycler, this.mState) : 0; v.p.b(); repositionShadowingViews(); onExitLayoutOrScroll(); stopInterceptRequestLayout(false); if (iArr != null) { iArr[0] = w12; iArr[1] = y12; } } @Override // android.view.View public void scrollTo(int i10, int i11) { Log.w(TAG, "RecyclerView does not support scrolling to an absolute position. Use scrollToPosition instead"); } public void scrollToPosition(int i10) { if (this.mLayoutSuppressed) { return; } stopScroll(); o oVar = this.mLayout; if (oVar == null) { Log.e(TAG, "Cannot scroll to position a LayoutManager set. Call setLayoutManager with a non-null argument."); } else { oVar.x1(i10); awakenScrollBars(); } } @Override // android.view.View, android.view.accessibility.AccessibilityEventSource public void sendAccessibilityEventUnchecked(AccessibilityEvent accessibilityEvent) { if (shouldDeferAccessibilityEvent(accessibilityEvent)) { return; } super.sendAccessibilityEventUnchecked(accessibilityEvent); } public void setAccessibilityDelegateCompat(androidx.recyclerview.widget.l lVar) { this.mAccessibilityDelegate = lVar; n0.n0(this, lVar); } public void setAdapter(g gVar) { setLayoutFrozen(false); setAdapterInternal(gVar, false, true); processDataSetCompletelyChanged(false); requestLayout(); } public void setChildDrawingOrderCallback(j jVar) { if (jVar == null) { return; } setChildrenDrawingOrderEnabled(false); } boolean setChildImportantForAccessibilityInternal(d0 d0Var, int i10) { if (!isComputingLayout()) { n0.w0(d0Var.f2240a, i10); return true; } d0Var.f2256q = i10; this.mPendingAccessibilityImportanceChange.add(d0Var); return false; } @Override // android.view.ViewGroup public void setClipToPadding(boolean z10) { if (z10 != this.mClipToPadding) { invalidateGlows(); } this.mClipToPadding = z10; super.setClipToPadding(z10); if (this.mFirstLayoutComplete) { requestLayout(); } } public void setEdgeEffectFactory(k kVar) { y.h.e(kVar); this.mEdgeEffectFactory = kVar; invalidateGlows(); } public void setHasFixedSize(boolean z10) { this.mHasFixedSize = z10; } public void setItemAnimator(l lVar) { l lVar2 = this.mItemAnimator; if (lVar2 != null) { lVar2.k(); this.mItemAnimator.v(null); } this.mItemAnimator = lVar; if (lVar != null) { lVar.v(this.mItemAnimatorListener); } } public void setItemViewCacheSize(int i10) { this.mRecycler.G(i10); } @Deprecated public void setLayoutFrozen(boolean z10) { suppressLayout(z10); } public void setLayoutManager(o oVar) { if (oVar == this.mLayout) { return; } stopScroll(); if (this.mLayout != null) { l lVar = this.mItemAnimator; if (lVar != null) { lVar.k(); } this.mLayout.k1(this.mRecycler); this.mLayout.l1(this.mRecycler); this.mRecycler.c(); if (this.mIsAttached) { this.mLayout.A(this, this.mRecycler); } this.mLayout.E1(null); this.mLayout = null; } else { this.mRecycler.c(); } this.mChildHelper.o(); this.mLayout = oVar; if (oVar != null) { if (oVar.f2274b != null) { throw new IllegalArgumentException("LayoutManager " + oVar + " is already attached to a RecyclerView:" + oVar.f2274b.exceptionLabel()); } oVar.E1(this); if (this.mIsAttached) { this.mLayout.z(this); } } this.mRecycler.K(); requestLayout(); } @Override // android.view.ViewGroup @Deprecated public void setLayoutTransition(LayoutTransition layoutTransition) { if (layoutTransition != null) { throw new IllegalArgumentException("Providing a LayoutTransition into RecyclerView is not supported. Please use setItemAnimator() instead for animating changes to the items in this RecyclerView"); } super.setLayoutTransition(null); } @Override // android.view.View public void setNestedScrollingEnabled(boolean z10) { getScrollingChildHelper().n(z10); } public void setOnFlingListener(r rVar) { this.mOnFlingListener = rVar; } @Deprecated public void setOnScrollListener(t tVar) { this.mScrollListener = tVar; } public void setPreserveFocusAfterLayout(boolean z10) { this.mPreserveFocusAfterLayout = z10; } public void setRecycledViewPool(u uVar) { this.mRecycler.E(uVar); } public void setRecyclerListener(w wVar) { } void setScrollState(int i10) { if (i10 == this.mScrollState) { return; } this.mScrollState = i10; if (i10 != 2) { stopScrollersInternal(); } dispatchOnScrollStateChanged(i10); } public void setScrollingTouchSlop(int i10) { ViewConfiguration viewConfiguration = ViewConfiguration.get(getContext()); if (i10 != 0) { if (i10 == 1) { this.mTouchSlop = viewConfiguration.getScaledPagingTouchSlop(); return; } Log.w(TAG, "setScrollingTouchSlop(): bad argument constant " + i10 + "; using default value"); } this.mTouchSlop = viewConfiguration.getScaledTouchSlop(); } public void setViewCacheExtension(b0 b0Var) { this.mRecycler.F(b0Var); } boolean shouldDeferAccessibilityEvent(AccessibilityEvent accessibilityEvent) { if (!isComputingLayout()) { return false; } int a10 = accessibilityEvent != null ? z.b.a(accessibilityEvent) : 0; this.mEatenAccessibilityChangeFlags |= a10 != 0 ? a10 : 0; return true; } public void smoothScrollBy(int i10, int i11) { smoothScrollBy(i10, i11, null); } public void smoothScrollToPosition(int i10) { if (this.mLayoutSuppressed) { return; } o oVar = this.mLayout; if (oVar == null) { Log.e(TAG, "Cannot smooth scroll without a LayoutManager set. Call setLayoutManager with a non-null argument."); } else { oVar.I1(this, this.mState, i10); } } void startInterceptRequestLayout() { int i10 = this.mInterceptRequestLayoutDepth + 1; this.mInterceptRequestLayoutDepth = i10; if (i10 != 1 || this.mLayoutSuppressed) { return; } this.mLayoutWasDefered = false; } @Override // android.view.View public boolean startNestedScroll(int i10) { return getScrollingChildHelper().p(i10); } void stopInterceptRequestLayout(boolean z10) { if (this.mInterceptRequestLayoutDepth < 1) { this.mInterceptRequestLayoutDepth = 1; } if (!z10 && !this.mLayoutSuppressed) { this.mLayoutWasDefered = false; } if (this.mInterceptRequestLayoutDepth == 1) { if (z10 && this.mLayoutWasDefered && !this.mLayoutSuppressed && this.mLayout != null && this.mAdapter != null) { dispatchLayout(); } if (!this.mLayoutSuppressed) { this.mLayoutWasDefered = false; } } this.mInterceptRequestLayoutDepth--; } @Override // android.view.View public void stopNestedScroll() { getScrollingChildHelper().r(); } public void stopScroll() { setScrollState(0); stopScrollersInternal(); } @Override // android.view.ViewGroup public final void suppressLayout(boolean z10) { if (z10 != this.mLayoutSuppressed) { assertNotInLayoutOrScroll("Do not suppressLayout in layout or scroll"); if (z10) { long uptimeMillis = SystemClock.uptimeMillis(); onTouchEvent(MotionEvent.obtain(uptimeMillis, uptimeMillis, 3, 0.0f, 0.0f, 0)); this.mLayoutSuppressed = true; this.mIgnoreMotionEventTillDown = true; stopScroll(); return; } this.mLayoutSuppressed = false; if (this.mLayoutWasDefered && this.mLayout != null && this.mAdapter != null) { requestLayout(); } this.mLayoutWasDefered = false; } } public void swapAdapter(g gVar, boolean z10) { setLayoutFrozen(false); setAdapterInternal(gVar, true, z10); processDataSetCompletelyChanged(true); requestLayout(); } void viewRangeUpdate(int i10, int i11, Object obj) { int i12; int j10 = this.mChildHelper.j(); int i13 = i10 + i11; for (int i14 = 0; i14 < j10; i14++) { View i15 = this.mChildHelper.i(i14); d0 childViewHolderInt = getChildViewHolderInt(i15); if (childViewHolderInt != null && !childViewHolderInt.J() && (i12 = childViewHolderInt.f2242c) >= i10 && i12 < i13) { childViewHolderInt.b(2); childViewHolderInt.a(obj); ((p) i15.getLayoutParams()).f2299c = true; } } this.mRecycler.M(i10, i11); } public RecyclerView(Context context, AttributeSet attributeSet) { this(context, attributeSet, l0.a.f11562a); } public boolean dispatchNestedPreScroll(int i10, int i11, int[] iArr, int[] iArr2, int i12) { return getScrollingChildHelper().d(i10, i11, iArr, iArr2, i12); } public boolean dispatchNestedScroll(int i10, int i11, int i12, int i13, int[] iArr, int i14) { return getScrollingChildHelper().g(i10, i11, i12, i13, iArr, i14); } /* JADX WARN: Removed duplicated region for block: B:12:0x0034 */ /* JADX WARN: Removed duplicated region for block: B:15:0x0036 A[SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ androidx.recyclerview.widget.RecyclerView.d0 findViewHolderForPosition(int r6, boolean r7) { /* r5 = this; androidx.recyclerview.widget.b r0 = r5.mChildHelper int r0 = r0.j() r1 = 0 r2 = 0 L8: if (r2 >= r0) goto L3a androidx.recyclerview.widget.b r3 = r5.mChildHelper android.view.View r3 = r3.i(r2) androidx.recyclerview.widget.RecyclerView$d0 r3 = getChildViewHolderInt(r3) if (r3 == 0) goto L37 boolean r4 = r3.v() if (r4 != 0) goto L37 if (r7 == 0) goto L23 int r4 = r3.f2242c if (r4 == r6) goto L2a goto L37 L23: int r4 = r3.m() if (r4 == r6) goto L2a goto L37 L2a: androidx.recyclerview.widget.b r1 = r5.mChildHelper android.view.View r4 = r3.f2240a boolean r1 = r1.n(r4) if (r1 == 0) goto L36 r1 = r3 goto L37 L36: return r3 L37: int r2 = r2 + 1 goto L8 L3a: return r1 */ throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.findViewHolderForPosition(int, boolean):androidx.recyclerview.widget.RecyclerView$d0"); } public boolean hasNestedScrollingParent(int i10) { return getScrollingChildHelper().l(i10); } void onExitLayoutOrScroll(boolean z10) { int i10 = this.mLayoutOrScrollCounter - 1; this.mLayoutOrScrollCounter = i10; if (i10 < 1) { this.mLayoutOrScrollCounter = 0; if (z10) { dispatchContentChangedIfNecessary(); dispatchPendingImportantForAccessibilityChanges(); } } } public void smoothScrollBy(int i10, int i11, Interpolator interpolator) { smoothScrollBy(i10, i11, interpolator, UNDEFINED_DURATION); } public boolean startNestedScroll(int i10, int i11) { return getScrollingChildHelper().q(i10, i11); } public void stopNestedScroll(int i10) { getScrollingChildHelper().s(i10); } public RecyclerView(Context context, AttributeSet attributeSet, int i10) { super(context, attributeSet, i10); this.mObserver = new x(); this.mRecycler = new v(); this.mViewInfoStore = new androidx.recyclerview.widget.q(); this.mUpdateChildViewsRunnable = new a(); this.mTempRect = new Rect(); this.mTempRect2 = new Rect(); this.mTempRectF = new RectF(); this.mItemDecorations = new ArrayList<>(); this.mOnItemTouchListeners = new ArrayList<>(); this.mInterceptRequestLayoutDepth = 0; this.mDataSetHasChangedAfterLayout = false; this.mDispatchItemsChangedEvent = false; this.mLayoutOrScrollCounter = 0; this.mDispatchScrollCounter = 0; this.mEdgeEffectFactory = new k(); this.mItemAnimator = new androidx.recyclerview.widget.c(); this.mScrollState = 0; this.mScrollPointerId = -1; this.mScaledHorizontalScrollFactor = Float.MIN_VALUE; this.mScaledVerticalScrollFactor = Float.MIN_VALUE; this.mPreserveFocusAfterLayout = true; this.mViewFlinger = new c0(); this.mPrefetchRegistry = ALLOW_THREAD_GAP_WORK ? new e.b() : null; this.mState = new a0(); this.mItemsAddedOrRemoved = false; this.mItemsChanged = false; this.mItemAnimatorListener = new m(); this.mPostedAnimatorRunner = false; this.mMinMaxLayoutPositions = new int[2]; this.mScrollOffset = new int[2]; this.mNestedOffsets = new int[2]; this.mReusableIntPair = new int[2]; this.mPendingAccessibilityImportanceChange = new ArrayList(); this.mItemAnimatorRunner = new b(); this.mViewInfoProcessCallback = new d(); setScrollContainer(true); setFocusableInTouchMode(true); ViewConfiguration viewConfiguration = ViewConfiguration.get(context); this.mTouchSlop = viewConfiguration.getScaledTouchSlop(); this.mScaledHorizontalScrollFactor = t0.b(viewConfiguration, context); this.mScaledVerticalScrollFactor = t0.d(viewConfiguration, context); this.mMinFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity(); this.mMaxFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity(); setWillNotDraw(getOverScrollMode() == 2); this.mItemAnimator.v(this.mItemAnimatorListener); initAdapterManager(); initChildrenHelper(); initAutofill(); if (n0.z(this) == 0) { n0.w0(this, 1); } this.mAccessibilityManager = (AccessibilityManager) getContext().getSystemService("accessibility"); setAccessibilityDelegateCompat(new androidx.recyclerview.widget.l(this)); int[] iArr = l0.c.f11571f; TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, iArr, i10, 0); int i11 = Build.VERSION.SDK_INT; if (i11 >= 29) { saveAttributeDataForStyleable(context, iArr, attributeSet, obtainStyledAttributes, i10, 0); } String string = obtainStyledAttributes.getString(l0.c.f11580o); if (obtainStyledAttributes.getInt(l0.c.f11574i, -1) == -1) { setDescendantFocusability(262144); } this.mClipToPadding = obtainStyledAttributes.getBoolean(l0.c.f11573h, true); boolean z10 = obtainStyledAttributes.getBoolean(l0.c.f11575j, false); this.mEnableFastScroller = z10; if (z10) { initFastScroller((StateListDrawable) obtainStyledAttributes.getDrawable(l0.c.f11578m), obtainStyledAttributes.getDrawable(l0.c.f11579n), (StateListDrawable) obtainStyledAttributes.getDrawable(l0.c.f11576k), obtainStyledAttributes.getDrawable(l0.c.f11577l)); } obtainStyledAttributes.recycle(); createLayoutManager(context, string, attributeSet, i10, 0); int[] iArr2 = NESTED_SCROLLING_ATTRS; TypedArray obtainStyledAttributes2 = context.obtainStyledAttributes(attributeSet, iArr2, i10, 0); if (i11 >= 29) { saveAttributeDataForStyleable(context, iArr2, attributeSet, obtainStyledAttributes2, i10, 0); } boolean z11 = obtainStyledAttributes2.getBoolean(0, true); obtainStyledAttributes2.recycle(); setNestedScrollingEnabled(z11); } public final void dispatchNestedScroll(int i10, int i11, int i12, int i13, int[] iArr, int i14, int[] iArr2) { getScrollingChildHelper().e(i10, i11, i12, i13, iArr, i14, iArr2); } public void smoothScrollBy(int i10, int i11, Interpolator interpolator, int i12) { smoothScrollBy(i10, i11, interpolator, i12, false); } public static class p extends ViewGroup.MarginLayoutParams { /* renamed from: a, reason: collision with root package name */ d0 f2297a; /* renamed from: b, reason: collision with root package name */ final Rect f2298b; /* renamed from: c, reason: collision with root package name */ boolean f2299c; /* renamed from: d, reason: collision with root package name */ boolean f2300d; public p(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.f2298b = new Rect(); this.f2299c = true; this.f2300d = false; } public int a() { return this.f2297a.m(); } public boolean b() { return this.f2297a.y(); } public boolean c() { return this.f2297a.v(); } public boolean d() { return this.f2297a.t(); } public p(int i10, int i11) { super(i10, i11); this.f2298b = new Rect(); this.f2299c = true; this.f2300d = false; } public p(ViewGroup.MarginLayoutParams marginLayoutParams) { super(marginLayoutParams); this.f2298b = new Rect(); this.f2299c = true; this.f2300d = false; } public p(ViewGroup.LayoutParams layoutParams) { super(layoutParams); this.f2298b = new Rect(); this.f2299c = true; this.f2300d = false; } public p(p pVar) { super((ViewGroup.LayoutParams) pVar); this.f2298b = new Rect(); this.f2299c = true; this.f2300d = false; } } public static class y extends c0.a { public static final Parcelable.Creator CREATOR = new a(); /* renamed from: c, reason: collision with root package name */ Parcelable f2316c; static class a implements Parcelable.ClassLoaderCreator { a() { } @Override // android.os.Parcelable.Creator /* renamed from: a, reason: merged with bridge method [inline-methods] */ public y createFromParcel(Parcel parcel) { return new y(parcel, null); } @Override // android.os.Parcelable.ClassLoaderCreator /* renamed from: b, reason: merged with bridge method [inline-methods] */ public y createFromParcel(Parcel parcel, ClassLoader classLoader) { return new y(parcel, classLoader); } @Override // android.os.Parcelable.Creator /* renamed from: c, reason: merged with bridge method [inline-methods] */ public y[] newArray(int i10) { return new y[i10]; } } y(Parcel parcel, ClassLoader classLoader) { super(parcel, classLoader); this.f2316c = parcel.readParcelable(classLoader == null ? o.class.getClassLoader() : classLoader); } void b(y yVar) { this.f2316c = yVar.f2316c; } @Override // c0.a, android.os.Parcelable public void writeToParcel(Parcel parcel, int i10) { super.writeToParcel(parcel, i10); parcel.writeParcelable(this.f2316c, 0); } y(Parcelable parcelable) { super(parcelable); } } @Override // android.view.ViewGroup protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) { o oVar = this.mLayout; if (oVar != null) { return oVar.F(layoutParams); } throw new IllegalStateException("RecyclerView has no LayoutManager" + exceptionLabel()); } void smoothScrollBy(int i10, int i11, Interpolator interpolator, int i12, boolean z10) { o oVar = this.mLayout; if (oVar == null) { Log.e(TAG, "Cannot smooth scroll without a LayoutManager set. Call setLayoutManager with a non-null argument."); return; } if (this.mLayoutSuppressed) { return; } if (!oVar.k()) { i10 = 0; } if (!this.mLayout.l()) { i11 = 0; } if (i10 == 0 && i11 == 0) { return; } if (i12 == Integer.MIN_VALUE || i12 > 0) { if (z10) { int i13 = i10 != 0 ? 1 : 0; if (i11 != 0) { i13 |= 2; } startNestedScroll(i13, 1); } this.mViewFlinger.f(i10, i11, i12, interpolator); return; } scrollBy(i10, i11); } public void addItemDecoration(n nVar) { addItemDecoration(nVar, -1); } }