package com.google.android.material.bottomsheet; import android.R; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.os.Parcel; import android.os.Parcelable; import android.util.AttributeSet; import android.util.TypedValue; 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 androidx.appcompat.app.m; import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.core.view.n0; import c3.i; import c3.j; import d0.c; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import p3.g; import p3.k; import z.a0; import z.d0; /* loaded from: classes2.dex */ public class BottomSheetBehavior extends CoordinatorLayout.b { private static final int K = i.f3552b; int A; WeakReference B; WeakReference C; private final ArrayList D; private VelocityTracker E; int F; private int G; boolean H; private Map I; private final c.AbstractC0132c J; /* renamed from: a, reason: collision with root package name */ private int f4324a; /* renamed from: b, reason: collision with root package name */ private boolean f4325b; /* renamed from: c, reason: collision with root package name */ private float f4326c; /* renamed from: d, reason: collision with root package name */ private int f4327d; /* renamed from: e, reason: collision with root package name */ private boolean f4328e; /* renamed from: f, reason: collision with root package name */ private int f4329f; /* renamed from: g, reason: collision with root package name */ private boolean f4330g; /* renamed from: h, reason: collision with root package name */ private g f4331h; /* renamed from: i, reason: collision with root package name */ private k f4332i; /* renamed from: j, reason: collision with root package name */ private boolean f4333j; /* renamed from: k, reason: collision with root package name */ private f f4334k; /* renamed from: l, reason: collision with root package name */ private ValueAnimator f4335l; /* renamed from: m, reason: collision with root package name */ int f4336m; /* renamed from: n, reason: collision with root package name */ int f4337n; /* renamed from: o, reason: collision with root package name */ int f4338o; /* renamed from: p, reason: collision with root package name */ float f4339p; /* renamed from: q, reason: collision with root package name */ int f4340q; /* renamed from: r, reason: collision with root package name */ float f4341r; /* renamed from: s, reason: collision with root package name */ boolean f4342s; /* renamed from: t, reason: collision with root package name */ private boolean f4343t; /* renamed from: u, reason: collision with root package name */ int f4344u; /* renamed from: v, reason: collision with root package name */ d0.c f4345v; /* renamed from: w, reason: collision with root package name */ private boolean f4346w; /* renamed from: x, reason: collision with root package name */ private int f4347x; /* renamed from: y, reason: collision with root package name */ private boolean f4348y; /* renamed from: z, reason: collision with root package name */ int f4349z; class a implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ View f4350a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ int f4351b; a(View view, int i10) { this.f4350a = view; this.f4351b = i10; } @Override // java.lang.Runnable public void run() { BottomSheetBehavior.this.f0(this.f4350a, this.f4351b); } } class b implements ValueAnimator.AnimatorUpdateListener { b() { } @Override // android.animation.ValueAnimator.AnimatorUpdateListener public void onAnimationUpdate(ValueAnimator valueAnimator) { float floatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue(); if (BottomSheetBehavior.this.f4331h != null) { BottomSheetBehavior.this.f4331h.S(floatValue); } } } class c extends c.AbstractC0132c { c() { } @Override // d0.c.AbstractC0132c public int a(View view, int i10, int i11) { return view.getLeft(); } @Override // d0.c.AbstractC0132c public int b(View view, int i10, int i11) { int R = BottomSheetBehavior.this.R(); BottomSheetBehavior bottomSheetBehavior = BottomSheetBehavior.this; return t.a.b(i10, R, bottomSheetBehavior.f4342s ? bottomSheetBehavior.A : bottomSheetBehavior.f4340q); } @Override // d0.c.AbstractC0132c public int e(View view) { BottomSheetBehavior bottomSheetBehavior = BottomSheetBehavior.this; return bottomSheetBehavior.f4342s ? bottomSheetBehavior.A : bottomSheetBehavior.f4340q; } @Override // d0.c.AbstractC0132c public void j(int i10) { if (i10 == 1) { BottomSheetBehavior.this.e0(1); } } @Override // d0.c.AbstractC0132c public void k(View view, int i10, int i11, int i12, int i13) { BottomSheetBehavior.this.P(i11); } @Override // d0.c.AbstractC0132c public void l(View view, float f10, float f11) { int i10; int i11 = 6; if (f11 < 0.0f) { if (BottomSheetBehavior.this.f4325b) { i10 = BottomSheetBehavior.this.f4337n; } else { int top = view.getTop(); BottomSheetBehavior bottomSheetBehavior = BottomSheetBehavior.this; int i12 = bottomSheetBehavior.f4338o; if (top > i12) { i10 = i12; } else { i10 = bottomSheetBehavior.f4336m; } } i11 = 3; } else { BottomSheetBehavior bottomSheetBehavior2 = BottomSheetBehavior.this; if (bottomSheetBehavior2.f4342s && bottomSheetBehavior2.h0(view, f11) && (view.getTop() > BottomSheetBehavior.this.f4340q || Math.abs(f10) < Math.abs(f11))) { i10 = BottomSheetBehavior.this.A; i11 = 5; } else if (f11 == 0.0f || Math.abs(f10) > Math.abs(f11)) { int top2 = view.getTop(); if (!BottomSheetBehavior.this.f4325b) { BottomSheetBehavior bottomSheetBehavior3 = BottomSheetBehavior.this; int i13 = bottomSheetBehavior3.f4338o; if (top2 < i13) { if (top2 < Math.abs(top2 - bottomSheetBehavior3.f4340q)) { i10 = BottomSheetBehavior.this.f4336m; i11 = 3; } else { i10 = BottomSheetBehavior.this.f4338o; } } else if (Math.abs(top2 - i13) < Math.abs(top2 - BottomSheetBehavior.this.f4340q)) { i10 = BottomSheetBehavior.this.f4338o; } else { i10 = BottomSheetBehavior.this.f4340q; i11 = 4; } } else if (Math.abs(top2 - BottomSheetBehavior.this.f4337n) < Math.abs(top2 - BottomSheetBehavior.this.f4340q)) { i10 = BottomSheetBehavior.this.f4337n; i11 = 3; } else { i10 = BottomSheetBehavior.this.f4340q; i11 = 4; } } else { if (BottomSheetBehavior.this.f4325b) { i10 = BottomSheetBehavior.this.f4340q; } else { int top3 = view.getTop(); if (Math.abs(top3 - BottomSheetBehavior.this.f4338o) < Math.abs(top3 - BottomSheetBehavior.this.f4340q)) { i10 = BottomSheetBehavior.this.f4338o; } else { i10 = BottomSheetBehavior.this.f4340q; } } i11 = 4; } } BottomSheetBehavior.this.i0(view, i11, i10, true); } @Override // d0.c.AbstractC0132c public boolean m(View view, int i10) { BottomSheetBehavior bottomSheetBehavior = BottomSheetBehavior.this; int i11 = bottomSheetBehavior.f4344u; if (i11 == 1 || bottomSheetBehavior.H) { return false; } if (i11 == 3 && bottomSheetBehavior.F == i10) { WeakReference weakReference = bottomSheetBehavior.C; View view2 = weakReference != null ? (View) weakReference.get() : null; if (view2 != null && view2.canScrollVertically(-1)) { return false; } } WeakReference weakReference2 = BottomSheetBehavior.this.B; return weakReference2 != null && weakReference2.get() == view; } } class d implements d0 { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ int f4355a; d(int i10) { this.f4355a = i10; } @Override // z.d0 public boolean a(View view, d0.a aVar) { BottomSheetBehavior.this.d0(this.f4355a); return true; } } private class f implements Runnable { /* renamed from: a, reason: collision with root package name */ private final View f4362a; /* renamed from: b, reason: collision with root package name */ private boolean f4363b; /* renamed from: c, reason: collision with root package name */ int f4364c; f(View view, int i10) { this.f4362a = view; this.f4364c = i10; } @Override // java.lang.Runnable public void run() { d0.c cVar = BottomSheetBehavior.this.f4345v; if (cVar == null || !cVar.k(true)) { BottomSheetBehavior.this.e0(this.f4364c); } else { n0.f0(this.f4362a, this); } this.f4363b = false; } } public BottomSheetBehavior() { this.f4324a = 0; this.f4325b = true; this.f4334k = null; this.f4339p = 0.5f; this.f4341r = -1.0f; this.f4344u = 4; this.D = new ArrayList(); this.J = new c(); } private void J(View view, a0.a aVar, int i10) { n0.j0(view, aVar, null, new d(i10)); } private void K() { int max = this.f4328e ? Math.max(this.f4329f, this.A - ((this.f4349z * 9) / 16)) : this.f4327d; if (this.f4325b) { this.f4340q = Math.max(this.A - max, this.f4337n); } else { this.f4340q = this.A - max; } } private void L() { this.f4338o = (int) (this.A * (1.0f - this.f4339p)); } private void M(Context context, AttributeSet attributeSet, boolean z10) { N(context, attributeSet, z10, null); } private void N(Context context, AttributeSet attributeSet, boolean z10, ColorStateList colorStateList) { if (this.f4330g) { this.f4332i = k.e(context, attributeSet, c3.a.f3445a, K).m(); g gVar = new g(this.f4332i); this.f4331h = gVar; gVar.J(context); if (z10 && colorStateList != null) { this.f4331h.R(colorStateList); return; } TypedValue typedValue = new TypedValue(); context.getTheme().resolveAttribute(R.attr.colorBackground, typedValue, true); this.f4331h.setTint(typedValue.data); } } private void O() { ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 1.0f); this.f4335l = ofFloat; ofFloat.setDuration(500L); this.f4335l.addUpdateListener(new b()); } /* JADX INFO: Access modifiers changed from: private */ public int R() { return this.f4325b ? this.f4337n : this.f4336m; } private float S() { VelocityTracker velocityTracker = this.E; if (velocityTracker == null) { return 0.0f; } velocityTracker.computeCurrentVelocity(1000, this.f4326c); return this.E.getYVelocity(this.F); } private void T() { this.F = -1; VelocityTracker velocityTracker = this.E; if (velocityTracker != null) { velocityTracker.recycle(); this.E = null; } } private void U(e eVar) { int i10 = this.f4324a; if (i10 == 0) { return; } if (i10 == -1 || (i10 & 1) == 1) { this.f4327d = eVar.f4358d; } if (i10 == -1 || (i10 & 2) == 2) { this.f4325b = eVar.f4359e; } if (i10 == -1 || (i10 & 4) == 4) { this.f4342s = eVar.f4360f; } if (i10 == -1 || (i10 & 8) == 8) { this.f4343t = eVar.f4361g; } } private void g0(int i10) { View view = (View) this.B.get(); if (view == null) { return; } ViewParent parent = view.getParent(); if (parent != null && parent.isLayoutRequested() && n0.Q(view)) { view.post(new a(view, i10)); } else { f0(view, i10); } } private void j0() { View view; WeakReference weakReference = this.B; if (weakReference == null || (view = (View) weakReference.get()) == null) { return; } n0.h0(view, 524288); n0.h0(view, 262144); n0.h0(view, 1048576); if (this.f4342s && this.f4344u != 5) { J(view, a0.a.f15695y, 5); } int i10 = this.f4344u; if (i10 == 3) { J(view, a0.a.f15694x, this.f4325b ? 4 : 6); return; } if (i10 == 4) { J(view, a0.a.f15693w, this.f4325b ? 3 : 6); } else { if (i10 != 6) { return; } J(view, a0.a.f15694x, 4); J(view, a0.a.f15693w, 3); } } private void k0(int i10) { ValueAnimator valueAnimator; if (i10 == 2) { return; } boolean z10 = i10 == 3; if (this.f4333j != z10) { this.f4333j = z10; if (this.f4331h == null || (valueAnimator = this.f4335l) == null) { return; } if (valueAnimator.isRunning()) { this.f4335l.reverse(); return; } float f10 = z10 ? 0.0f : 1.0f; this.f4335l.setFloatValues(1.0f - f10, f10); this.f4335l.start(); } } private void l0(boolean z10) { WeakReference weakReference = this.B; if (weakReference == null) { return; } ViewParent parent = ((View) weakReference.get()).getParent(); if (parent instanceof CoordinatorLayout) { CoordinatorLayout coordinatorLayout = (CoordinatorLayout) parent; int childCount = coordinatorLayout.getChildCount(); if (z10) { if (this.I != null) { return; } else { this.I = new HashMap(childCount); } } for (int i10 = 0; i10 < childCount; i10++) { View childAt = coordinatorLayout.getChildAt(i10); if (childAt != this.B.get()) { if (z10) { this.I.put(childAt, Integer.valueOf(childAt.getImportantForAccessibility())); n0.w0(childAt, 4); } else { Map map = this.I; if (map != null && map.containsKey(childAt)) { n0.w0(childAt, ((Integer) this.I.get(childAt)).intValue()); } } } } if (z10) { return; } this.I = null; } } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public boolean A(CoordinatorLayout coordinatorLayout, View view, View view2, View view3, int i10, int i11) { this.f4347x = 0; this.f4348y = false; return (i10 & 2) != 0; } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public void C(CoordinatorLayout coordinatorLayout, View view, View view2, int i10) { int i11; int i12 = 3; if (view.getTop() == R()) { e0(3); return; } WeakReference weakReference = this.C; if (weakReference != null && view2 == weakReference.get() && this.f4348y) { if (this.f4347x > 0) { i11 = R(); } else if (this.f4342s && h0(view, S())) { i11 = this.A; i12 = 5; } else if (this.f4347x == 0) { int top = view.getTop(); if (!this.f4325b) { int i13 = this.f4338o; if (top < i13) { if (top < Math.abs(top - this.f4340q)) { i11 = this.f4336m; } else { i11 = this.f4338o; } } else if (Math.abs(top - i13) < Math.abs(top - this.f4340q)) { i11 = this.f4338o; } else { i11 = this.f4340q; i12 = 4; } i12 = 6; } else if (Math.abs(top - this.f4337n) < Math.abs(top - this.f4340q)) { i11 = this.f4337n; } else { i11 = this.f4340q; i12 = 4; } } else { if (this.f4325b) { i11 = this.f4340q; } else { int top2 = view.getTop(); if (Math.abs(top2 - this.f4338o) < Math.abs(top2 - this.f4340q)) { i11 = this.f4338o; i12 = 6; } else { i11 = this.f4340q; } } i12 = 4; } i0(view, i12, i11, false); this.f4348y = false; } } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public boolean D(CoordinatorLayout coordinatorLayout, View view, MotionEvent motionEvent) { if (!view.isShown()) { return false; } int actionMasked = motionEvent.getActionMasked(); if (this.f4344u == 1 && actionMasked == 0) { return true; } d0.c cVar = this.f4345v; if (cVar != null) { cVar.z(motionEvent); } if (actionMasked == 0) { T(); } if (this.E == null) { this.E = VelocityTracker.obtain(); } this.E.addMovement(motionEvent); if (actionMasked == 2 && !this.f4346w && Math.abs(this.G - motionEvent.getY()) > this.f4345v.u()) { this.f4345v.b(view, motionEvent.getPointerId(motionEvent.getActionIndex())); } return !this.f4346w; } void P(int i10) { if (((View) this.B.get()) == null || this.D.isEmpty()) { return; } if (i10 <= this.f4340q) { R(); } if (this.D.size() <= 0) { return; } m.a(this.D.get(0)); throw null; } View Q(View view) { if (n0.S(view)) { return view; } if (!(view instanceof ViewGroup)) { return null; } ViewGroup viewGroup = (ViewGroup) view; int childCount = viewGroup.getChildCount(); for (int i10 = 0; i10 < childCount; i10++) { View Q = Q(viewGroup.getChildAt(i10)); if (Q != null) { return Q; } } return null; } public void V(int i10) { if (i10 < 0) { throw new IllegalArgumentException("offset must be greater than or equal to 0"); } this.f4336m = i10; } public void W(boolean z10) { if (this.f4325b == z10) { return; } this.f4325b = z10; if (this.B != null) { K(); } e0((this.f4325b && this.f4344u == 6) ? 3 : this.f4344u); j0(); } public void X(float f10) { if (f10 <= 0.0f || f10 >= 1.0f) { throw new IllegalArgumentException("ratio must be a float value between 0 and 1"); } this.f4339p = f10; } public void Y(boolean z10) { if (this.f4342s != z10) { this.f4342s = z10; if (!z10 && this.f4344u == 5) { d0(4); } j0(); } } public void Z(int i10) { a0(i10, false); } public final void a0(int i10, boolean z10) { View view; boolean z11 = true; if (i10 == -1) { if (!this.f4328e) { this.f4328e = true; } z11 = false; } else { if (this.f4328e || this.f4327d != i10) { this.f4328e = false; this.f4327d = Math.max(0, i10); } z11 = false; } if (!z11 || this.B == null) { return; } K(); if (this.f4344u != 4 || (view = (View) this.B.get()) == null) { return; } if (z10) { g0(this.f4344u); } else { view.requestLayout(); } } public void b0(int i10) { this.f4324a = i10; } public void c0(boolean z10) { this.f4343t = z10; } public void d0(int i10) { if (i10 == this.f4344u) { return; } if (this.B != null) { g0(i10); return; } if (i10 == 4 || i10 == 3 || i10 == 6 || (this.f4342s && i10 == 5)) { this.f4344u = i10; } } void e0(int i10) { if (this.f4344u == i10) { return; } this.f4344u = i10; WeakReference weakReference = this.B; if (weakReference == null || ((View) weakReference.get()) == null) { return; } if (i10 == 6 || i10 == 3) { l0(true); } else if (i10 == 5 || i10 == 4) { l0(false); } k0(i10); if (this.D.size() <= 0) { j0(); } else { m.a(this.D.get(0)); throw null; } } void f0(View view, int i10) { int i11; int i12; if (i10 == 4) { i11 = this.f4340q; } else if (i10 == 6) { i11 = this.f4338o; if (this.f4325b && i11 <= (i12 = this.f4337n)) { i11 = i12; i10 = 3; } } else if (i10 == 3) { i11 = R(); } else { if (!this.f4342s || i10 != 5) { throw new IllegalArgumentException("Illegal state argument: " + i10); } i11 = this.A; } i0(view, i10, i11, false); } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public void g(CoordinatorLayout.e eVar) { super.g(eVar); this.B = null; this.f4345v = null; } boolean h0(View view, float f10) { if (this.f4343t) { return true; } return view.getTop() >= this.f4340q && Math.abs((((float) view.getTop()) + (f10 * 0.1f)) - ((float) this.f4340q)) / ((float) this.f4327d) > 0.5f; } void i0(View view, int i10, int i11, boolean z10) { if (!(z10 ? this.f4345v.F(view.getLeft(), i11) : this.f4345v.H(view, view.getLeft(), i11))) { e0(i10); return; } e0(2); k0(i10); if (this.f4334k == null) { this.f4334k = new f(view, i10); } if (this.f4334k.f4363b) { this.f4334k.f4364c = i10; return; } f fVar = this.f4334k; fVar.f4364c = i10; n0.f0(view, fVar); this.f4334k.f4363b = true; } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public void j() { super.j(); this.B = null; this.f4345v = null; } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public boolean k(CoordinatorLayout coordinatorLayout, View view, MotionEvent motionEvent) { d0.c cVar; if (!view.isShown()) { this.f4346w = true; return false; } int actionMasked = motionEvent.getActionMasked(); if (actionMasked == 0) { T(); } if (this.E == null) { this.E = VelocityTracker.obtain(); } this.E.addMovement(motionEvent); if (actionMasked == 0) { int x10 = (int) motionEvent.getX(); this.G = (int) motionEvent.getY(); if (this.f4344u != 2) { WeakReference weakReference = this.C; View view2 = weakReference != null ? (View) weakReference.get() : null; if (view2 != null && coordinatorLayout.z(view2, x10, this.G)) { this.F = motionEvent.getPointerId(motionEvent.getActionIndex()); this.H = true; } } this.f4346w = this.F == -1 && !coordinatorLayout.z(view, x10, this.G); } else if (actionMasked == 1 || actionMasked == 3) { this.H = false; this.F = -1; if (this.f4346w) { this.f4346w = false; return false; } } if (!this.f4346w && (cVar = this.f4345v) != null && cVar.G(motionEvent)) { return true; } WeakReference weakReference2 = this.C; View view3 = weakReference2 != null ? (View) weakReference2.get() : null; return (actionMasked != 2 || view3 == null || this.f4346w || this.f4344u == 1 || coordinatorLayout.z(view3, (int) motionEvent.getX(), (int) motionEvent.getY()) || this.f4345v == null || Math.abs(((float) this.G) - motionEvent.getY()) <= ((float) this.f4345v.u())) ? false : true; } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public boolean l(CoordinatorLayout coordinatorLayout, View view, int i10) { g gVar; if (n0.y(coordinatorLayout) && !n0.y(view)) { view.setFitsSystemWindows(true); } if (this.B == null) { this.f4329f = coordinatorLayout.getResources().getDimensionPixelSize(c3.c.f3472a); this.B = new WeakReference(view); if (this.f4330g && (gVar = this.f4331h) != null) { n0.q0(view, gVar); } g gVar2 = this.f4331h; if (gVar2 != null) { float f10 = this.f4341r; if (f10 == -1.0f) { f10 = n0.v(view); } gVar2.Q(f10); boolean z10 = this.f4344u == 3; this.f4333j = z10; this.f4331h.S(z10 ? 0.0f : 1.0f); } j0(); if (n0.z(view) == 0) { n0.w0(view, 1); } } if (this.f4345v == null) { this.f4345v = d0.c.m(coordinatorLayout, this.J); } int top = view.getTop(); coordinatorLayout.G(view, i10); this.f4349z = coordinatorLayout.getWidth(); int height = coordinatorLayout.getHeight(); this.A = height; this.f4337n = Math.max(0, height - view.getHeight()); L(); K(); int i11 = this.f4344u; if (i11 == 3) { n0.Y(view, R()); } else if (i11 == 6) { n0.Y(view, this.f4338o); } else if (this.f4342s && i11 == 5) { n0.Y(view, this.A); } else if (i11 == 4) { n0.Y(view, this.f4340q); } else if (i11 == 1 || i11 == 2) { n0.Y(view, top - view.getTop()); } this.C = new WeakReference(Q(view)); return true; } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public boolean o(CoordinatorLayout coordinatorLayout, View view, View view2, float f10, float f11) { WeakReference weakReference = this.C; if (weakReference == null || view2 != weakReference.get()) { return false; } return this.f4344u != 3 || super.o(coordinatorLayout, view, view2, f10, f11); } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public void q(CoordinatorLayout coordinatorLayout, View view, View view2, int i10, int i11, int[] iArr, int i12) { if (i12 == 1) { return; } WeakReference weakReference = this.C; if (view2 != (weakReference != null ? (View) weakReference.get() : null)) { return; } int top = view.getTop(); int i13 = top - i11; if (i11 > 0) { if (i13 < R()) { int R = top - R(); iArr[1] = R; n0.Y(view, -R); e0(3); } else { iArr[1] = i11; n0.Y(view, -i11); e0(1); } } else if (i11 < 0 && !view2.canScrollVertically(-1)) { int i14 = this.f4340q; if (i13 <= i14 || this.f4342s) { iArr[1] = i11; n0.Y(view, -i11); e0(1); } else { int i15 = top - i14; iArr[1] = i15; n0.Y(view, -i15); e0(4); } } P(view.getTop()); this.f4347x = i11; this.f4348y = true; } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public void t(CoordinatorLayout coordinatorLayout, View view, View view2, int i10, int i11, int i12, int i13, int i14, int[] iArr) { } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public void x(CoordinatorLayout coordinatorLayout, View view, Parcelable parcelable) { e eVar = (e) parcelable; super.x(coordinatorLayout, view, eVar.a()); U(eVar); int i10 = eVar.f4357c; if (i10 == 1 || i10 == 2) { this.f4344u = 4; } else { this.f4344u = i10; } } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.b public Parcelable y(CoordinatorLayout coordinatorLayout, View view) { return new e(super.y(coordinatorLayout, view), this); } protected static class e extends c0.a { public static final Parcelable.Creator CREATOR = new a(); /* renamed from: c, reason: collision with root package name */ final int f4357c; /* renamed from: d, reason: collision with root package name */ int f4358d; /* renamed from: e, reason: collision with root package name */ boolean f4359e; /* renamed from: f, reason: collision with root package name */ boolean f4360f; /* renamed from: g, reason: collision with root package name */ boolean f4361g; static class a implements Parcelable.ClassLoaderCreator { a() { } @Override // android.os.Parcelable.Creator /* renamed from: a, reason: merged with bridge method [inline-methods] */ public e createFromParcel(Parcel parcel) { return new e(parcel, (ClassLoader) null); } @Override // android.os.Parcelable.ClassLoaderCreator /* renamed from: b, reason: merged with bridge method [inline-methods] */ public e createFromParcel(Parcel parcel, ClassLoader classLoader) { return new e(parcel, classLoader); } @Override // android.os.Parcelable.Creator /* renamed from: c, reason: merged with bridge method [inline-methods] */ public e[] newArray(int i10) { return new e[i10]; } } public e(Parcel parcel, ClassLoader classLoader) { super(parcel, classLoader); this.f4357c = parcel.readInt(); this.f4358d = parcel.readInt(); this.f4359e = parcel.readInt() == 1; this.f4360f = parcel.readInt() == 1; this.f4361g = parcel.readInt() == 1; } @Override // c0.a, android.os.Parcelable public void writeToParcel(Parcel parcel, int i10) { super.writeToParcel(parcel, i10); parcel.writeInt(this.f4357c); parcel.writeInt(this.f4358d); parcel.writeInt(this.f4359e ? 1 : 0); parcel.writeInt(this.f4360f ? 1 : 0); parcel.writeInt(this.f4361g ? 1 : 0); } public e(Parcelable parcelable, BottomSheetBehavior bottomSheetBehavior) { super(parcelable); this.f4357c = bottomSheetBehavior.f4344u; this.f4358d = bottomSheetBehavior.f4327d; this.f4359e = bottomSheetBehavior.f4325b; this.f4360f = bottomSheetBehavior.f4342s; this.f4361g = bottomSheetBehavior.f4343t; } } public BottomSheetBehavior(Context context, AttributeSet attributeSet) { super(context, attributeSet); int i10; this.f4324a = 0; this.f4325b = true; this.f4334k = null; this.f4339p = 0.5f; this.f4341r = -1.0f; this.f4344u = 4; this.D = new ArrayList(); this.J = new c(); TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, j.f3685v); this.f4330g = obtainStyledAttributes.hasValue(j.F); int i11 = j.f3695x; boolean hasValue = obtainStyledAttributes.hasValue(i11); if (hasValue) { N(context, attributeSet, hasValue, m3.c.a(context, obtainStyledAttributes, i11)); } else { M(context, attributeSet, hasValue); } O(); this.f4341r = obtainStyledAttributes.getDimension(j.f3690w, -1.0f); int i12 = j.C; TypedValue peekValue = obtainStyledAttributes.peekValue(i12); if (peekValue != null && (i10 = peekValue.data) == -1) { Z(i10); } else { Z(obtainStyledAttributes.getDimensionPixelSize(i12, -1)); } Y(obtainStyledAttributes.getBoolean(j.B, false)); W(obtainStyledAttributes.getBoolean(j.f3705z, true)); c0(obtainStyledAttributes.getBoolean(j.E, false)); b0(obtainStyledAttributes.getInt(j.D, 0)); X(obtainStyledAttributes.getFloat(j.A, 0.5f)); V(obtainStyledAttributes.getInt(j.f3700y, 0)); obtainStyledAttributes.recycle(); this.f4326c = ViewConfiguration.get(context).getScaledMaximumFlingVelocity(); } }