package androidx.coordinatorlayout.widget; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.Region; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemClock; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Log; import android.util.SparseArray; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import android.view.ViewTreeObserver; import androidx.core.view.a1; import androidx.core.view.f0; import androidx.core.view.g0; import androidx.core.view.h0; import androidx.core.view.i0; import androidx.core.view.n0; import androidx.core.view.s; import com.igaworks.ssp.R; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; /* loaded from: classes.dex */ public class CoordinatorLayout extends ViewGroup implements f0, g0 { /* renamed from: u, reason: collision with root package name */ static final String f1339u; /* renamed from: v, reason: collision with root package name */ static final Class[] f1340v; /* renamed from: w, reason: collision with root package name */ static final ThreadLocal f1341w; /* renamed from: x, reason: collision with root package name */ static final Comparator f1342x; /* renamed from: y, reason: collision with root package name */ private static final y.e f1343y; /* renamed from: a, reason: collision with root package name */ private final List f1344a; /* renamed from: b, reason: collision with root package name */ private final androidx.coordinatorlayout.widget.b f1345b; /* renamed from: c, reason: collision with root package name */ private final List f1346c; /* renamed from: d, reason: collision with root package name */ private final List f1347d; /* renamed from: e, reason: collision with root package name */ private Paint f1348e; /* renamed from: f, reason: collision with root package name */ private final int[] f1349f; /* renamed from: g, reason: collision with root package name */ private final int[] f1350g; /* renamed from: h, reason: collision with root package name */ private boolean f1351h; /* renamed from: i, reason: collision with root package name */ private boolean f1352i; /* renamed from: j, reason: collision with root package name */ private int[] f1353j; /* renamed from: k, reason: collision with root package name */ private View f1354k; /* renamed from: l, reason: collision with root package name */ private View f1355l; /* renamed from: m, reason: collision with root package name */ private f f1356m; /* renamed from: n, reason: collision with root package name */ private boolean f1357n; /* renamed from: o, reason: collision with root package name */ private a1 f1358o; /* renamed from: p, reason: collision with root package name */ private boolean f1359p; /* renamed from: q, reason: collision with root package name */ private Drawable f1360q; /* renamed from: r, reason: collision with root package name */ ViewGroup.OnHierarchyChangeListener f1361r; /* renamed from: s, reason: collision with root package name */ private i0 f1362s; /* renamed from: t, reason: collision with root package name */ private final h0 f1363t; class a implements i0 { a() { } @Override // androidx.core.view.i0 public a1 a(View view, a1 a1Var) { return CoordinatorLayout.this.U(a1Var); } } public static abstract class b { public b() { } public boolean A(CoordinatorLayout coordinatorLayout, View view, View view2, View view3, int i10, int i11) { if (i11 == 0) { return z(coordinatorLayout, view, view2, view3, i10); } return false; } public void B(CoordinatorLayout coordinatorLayout, View view, View view2) { } public void C(CoordinatorLayout coordinatorLayout, View view, View view2, int i10) { if (i10 == 0) { B(coordinatorLayout, view, view2); } } public boolean D(CoordinatorLayout coordinatorLayout, View view, MotionEvent motionEvent) { return false; } public boolean a(CoordinatorLayout coordinatorLayout, View view) { return d(coordinatorLayout, view) > 0.0f; } public boolean b(CoordinatorLayout coordinatorLayout, View view, Rect rect) { return false; } public int c(CoordinatorLayout coordinatorLayout, View view) { return -16777216; } public float d(CoordinatorLayout coordinatorLayout, View view) { return 0.0f; } public boolean e(CoordinatorLayout coordinatorLayout, View view, View view2) { return false; } public a1 f(CoordinatorLayout coordinatorLayout, View view, a1 a1Var) { return a1Var; } public void g(e eVar) { } public boolean h(CoordinatorLayout coordinatorLayout, View view, View view2) { return false; } public void i(CoordinatorLayout coordinatorLayout, View view, View view2) { } public void j() { } public boolean k(CoordinatorLayout coordinatorLayout, View view, MotionEvent motionEvent) { return false; } public boolean l(CoordinatorLayout coordinatorLayout, View view, int i10) { return false; } public boolean m(CoordinatorLayout coordinatorLayout, View view, int i10, int i11, int i12, int i13) { return false; } public boolean n(CoordinatorLayout coordinatorLayout, View view, View view2, float f10, float f11, boolean z10) { return false; } public boolean o(CoordinatorLayout coordinatorLayout, View view, View view2, float f10, float f11) { return false; } public void p(CoordinatorLayout coordinatorLayout, View view, View view2, int i10, int i11, int[] iArr) { } public void q(CoordinatorLayout coordinatorLayout, View view, View view2, int i10, int i11, int[] iArr, int i12) { if (i12 == 0) { p(coordinatorLayout, view, view2, i10, i11, iArr); } } public void r(CoordinatorLayout coordinatorLayout, View view, View view2, int i10, int i11, int i12, int i13) { } public void s(CoordinatorLayout coordinatorLayout, View view, View view2, int i10, int i11, int i12, int i13, int i14) { if (i14 == 0) { r(coordinatorLayout, view, view2, i10, i11, i12, i13); } } public void t(CoordinatorLayout coordinatorLayout, View view, View view2, int i10, int i11, int i12, int i13, int i14, int[] iArr) { iArr[0] = iArr[0] + i12; iArr[1] = iArr[1] + i13; s(coordinatorLayout, view, view2, i10, i11, i12, i13, i14); } public void u(CoordinatorLayout coordinatorLayout, View view, View view2, View view3, int i10) { } public void v(CoordinatorLayout coordinatorLayout, View view, View view2, View view3, int i10, int i11) { if (i11 == 0) { u(coordinatorLayout, view, view2, view3, i10); } } public boolean w(CoordinatorLayout coordinatorLayout, View view, Rect rect, boolean z10) { return false; } public void x(CoordinatorLayout coordinatorLayout, View view, Parcelable parcelable) { } public Parcelable y(CoordinatorLayout coordinatorLayout, View view) { return View.BaseSavedState.EMPTY_STATE; } public boolean z(CoordinatorLayout coordinatorLayout, View view, View view2, View view3, int i10) { return false; } public b(Context context, AttributeSet attributeSet) { } } @Retention(RetentionPolicy.RUNTIME) public @interface c { Class value(); } private class d implements ViewGroup.OnHierarchyChangeListener { d() { } @Override // android.view.ViewGroup.OnHierarchyChangeListener public void onChildViewAdded(View view, View view2) { ViewGroup.OnHierarchyChangeListener onHierarchyChangeListener = CoordinatorLayout.this.f1361r; if (onHierarchyChangeListener != null) { onHierarchyChangeListener.onChildViewAdded(view, view2); } } @Override // android.view.ViewGroup.OnHierarchyChangeListener public void onChildViewRemoved(View view, View view2) { CoordinatorLayout.this.F(2); ViewGroup.OnHierarchyChangeListener onHierarchyChangeListener = CoordinatorLayout.this.f1361r; if (onHierarchyChangeListener != null) { onHierarchyChangeListener.onChildViewRemoved(view, view2); } } } class f implements ViewTreeObserver.OnPreDrawListener { f() { } @Override // android.view.ViewTreeObserver.OnPreDrawListener public boolean onPreDraw() { CoordinatorLayout.this.F(0); return true; } } static class h implements Comparator { h() { } @Override // java.util.Comparator /* renamed from: a, reason: merged with bridge method [inline-methods] */ public int compare(View view, View view2) { float L = n0.L(view); float L2 = n0.L(view2); if (L > L2) { return -1; } return L < L2 ? 1 : 0; } } static { Package r02 = CoordinatorLayout.class.getPackage(); f1339u = r02 != null ? r02.getName() : null; f1342x = new h(); f1340v = new Class[]{Context.class, AttributeSet.class}; f1341w = new ThreadLocal(); f1343y = new y.g(12); } public CoordinatorLayout(Context context, AttributeSet attributeSet) { this(context, attributeSet, n.a.f11921a); } private void A(View view, int i10) { e eVar = (e) view.getLayoutParams(); Rect a10 = a(); a10.set(getPaddingLeft() + ((ViewGroup.MarginLayoutParams) eVar).leftMargin, getPaddingTop() + ((ViewGroup.MarginLayoutParams) eVar).topMargin, (getWidth() - getPaddingRight()) - ((ViewGroup.MarginLayoutParams) eVar).rightMargin, (getHeight() - getPaddingBottom()) - ((ViewGroup.MarginLayoutParams) eVar).bottomMargin); if (this.f1358o != null && n0.y(this) && !n0.y(view)) { a10.left += this.f1358o.i(); a10.top += this.f1358o.k(); a10.right -= this.f1358o.j(); a10.bottom -= this.f1358o.h(); } Rect a11 = a(); s.a(Q(eVar.f1368c), view.getMeasuredWidth(), view.getMeasuredHeight(), a10, a11, i10); view.layout(a11.left, a11.top, a11.right, a11.bottom); M(a10); M(a11); } private void B(View view, View view2, int i10) { Rect a10 = a(); Rect a11 = a(); try { r(view2, a10); s(view, i10, a10, a11); view.layout(a11.left, a11.top, a11.right, a11.bottom); } finally { M(a10); M(a11); } } private void C(View view, int i10, int i11) { e eVar = (e) view.getLayoutParams(); int b10 = s.b(R(eVar.f1368c), i11); int i12 = b10 & 7; int i13 = b10 & R.styleable.AppCompatTheme_toolbarNavigationButtonStyle; int width = getWidth(); int height = getHeight(); int measuredWidth = view.getMeasuredWidth(); int measuredHeight = view.getMeasuredHeight(); if (i11 == 1) { i10 = width - i10; } int u10 = u(i10) - measuredWidth; if (i12 == 1) { u10 += measuredWidth / 2; } else if (i12 == 5) { u10 += measuredWidth; } int i14 = 0; if (i13 == 16) { i14 = 0 + (measuredHeight / 2); } else if (i13 == 80) { i14 = measuredHeight + 0; } int max = Math.max(getPaddingLeft() + ((ViewGroup.MarginLayoutParams) eVar).leftMargin, Math.min(u10, ((width - getPaddingRight()) - measuredWidth) - ((ViewGroup.MarginLayoutParams) eVar).rightMargin)); int max2 = Math.max(getPaddingTop() + ((ViewGroup.MarginLayoutParams) eVar).topMargin, Math.min(i14, ((height - getPaddingBottom()) - measuredHeight) - ((ViewGroup.MarginLayoutParams) eVar).bottomMargin)); view.layout(max, max2, measuredWidth + max, measuredHeight + max2); } private void D(View view, Rect rect, int i10) { boolean z10; boolean z11; int width; int i11; int i12; int i13; int height; int i14; int i15; int i16; if (n0.R(view) && view.getWidth() > 0 && view.getHeight() > 0) { e eVar = (e) view.getLayoutParams(); b e10 = eVar.e(); Rect a10 = a(); Rect a11 = a(); a11.set(view.getLeft(), view.getTop(), view.getRight(), view.getBottom()); if (e10 == null || !e10.b(this, view, a10)) { a10.set(a11); } else if (!a11.contains(a10)) { throw new IllegalArgumentException("Rect should be within the child's bounds. Rect:" + a10.toShortString() + " | Bounds:" + a11.toShortString()); } M(a11); if (a10.isEmpty()) { M(a10); return; } int b10 = s.b(eVar.f1373h, i10); boolean z12 = true; if ((b10 & 48) != 48 || (i15 = (a10.top - ((ViewGroup.MarginLayoutParams) eVar).topMargin) - eVar.f1375j) >= (i16 = rect.top)) { z10 = false; } else { T(view, i16 - i15); z10 = true; } if ((b10 & 80) == 80 && (height = ((getHeight() - a10.bottom) - ((ViewGroup.MarginLayoutParams) eVar).bottomMargin) + eVar.f1375j) < (i14 = rect.bottom)) { T(view, height - i14); z10 = true; } if (!z10) { T(view, 0); } if ((b10 & 3) != 3 || (i12 = (a10.left - ((ViewGroup.MarginLayoutParams) eVar).leftMargin) - eVar.f1374i) >= (i13 = rect.left)) { z11 = false; } else { S(view, i13 - i12); z11 = true; } if ((b10 & 5) != 5 || (width = ((getWidth() - a10.right) - ((ViewGroup.MarginLayoutParams) eVar).rightMargin) + eVar.f1374i) >= (i11 = rect.right)) { z12 = z11; } else { S(view, width - i11); } if (!z12) { S(view, 0); } M(a10); } } static b I(Context context, AttributeSet attributeSet, String str) { if (TextUtils.isEmpty(str)) { return null; } if (str.startsWith(".")) { str = context.getPackageName() + str; } else if (str.indexOf(46) < 0) { String str2 = f1339u; if (!TextUtils.isEmpty(str2)) { str = str2 + '.' + str; } } try { ThreadLocal threadLocal = f1341w; Map map = (Map) threadLocal.get(); if (map == null) { map = new HashMap(); threadLocal.set(map); } Constructor constructor = (Constructor) map.get(str); if (constructor == null) { constructor = Class.forName(str, false, context.getClassLoader()).getConstructor(f1340v); constructor.setAccessible(true); map.put(str, constructor); } return (b) constructor.newInstance(context, attributeSet); } catch (Exception e10) { throw new RuntimeException("Could not inflate Behavior subclass " + str, e10); } } private boolean J(MotionEvent motionEvent, int i10) { int actionMasked = motionEvent.getActionMasked(); List list = this.f1346c; x(list); int size = list.size(); MotionEvent motionEvent2 = null; boolean z10 = false; boolean z11 = false; for (int i11 = 0; i11 < size; i11++) { View view = (View) list.get(i11); e eVar = (e) view.getLayoutParams(); b e10 = eVar.e(); if (!(z10 || z11) || actionMasked == 0) { if (!z10 && e10 != null) { if (i10 == 0) { z10 = e10.k(this, view, motionEvent); } else if (i10 == 1) { z10 = e10.D(this, view, motionEvent); } if (z10) { this.f1354k = view; } } boolean c10 = eVar.c(); boolean h10 = eVar.h(this, view); z11 = h10 && !c10; if (h10 && !z11) { break; } } else if (e10 != null) { if (motionEvent2 == null) { long uptimeMillis = SystemClock.uptimeMillis(); motionEvent2 = MotionEvent.obtain(uptimeMillis, uptimeMillis, 3, 0.0f, 0.0f, 0); } if (i10 == 0) { e10.k(this, view, motionEvent2); } else if (i10 == 1) { e10.D(this, view, motionEvent2); } } } list.clear(); return z10; } private void K() { this.f1344a.clear(); this.f1345b.c(); int childCount = getChildCount(); for (int i10 = 0; i10 < childCount; i10++) { View childAt = getChildAt(i10); e w10 = w(childAt); w10.d(this, childAt); this.f1345b.b(childAt); for (int i11 = 0; i11 < childCount; i11++) { if (i11 != i10) { View childAt2 = getChildAt(i11); if (w10.b(this, childAt, childAt2)) { if (!this.f1345b.d(childAt2)) { this.f1345b.b(childAt2); } this.f1345b.a(childAt2, childAt); } } } } this.f1344a.addAll(this.f1345b.h()); Collections.reverse(this.f1344a); } private static void M(Rect rect) { rect.setEmpty(); f1343y.a(rect); } private void O(boolean z10) { int childCount = getChildCount(); for (int i10 = 0; i10 < childCount; i10++) { View childAt = getChildAt(i10); b e10 = ((e) childAt.getLayoutParams()).e(); if (e10 != null) { long uptimeMillis = SystemClock.uptimeMillis(); MotionEvent obtain = MotionEvent.obtain(uptimeMillis, uptimeMillis, 3, 0.0f, 0.0f, 0); if (z10) { e10.k(this, childAt, obtain); } else { e10.D(this, childAt, obtain); } obtain.recycle(); } } for (int i11 = 0; i11 < childCount; i11++) { ((e) getChildAt(i11).getLayoutParams()).l(); } this.f1354k = null; this.f1351h = false; } private static int P(int i10) { if (i10 == 0) { return 17; } return i10; } private static int Q(int i10) { if ((i10 & 7) == 0) { i10 |= 8388611; } return (i10 & R.styleable.AppCompatTheme_toolbarNavigationButtonStyle) == 0 ? i10 | 48 : i10; } private static int R(int i10) { if (i10 == 0) { return 8388661; } return i10; } private void S(View view, int i10) { e eVar = (e) view.getLayoutParams(); int i11 = eVar.f1374i; if (i11 != i10) { n0.X(view, i10 - i11); eVar.f1374i = i10; } } private void T(View view, int i10) { e eVar = (e) view.getLayoutParams(); int i11 = eVar.f1375j; if (i11 != i10) { n0.Y(view, i10 - i11); eVar.f1375j = i10; } } private void V() { if (!n0.y(this)) { n0.y0(this, null); return; } if (this.f1362s == null) { this.f1362s = new a(); } n0.y0(this, this.f1362s); setSystemUiVisibility(1280); } private static Rect a() { Rect rect = (Rect) f1343y.b(); return rect == null ? new Rect() : rect; } private static int c(int i10, int i11, int i12) { return i10 < i11 ? i11 : i10 > i12 ? i12 : i10; } private void d(e eVar, Rect rect, int i10, int i11) { int width = getWidth(); int height = getHeight(); int max = Math.max(getPaddingLeft() + ((ViewGroup.MarginLayoutParams) eVar).leftMargin, Math.min(rect.left, ((width - getPaddingRight()) - i10) - ((ViewGroup.MarginLayoutParams) eVar).rightMargin)); int max2 = Math.max(getPaddingTop() + ((ViewGroup.MarginLayoutParams) eVar).topMargin, Math.min(rect.top, ((height - getPaddingBottom()) - i11) - ((ViewGroup.MarginLayoutParams) eVar).bottomMargin)); rect.set(max, max2, i10 + max, i11 + max2); } private a1 e(a1 a1Var) { b e10; if (a1Var.n()) { return a1Var; } int childCount = getChildCount(); for (int i10 = 0; i10 < childCount; i10++) { View childAt = getChildAt(i10); if (n0.y(childAt) && (e10 = ((e) childAt.getLayoutParams()).e()) != null) { a1Var = e10.f(this, childAt, a1Var); if (a1Var.n()) { break; } } } return a1Var; } private void t(View view, int i10, Rect rect, Rect rect2, e eVar, int i11, int i12) { int b10 = s.b(P(eVar.f1368c), i10); int b11 = s.b(Q(eVar.f1369d), i10); int i13 = b10 & 7; int i14 = b10 & R.styleable.AppCompatTheme_toolbarNavigationButtonStyle; int i15 = b11 & 7; int i16 = b11 & R.styleable.AppCompatTheme_toolbarNavigationButtonStyle; int width = i15 != 1 ? i15 != 5 ? rect.left : rect.right : rect.left + (rect.width() / 2); int height = i16 != 16 ? i16 != 80 ? rect.top : rect.bottom : rect.top + (rect.height() / 2); if (i13 == 1) { width -= i11 / 2; } else if (i13 != 5) { width -= i11; } if (i14 == 16) { height -= i12 / 2; } else if (i14 != 80) { height -= i12; } rect2.set(width, height, i11 + width, i12 + height); } private int u(int i10) { int[] iArr = this.f1353j; if (iArr == null) { Log.e("CoordinatorLayout", "No keylines defined for " + this + " - attempted index lookup " + i10); return 0; } if (i10 >= 0 && i10 < iArr.length) { return iArr[i10]; } Log.e("CoordinatorLayout", "Keyline index " + i10 + " out of range for " + this); return 0; } private void x(List list) { list.clear(); boolean isChildrenDrawingOrderEnabled = isChildrenDrawingOrderEnabled(); int childCount = getChildCount(); for (int i10 = childCount - 1; i10 >= 0; i10--) { list.add(getChildAt(isChildrenDrawingOrderEnabled ? getChildDrawingOrder(childCount, i10) : i10)); } Comparator comparator = f1342x; if (comparator != null) { Collections.sort(list, comparator); } } private boolean y(View view) { return this.f1345b.i(view); } void E(View view, int i10) { b e10; e eVar = (e) view.getLayoutParams(); if (eVar.f1376k != null) { Rect a10 = a(); Rect a11 = a(); Rect a12 = a(); r(eVar.f1376k, a10); p(view, false, a11); int measuredWidth = view.getMeasuredWidth(); int measuredHeight = view.getMeasuredHeight(); t(view, i10, a10, a12, eVar, measuredWidth, measuredHeight); boolean z10 = (a12.left == a11.left && a12.top == a11.top) ? false : true; d(eVar, a12, measuredWidth, measuredHeight); int i11 = a12.left - a11.left; int i12 = a12.top - a11.top; if (i11 != 0) { n0.X(view, i11); } if (i12 != 0) { n0.Y(view, i12); } if (z10 && (e10 = eVar.e()) != null) { e10.h(this, view, eVar.f1376k); } M(a10); M(a11); M(a12); } } final void F(int i10) { boolean z10; int B = n0.B(this); int size = this.f1344a.size(); Rect a10 = a(); Rect a11 = a(); Rect a12 = a(); for (int i11 = 0; i11 < size; i11++) { View view = (View) this.f1344a.get(i11); e eVar = (e) view.getLayoutParams(); if (i10 != 0 || view.getVisibility() != 8) { for (int i12 = 0; i12 < i11; i12++) { if (eVar.f1377l == ((View) this.f1344a.get(i12))) { E(view, B); } } p(view, true, a11); if (eVar.f1372g != 0 && !a11.isEmpty()) { int b10 = s.b(eVar.f1372g, B); int i13 = b10 & R.styleable.AppCompatTheme_toolbarNavigationButtonStyle; if (i13 == 48) { a10.top = Math.max(a10.top, a11.bottom); } else if (i13 == 80) { a10.bottom = Math.max(a10.bottom, getHeight() - a11.top); } int i14 = b10 & 7; if (i14 == 3) { a10.left = Math.max(a10.left, a11.right); } else if (i14 == 5) { a10.right = Math.max(a10.right, getWidth() - a11.left); } } if (eVar.f1373h != 0 && view.getVisibility() == 0) { D(view, a10, B); } if (i10 != 2) { v(view, a12); if (!a12.equals(a11)) { L(view, a11); } } for (int i15 = i11 + 1; i15 < size; i15++) { View view2 = (View) this.f1344a.get(i15); e eVar2 = (e) view2.getLayoutParams(); b e10 = eVar2.e(); if (e10 != null && e10.e(this, view2, view)) { if (i10 == 0 && eVar2.f()) { eVar2.j(); } else { if (i10 != 2) { z10 = e10.h(this, view2, view); } else { e10.i(this, view2, view); z10 = true; } if (i10 == 1) { eVar2.o(z10); } } } } } } M(a10); M(a11); M(a12); } public void G(View view, int i10) { e eVar = (e) view.getLayoutParams(); if (eVar.a()) { throw new IllegalStateException("An anchor may not be changed after CoordinatorLayout measurement begins before layout is complete."); } View view2 = eVar.f1376k; if (view2 != null) { B(view, view2, i10); return; } int i11 = eVar.f1370e; if (i11 >= 0) { C(view, i11, i10); } else { A(view, i10); } } public void H(View view, int i10, int i11, int i12, int i13) { measureChildWithMargins(view, i10, i11, i12, i13); } void L(View view, Rect rect) { ((e) view.getLayoutParams()).p(rect); } void N() { if (this.f1352i && this.f1356m != null) { getViewTreeObserver().removeOnPreDrawListener(this.f1356m); } this.f1357n = false; } final a1 U(a1 a1Var) { if (y.c.a(this.f1358o, a1Var)) { return a1Var; } this.f1358o = a1Var; boolean z10 = a1Var != null && a1Var.k() > 0; this.f1359p = z10; setWillNotDraw(!z10 && getBackground() == null); a1 e10 = e(a1Var); requestLayout(); return e10; } void b() { if (this.f1352i) { if (this.f1356m == null) { this.f1356m = new f(); } getViewTreeObserver().addOnPreDrawListener(this.f1356m); } this.f1357n = true; } @Override // android.view.ViewGroup protected boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) { return (layoutParams instanceof e) && super.checkLayoutParams(layoutParams); } @Override // android.view.ViewGroup protected boolean drawChild(Canvas canvas, View view, long j10) { e eVar = (e) view.getLayoutParams(); b bVar = eVar.f1366a; if (bVar != null) { float d10 = bVar.d(this, view); if (d10 > 0.0f) { if (this.f1348e == null) { this.f1348e = new Paint(); } this.f1348e.setColor(eVar.f1366a.c(this, view)); this.f1348e.setAlpha(c(Math.round(d10 * 255.0f), 0, 255)); int save = canvas.save(); if (view.isOpaque()) { canvas.clipRect(view.getLeft(), view.getTop(), view.getRight(), view.getBottom(), Region.Op.DIFFERENCE); } canvas.drawRect(getPaddingLeft(), getPaddingTop(), getWidth() - getPaddingRight(), getHeight() - getPaddingBottom(), this.f1348e); canvas.restoreToCount(save); } } return super.drawChild(canvas, view, j10); } @Override // android.view.ViewGroup, android.view.View protected void drawableStateChanged() { super.drawableStateChanged(); int[] drawableState = getDrawableState(); Drawable drawable = this.f1360q; boolean z10 = false; if (drawable != null && drawable.isStateful()) { z10 = false | drawable.setState(drawableState); } if (z10) { invalidate(); } } void f() { int childCount = getChildCount(); boolean z10 = false; int i10 = 0; while (true) { if (i10 >= childCount) { break; } if (y(getChildAt(i10))) { z10 = true; break; } i10++; } if (z10 != this.f1357n) { if (z10) { b(); } else { N(); } } } /* JADX INFO: Access modifiers changed from: protected */ @Override // android.view.ViewGroup /* renamed from: g, reason: merged with bridge method [inline-methods] */ public e generateDefaultLayoutParams() { return new e(-2, -2); } final List getDependencySortedChildren() { K(); return Collections.unmodifiableList(this.f1344a); } public final a1 getLastWindowInsets() { return this.f1358o; } @Override // android.view.ViewGroup public int getNestedScrollAxes() { return this.f1363t.a(); } public Drawable getStatusBarBackground() { return this.f1360q; } @Override // android.view.View protected int getSuggestedMinimumHeight() { return Math.max(super.getSuggestedMinimumHeight(), getPaddingTop() + getPaddingBottom()); } @Override // android.view.View protected int getSuggestedMinimumWidth() { return Math.max(super.getSuggestedMinimumWidth(), getPaddingLeft() + getPaddingRight()); } @Override // android.view.ViewGroup /* renamed from: h, reason: merged with bridge method [inline-methods] */ public e generateLayoutParams(AttributeSet attributeSet) { return new e(getContext(), attributeSet); } /* JADX INFO: Access modifiers changed from: protected */ @Override // android.view.ViewGroup /* renamed from: i, reason: merged with bridge method [inline-methods] */ public e generateLayoutParams(ViewGroup.LayoutParams layoutParams) { return layoutParams instanceof e ? new e((e) layoutParams) : layoutParams instanceof ViewGroup.MarginLayoutParams ? new e((ViewGroup.MarginLayoutParams) layoutParams) : new e(layoutParams); } @Override // androidx.core.view.g0 public void j(View view, int i10, int i11, int i12, int i13, int i14, int[] iArr) { b e10; int childCount = getChildCount(); boolean z10 = false; int i15 = 0; int i16 = 0; for (int i17 = 0; i17 < childCount; i17++) { View childAt = getChildAt(i17); if (childAt.getVisibility() != 8) { e eVar = (e) childAt.getLayoutParams(); if (eVar.i(i14) && (e10 = eVar.e()) != null) { int[] iArr2 = this.f1349f; iArr2[0] = 0; iArr2[1] = 0; e10.t(this, childAt, view, i10, i11, i12, i13, i14, iArr2); int[] iArr3 = this.f1349f; i15 = i12 > 0 ? Math.max(i15, iArr3[0]) : Math.min(i15, iArr3[0]); i16 = i13 > 0 ? Math.max(i16, this.f1349f[1]) : Math.min(i16, this.f1349f[1]); z10 = true; } } } iArr[0] = iArr[0] + i15; iArr[1] = iArr[1] + i16; if (z10) { F(1); } } @Override // androidx.core.view.f0 public void k(View view, int i10, int i11, int i12, int i13, int i14) { j(view, i10, i11, i12, i13, 0, this.f1350g); } @Override // androidx.core.view.f0 public boolean l(View view, View view2, int i10, int i11) { int childCount = getChildCount(); boolean z10 = false; for (int i12 = 0; i12 < childCount; i12++) { View childAt = getChildAt(i12); if (childAt.getVisibility() != 8) { e eVar = (e) childAt.getLayoutParams(); b e10 = eVar.e(); if (e10 != null) { boolean A = e10.A(this, childAt, view, view2, i10, i11); z10 |= A; eVar.q(i11, A); } else { eVar.q(i11, false); } } } return z10; } @Override // androidx.core.view.f0 public void m(View view, View view2, int i10, int i11) { b e10; this.f1363t.c(view, view2, i10, i11); this.f1355l = view2; int childCount = getChildCount(); for (int i12 = 0; i12 < childCount; i12++) { View childAt = getChildAt(i12); e eVar = (e) childAt.getLayoutParams(); if (eVar.i(i11) && (e10 = eVar.e()) != null) { e10.v(this, childAt, view, view2, i10, i11); } } } @Override // androidx.core.view.f0 public void n(View view, int i10) { this.f1363t.d(view, i10); int childCount = getChildCount(); for (int i11 = 0; i11 < childCount; i11++) { View childAt = getChildAt(i11); e eVar = (e) childAt.getLayoutParams(); if (eVar.i(i10)) { b e10 = eVar.e(); if (e10 != null) { e10.C(this, childAt, view, i10); } eVar.k(i10); eVar.j(); } } this.f1355l = null; } @Override // androidx.core.view.f0 public void o(View view, int i10, int i11, int[] iArr, int i12) { b e10; int childCount = getChildCount(); boolean z10 = false; int i13 = 0; int i14 = 0; for (int i15 = 0; i15 < childCount; i15++) { View childAt = getChildAt(i15); if (childAt.getVisibility() != 8) { e eVar = (e) childAt.getLayoutParams(); if (eVar.i(i12) && (e10 = eVar.e()) != null) { int[] iArr2 = this.f1349f; iArr2[0] = 0; iArr2[1] = 0; e10.q(this, childAt, view, i10, i11, iArr2, i12); int[] iArr3 = this.f1349f; i13 = i10 > 0 ? Math.max(i13, iArr3[0]) : Math.min(i13, iArr3[0]); int[] iArr4 = this.f1349f; i14 = i11 > 0 ? Math.max(i14, iArr4[1]) : Math.min(i14, iArr4[1]); z10 = true; } } } iArr[0] = i13; iArr[1] = i14; if (z10) { F(1); } } @Override // android.view.ViewGroup, android.view.View public void onAttachedToWindow() { super.onAttachedToWindow(); O(false); if (this.f1357n) { if (this.f1356m == null) { this.f1356m = new f(); } getViewTreeObserver().addOnPreDrawListener(this.f1356m); } if (this.f1358o == null && n0.y(this)) { n0.k0(this); } this.f1352i = true; } @Override // android.view.ViewGroup, android.view.View public void onDetachedFromWindow() { super.onDetachedFromWindow(); O(false); if (this.f1357n && this.f1356m != null) { getViewTreeObserver().removeOnPreDrawListener(this.f1356m); } View view = this.f1355l; if (view != null) { onStopNestedScroll(view); } this.f1352i = false; } @Override // android.view.View public void onDraw(Canvas canvas) { super.onDraw(canvas); if (!this.f1359p || this.f1360q == null) { return; } a1 a1Var = this.f1358o; int k10 = a1Var != null ? a1Var.k() : 0; if (k10 > 0) { this.f1360q.setBounds(0, 0, getWidth(), k10); this.f1360q.draw(canvas); } } @Override // android.view.ViewGroup public boolean onInterceptTouchEvent(MotionEvent motionEvent) { int actionMasked = motionEvent.getActionMasked(); if (actionMasked == 0) { O(true); } boolean J = J(motionEvent, 0); if (actionMasked == 1 || actionMasked == 3) { O(true); } return J; } @Override // android.view.ViewGroup, android.view.View protected void onLayout(boolean z10, int i10, int i11, int i12, int i13) { b e10; int B = n0.B(this); int size = this.f1344a.size(); for (int i14 = 0; i14 < size; i14++) { View view = (View) this.f1344a.get(i14); if (view.getVisibility() != 8 && ((e10 = ((e) view.getLayoutParams()).e()) == null || !e10.l(this, view, B))) { G(view, B); } } } /* JADX WARN: Code restructure failed: missing block: B:30:0x011a, code lost: if (r0.m(r30, r20, r11, r21, r23, 0) == false) goto L46; */ /* JADX WARN: Removed duplicated region for block: B:29:0x00fb */ /* JADX WARN: Removed duplicated region for block: B:34:0x011d */ @Override // 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 onMeasure(int r31, int r32) { /* Method dump skipped, instructions count: 391 To view this dump change 'Code comments level' option to 'DEBUG' */ throw new UnsupportedOperationException("Method not decompiled: androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasure(int, int):void"); } @Override // android.view.ViewGroup, android.view.ViewParent public boolean onNestedFling(View view, float f10, float f11, boolean z10) { b e10; int childCount = getChildCount(); boolean z11 = false; for (int i10 = 0; i10 < childCount; i10++) { View childAt = getChildAt(i10); if (childAt.getVisibility() != 8) { e eVar = (e) childAt.getLayoutParams(); if (eVar.i(0) && (e10 = eVar.e()) != null) { z11 |= e10.n(this, childAt, view, f10, f11, z10); } } } if (z11) { F(1); } return z11; } @Override // android.view.ViewGroup, android.view.ViewParent public boolean onNestedPreFling(View view, float f10, float f11) { b e10; int childCount = getChildCount(); boolean z10 = false; for (int i10 = 0; i10 < childCount; i10++) { View childAt = getChildAt(i10); if (childAt.getVisibility() != 8) { e eVar = (e) childAt.getLayoutParams(); if (eVar.i(0) && (e10 = eVar.e()) != null) { z10 |= e10.o(this, childAt, view, f10, f11); } } } return z10; } @Override // android.view.ViewGroup, android.view.ViewParent public void onNestedPreScroll(View view, int i10, int i11, int[] iArr) { o(view, i10, i11, iArr, 0); } @Override // android.view.ViewGroup, android.view.ViewParent public void onNestedScroll(View view, int i10, int i11, int i12, int i13) { k(view, i10, i11, i12, i13, 0); } @Override // android.view.ViewGroup, android.view.ViewParent public void onNestedScrollAccepted(View view, View view2, int i10) { m(view, view2, i10, 0); } @Override // android.view.View protected void onRestoreInstanceState(Parcelable parcelable) { Parcelable parcelable2; if (!(parcelable instanceof g)) { super.onRestoreInstanceState(parcelable); return; } g gVar = (g) parcelable; super.onRestoreInstanceState(gVar.a()); SparseArray sparseArray = gVar.f1385c; int childCount = getChildCount(); for (int i10 = 0; i10 < childCount; i10++) { View childAt = getChildAt(i10); int id = childAt.getId(); b e10 = w(childAt).e(); if (id != -1 && e10 != null && (parcelable2 = (Parcelable) sparseArray.get(id)) != null) { e10.x(this, childAt, parcelable2); } } } @Override // android.view.View protected Parcelable onSaveInstanceState() { Parcelable y10; g gVar = new g(super.onSaveInstanceState()); SparseArray sparseArray = new SparseArray(); int childCount = getChildCount(); for (int i10 = 0; i10 < childCount; i10++) { View childAt = getChildAt(i10); int id = childAt.getId(); b e10 = ((e) childAt.getLayoutParams()).e(); if (id != -1 && e10 != null && (y10 = e10.y(this, childAt)) != null) { sparseArray.append(id, y10); } } gVar.f1385c = sparseArray; return gVar; } @Override // android.view.ViewGroup, android.view.ViewParent public boolean onStartNestedScroll(View view, View view2, int i10) { return l(view, view2, i10, 0); } @Override // android.view.ViewGroup, android.view.ViewParent public void onStopNestedScroll(View view) { n(view, 0); } /* JADX WARN: Code restructure failed: missing block: B:4:0x0012, code lost: if (r3 != false) goto L8; */ /* JADX WARN: Removed duplicated region for block: B:10:0x004c */ /* JADX WARN: Removed duplicated region for block: B:17:0x0037 */ /* JADX WARN: Removed duplicated region for block: B:8:0x0031 */ @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) { /* r17 = this; r0 = r17 r1 = r18 int r2 = r18.getActionMasked() android.view.View r3 = r0.f1354k r4 = 1 r5 = 0 if (r3 != 0) goto L15 boolean r3 = r0.J(r1, r4) if (r3 == 0) goto L2b goto L16 L15: r3 = 0 L16: android.view.View r6 = r0.f1354k android.view.ViewGroup$LayoutParams r6 = r6.getLayoutParams() androidx.coordinatorlayout.widget.CoordinatorLayout$e r6 = (androidx.coordinatorlayout.widget.CoordinatorLayout.e) r6 androidx.coordinatorlayout.widget.CoordinatorLayout$b r6 = r6.e() if (r6 == 0) goto L2b android.view.View r7 = r0.f1354k boolean r6 = r6.D(r0, r7, r1) goto L2c L2b: r6 = 0 L2c: android.view.View r7 = r0.f1354k r8 = 0 if (r7 != 0) goto L37 boolean r1 = super.onTouchEvent(r18) r6 = r6 | r1 goto L4a L37: if (r3 == 0) goto L4a long r11 = android.os.SystemClock.uptimeMillis() r13 = 3 r14 = 0 r15 = 0 r16 = 0 r9 = r11 android.view.MotionEvent r8 = android.view.MotionEvent.obtain(r9, r11, r13, r14, r15, r16) super.onTouchEvent(r8) L4a: if (r8 == 0) goto L4f r8.recycle() L4f: if (r2 == r4) goto L54 r1 = 3 if (r2 != r1) goto L57 L54: r0.O(r5) L57: return r6 */ throw new UnsupportedOperationException("Method not decompiled: androidx.coordinatorlayout.widget.CoordinatorLayout.onTouchEvent(android.view.MotionEvent):boolean"); } void p(View view, boolean z10, Rect rect) { if (view.isLayoutRequested() || view.getVisibility() == 8) { rect.setEmpty(); } else if (z10) { r(view, rect); } else { rect.set(view.getLeft(), view.getTop(), view.getRight(), view.getBottom()); } } public List q(View view) { List g10 = this.f1345b.g(view); this.f1347d.clear(); if (g10 != null) { this.f1347d.addAll(g10); } return this.f1347d; } void r(View view, Rect rect) { androidx.coordinatorlayout.widget.c.a(this, view, rect); } @Override // android.view.ViewGroup, android.view.ViewParent public boolean requestChildRectangleOnScreen(View view, Rect rect, boolean z10) { b e10 = ((e) view.getLayoutParams()).e(); if (e10 == null || !e10.w(this, view, rect, z10)) { return super.requestChildRectangleOnScreen(view, rect, z10); } return true; } @Override // android.view.ViewGroup, android.view.ViewParent public void requestDisallowInterceptTouchEvent(boolean z10) { super.requestDisallowInterceptTouchEvent(z10); if (!z10 || this.f1351h) { return; } O(false); this.f1351h = true; } void s(View view, int i10, Rect rect, Rect rect2) { e eVar = (e) view.getLayoutParams(); int measuredWidth = view.getMeasuredWidth(); int measuredHeight = view.getMeasuredHeight(); t(view, i10, rect, rect2, eVar, measuredWidth, measuredHeight); d(eVar, rect2, measuredWidth, measuredHeight); } @Override // android.view.View public void setFitsSystemWindows(boolean z10) { super.setFitsSystemWindows(z10); V(); } @Override // android.view.ViewGroup public void setOnHierarchyChangeListener(ViewGroup.OnHierarchyChangeListener onHierarchyChangeListener) { this.f1361r = onHierarchyChangeListener; } public void setStatusBarBackground(Drawable drawable) { Drawable drawable2 = this.f1360q; if (drawable2 != drawable) { if (drawable2 != null) { drawable2.setCallback(null); } Drawable mutate = drawable != null ? drawable.mutate() : null; this.f1360q = mutate; if (mutate != null) { if (mutate.isStateful()) { this.f1360q.setState(getDrawableState()); } r.c.m(this.f1360q, n0.B(this)); this.f1360q.setVisible(getVisibility() == 0, false); this.f1360q.setCallback(this); } n0.e0(this); } } public void setStatusBarBackgroundColor(int i10) { setStatusBarBackground(new ColorDrawable(i10)); } public void setStatusBarBackgroundResource(int i10) { setStatusBarBackground(i10 != 0 ? androidx.core.content.a.getDrawable(getContext(), i10) : null); } @Override // android.view.View public void setVisibility(int i10) { super.setVisibility(i10); boolean z10 = i10 == 0; Drawable drawable = this.f1360q; if (drawable == null || drawable.isVisible() == z10) { return; } this.f1360q.setVisible(z10, false); } void v(View view, Rect rect) { rect.set(((e) view.getLayoutParams()).g()); } @Override // android.view.View protected boolean verifyDrawable(Drawable drawable) { return super.verifyDrawable(drawable) || drawable == this.f1360q; } e w(View view) { e eVar = (e) view.getLayoutParams(); if (!eVar.f1367b) { c cVar = null; for (Class cls = view.getClass(); cls != null; cls = cls.getSuperclass()) { cVar = (c) cls.getAnnotation(c.class); if (cVar != null) { break; } } if (cVar != null) { try { eVar.n((b) cVar.value().getDeclaredConstructor(new Class[0]).newInstance(new Object[0])); } catch (Exception e10) { Log.e("CoordinatorLayout", "Default behavior class " + cVar.value().getName() + " could not be instantiated. Did you forget a default constructor?", e10); } } eVar.f1367b = true; } return eVar; } public boolean z(View view, int i10, int i11) { Rect a10 = a(); r(view, a10); try { return a10.contains(i10, i11); } finally { M(a10); } } public CoordinatorLayout(Context context, AttributeSet attributeSet, int i10) { super(context, attributeSet, i10); this.f1344a = new ArrayList(); this.f1345b = new androidx.coordinatorlayout.widget.b(); this.f1346c = new ArrayList(); this.f1347d = new ArrayList(); this.f1349f = new int[2]; this.f1350g = new int[2]; this.f1363t = new h0(this); TypedArray obtainStyledAttributes = i10 == 0 ? context.obtainStyledAttributes(attributeSet, n.c.f11924b, 0, n.b.f11922a) : context.obtainStyledAttributes(attributeSet, n.c.f11924b, i10, 0); if (Build.VERSION.SDK_INT >= 29) { if (i10 == 0) { saveAttributeDataForStyleable(context, n.c.f11924b, attributeSet, obtainStyledAttributes, 0, n.b.f11922a); } else { saveAttributeDataForStyleable(context, n.c.f11924b, attributeSet, obtainStyledAttributes, i10, 0); } } int resourceId = obtainStyledAttributes.getResourceId(n.c.f11925c, 0); if (resourceId != 0) { Resources resources = context.getResources(); this.f1353j = resources.getIntArray(resourceId); float f10 = resources.getDisplayMetrics().density; int length = this.f1353j.length; for (int i11 = 0; i11 < length; i11++) { this.f1353j[i11] = (int) (r12[i11] * f10); } } this.f1360q = obtainStyledAttributes.getDrawable(n.c.f11926d); obtainStyledAttributes.recycle(); V(); super.setOnHierarchyChangeListener(new d()); if (n0.z(this) == 0) { n0.w0(this, 1); } } protected static class g extends c0.a { public static final Parcelable.Creator CREATOR = new a(); /* renamed from: c, reason: collision with root package name */ SparseArray f1385c; static class a implements Parcelable.ClassLoaderCreator { a() { } @Override // android.os.Parcelable.Creator /* renamed from: a, reason: merged with bridge method [inline-methods] */ public g createFromParcel(Parcel parcel) { return new g(parcel, null); } @Override // android.os.Parcelable.ClassLoaderCreator /* renamed from: b, reason: merged with bridge method [inline-methods] */ public g createFromParcel(Parcel parcel, ClassLoader classLoader) { return new g(parcel, classLoader); } @Override // android.os.Parcelable.Creator /* renamed from: c, reason: merged with bridge method [inline-methods] */ public g[] newArray(int i10) { return new g[i10]; } } public g(Parcel parcel, ClassLoader classLoader) { super(parcel, classLoader); int readInt = parcel.readInt(); int[] iArr = new int[readInt]; parcel.readIntArray(iArr); Parcelable[] readParcelableArray = parcel.readParcelableArray(classLoader); this.f1385c = new SparseArray(readInt); for (int i10 = 0; i10 < readInt; i10++) { this.f1385c.append(iArr[i10], readParcelableArray[i10]); } } @Override // c0.a, android.os.Parcelable public void writeToParcel(Parcel parcel, int i10) { super.writeToParcel(parcel, i10); SparseArray sparseArray = this.f1385c; int size = sparseArray != null ? sparseArray.size() : 0; parcel.writeInt(size); int[] iArr = new int[size]; Parcelable[] parcelableArr = new Parcelable[size]; for (int i11 = 0; i11 < size; i11++) { iArr[i11] = this.f1385c.keyAt(i11); parcelableArr[i11] = (Parcelable) this.f1385c.valueAt(i11); } parcel.writeIntArray(iArr); parcel.writeParcelableArray(parcelableArr, i10); } public g(Parcelable parcelable) { super(parcelable); } } public static class e extends ViewGroup.MarginLayoutParams { /* renamed from: a, reason: collision with root package name */ b f1366a; /* renamed from: b, reason: collision with root package name */ boolean f1367b; /* renamed from: c, reason: collision with root package name */ public int f1368c; /* renamed from: d, reason: collision with root package name */ public int f1369d; /* renamed from: e, reason: collision with root package name */ public int f1370e; /* renamed from: f, reason: collision with root package name */ int f1371f; /* renamed from: g, reason: collision with root package name */ public int f1372g; /* renamed from: h, reason: collision with root package name */ public int f1373h; /* renamed from: i, reason: collision with root package name */ int f1374i; /* renamed from: j, reason: collision with root package name */ int f1375j; /* renamed from: k, reason: collision with root package name */ View f1376k; /* renamed from: l, reason: collision with root package name */ View f1377l; /* renamed from: m, reason: collision with root package name */ private boolean f1378m; /* renamed from: n, reason: collision with root package name */ private boolean f1379n; /* renamed from: o, reason: collision with root package name */ private boolean f1380o; /* renamed from: p, reason: collision with root package name */ private boolean f1381p; /* renamed from: q, reason: collision with root package name */ final Rect f1382q; /* renamed from: r, reason: collision with root package name */ Object f1383r; public e(int i10, int i11) { super(i10, i11); this.f1367b = false; this.f1368c = 0; this.f1369d = 0; this.f1370e = -1; this.f1371f = -1; this.f1372g = 0; this.f1373h = 0; this.f1382q = new Rect(); } private void m(View view, CoordinatorLayout coordinatorLayout) { View findViewById = coordinatorLayout.findViewById(this.f1371f); this.f1376k = findViewById; if (findViewById == null) { if (coordinatorLayout.isInEditMode()) { this.f1377l = null; this.f1376k = null; return; } throw new IllegalStateException("Could not find CoordinatorLayout descendant view with id " + coordinatorLayout.getResources().getResourceName(this.f1371f) + " to anchor view " + view); } if (findViewById == coordinatorLayout) { if (!coordinatorLayout.isInEditMode()) { throw new IllegalStateException("View can not be anchored to the the parent CoordinatorLayout"); } this.f1377l = null; this.f1376k = null; return; } for (ViewParent parent = findViewById.getParent(); parent != coordinatorLayout && parent != null; parent = parent.getParent()) { if (parent == view) { if (!coordinatorLayout.isInEditMode()) { throw new IllegalStateException("Anchor must not be a descendant of the anchored view"); } this.f1377l = null; this.f1376k = null; return; } if (parent instanceof View) { findViewById = parent; } } this.f1377l = findViewById; } private boolean r(View view, int i10) { int b10 = s.b(((e) view.getLayoutParams()).f1372g, i10); return b10 != 0 && (s.b(this.f1373h, i10) & b10) == b10; } private boolean s(View view, CoordinatorLayout coordinatorLayout) { if (this.f1376k.getId() != this.f1371f) { return false; } View view2 = this.f1376k; for (ViewParent parent = view2.getParent(); parent != coordinatorLayout; parent = parent.getParent()) { if (parent == null || parent == view) { this.f1377l = null; this.f1376k = null; return false; } if (parent instanceof View) { view2 = parent; } } this.f1377l = view2; return true; } boolean a() { return this.f1376k == null && this.f1371f != -1; } boolean b(CoordinatorLayout coordinatorLayout, View view, View view2) { b bVar; return view2 == this.f1377l || r(view2, n0.B(coordinatorLayout)) || ((bVar = this.f1366a) != null && bVar.e(coordinatorLayout, view, view2)); } boolean c() { if (this.f1366a == null) { this.f1378m = false; } return this.f1378m; } View d(CoordinatorLayout coordinatorLayout, View view) { if (this.f1371f == -1) { this.f1377l = null; this.f1376k = null; return null; } if (this.f1376k == null || !s(view, coordinatorLayout)) { m(view, coordinatorLayout); } return this.f1376k; } public b e() { return this.f1366a; } boolean f() { return this.f1381p; } Rect g() { return this.f1382q; } boolean h(CoordinatorLayout coordinatorLayout, View view) { boolean z10 = this.f1378m; if (z10) { return true; } b bVar = this.f1366a; boolean a10 = (bVar != null ? bVar.a(coordinatorLayout, view) : false) | z10; this.f1378m = a10; return a10; } boolean i(int i10) { if (i10 == 0) { return this.f1379n; } if (i10 != 1) { return false; } return this.f1380o; } void j() { this.f1381p = false; } void k(int i10) { q(i10, false); } void l() { this.f1378m = false; } public void n(b bVar) { b bVar2 = this.f1366a; if (bVar2 != bVar) { if (bVar2 != null) { bVar2.j(); } this.f1366a = bVar; this.f1383r = null; this.f1367b = true; if (bVar != null) { bVar.g(this); } } } void o(boolean z10) { this.f1381p = z10; } void p(Rect rect) { this.f1382q.set(rect); } void q(int i10, boolean z10) { if (i10 == 0) { this.f1379n = z10; } else { if (i10 != 1) { return; } this.f1380o = z10; } } e(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.f1367b = false; this.f1368c = 0; this.f1369d = 0; this.f1370e = -1; this.f1371f = -1; this.f1372g = 0; this.f1373h = 0; this.f1382q = new Rect(); TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, n.c.f11927e); this.f1368c = obtainStyledAttributes.getInteger(n.c.f11928f, 0); this.f1371f = obtainStyledAttributes.getResourceId(n.c.f11929g, -1); this.f1369d = obtainStyledAttributes.getInteger(n.c.f11930h, 0); this.f1370e = obtainStyledAttributes.getInteger(n.c.f11934l, -1); this.f1372g = obtainStyledAttributes.getInt(n.c.f11933k, 0); this.f1373h = obtainStyledAttributes.getInt(n.c.f11932j, 0); int i10 = n.c.f11931i; boolean hasValue = obtainStyledAttributes.hasValue(i10); this.f1367b = hasValue; if (hasValue) { this.f1366a = CoordinatorLayout.I(context, attributeSet, obtainStyledAttributes.getString(i10)); } obtainStyledAttributes.recycle(); b bVar = this.f1366a; if (bVar != null) { bVar.g(this); } } public e(e eVar) { super((ViewGroup.MarginLayoutParams) eVar); this.f1367b = false; this.f1368c = 0; this.f1369d = 0; this.f1370e = -1; this.f1371f = -1; this.f1372g = 0; this.f1373h = 0; this.f1382q = new Rect(); } public e(ViewGroup.MarginLayoutParams marginLayoutParams) { super(marginLayoutParams); this.f1367b = false; this.f1368c = 0; this.f1369d = 0; this.f1370e = -1; this.f1371f = -1; this.f1372g = 0; this.f1373h = 0; this.f1382q = new Rect(); } public e(ViewGroup.LayoutParams layoutParams) { super(layoutParams); this.f1367b = false; this.f1368c = 0; this.f1369d = 0; this.f1370e = -1; this.f1371f = -1; this.f1372g = 0; this.f1373h = 0; this.f1382q = new Rect(); } } }