package androidx.core.view; import android.graphics.Rect; import android.os.Build; import android.util.Log; import android.view.View; import android.view.WindowInsets; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Objects; import o.C8935daI; import o.Rmc; import o.ZEY; /* loaded from: classes.dex */ public class WindowInsetsCompat { public static final WindowInsetsCompat d; private final Impl e; static { if (Build.VERSION.SDK_INT >= 30) { d = Impl30.CONSUMED; } else { d = Impl.CONSUMED; } } private WindowInsetsCompat(WindowInsets windowInsets) { if (Build.VERSION.SDK_INT >= 30) { this.e = new Impl30(this, windowInsets); return; } if (Build.VERSION.SDK_INT >= 29) { this.e = new Impl29(this, windowInsets); } else if (Build.VERSION.SDK_INT >= 28) { this.e = new Impl28(this, windowInsets); } else { this.e = new Impl21(this, windowInsets); } } public WindowInsetsCompat(WindowInsetsCompat windowInsetsCompat) { if (windowInsetsCompat != null) { Impl impl = windowInsetsCompat.e; if (Build.VERSION.SDK_INT >= 30 && (impl instanceof Impl30)) { this.e = new Impl30(this, (Impl30) impl); } else if (Build.VERSION.SDK_INT >= 29 && (impl instanceof Impl29)) { this.e = new Impl29(this, (Impl29) impl); } else if (Build.VERSION.SDK_INT >= 28 && (impl instanceof Impl28)) { this.e = new Impl28(this, (Impl28) impl); } else if (impl instanceof Impl21) { this.e = new Impl21(this, (Impl21) impl); } else if (impl instanceof Impl20) { this.e = new Impl20(this, (Impl20) impl); } else { this.e = new Impl(this); } impl.copyWindowDataInto(this); return; } this.e = new Impl(this); } public static WindowInsetsCompat tG_(WindowInsets windowInsets) { return tH_(windowInsets, null); } public static WindowInsetsCompat tH_(WindowInsets windowInsets, View view) { WindowInsetsCompat windowInsetsCompat = new WindowInsetsCompat(windowInsets); if (view != null && ViewCompat.H(view)) { windowInsetsCompat.c(ViewCompat.t(view)); windowInsetsCompat.d(view.getRootView()); } return windowInsetsCompat; } @Deprecated public int g() { return this.e.getSystemWindowInsets().a; } @Deprecated public int i() { return this.e.getSystemWindowInsets().b; } @Deprecated public int j() { return this.e.getSystemWindowInsets().d; } @Deprecated public int f() { return this.e.getSystemWindowInsets().e; } public boolean h() { return this.e.isConsumed(); } @Deprecated public WindowInsetsCompat c() { return this.e.consumeSystemWindowInsets(); } @Deprecated public WindowInsetsCompat e(int i, int i2, int i3, int i4) { return new Sts(this).c(Rmc.e(i, i2, i3, i4)).a(); } @Deprecated public WindowInsetsCompat b() { return this.e.consumeStableInsets(); } public C8935daI e() { return this.e.getDisplayCutout(); } @Deprecated public WindowInsetsCompat a() { return this.e.consumeDisplayCutout(); } @Deprecated public Rmc d() { return this.e.getStableInsets(); } public WindowInsetsCompat c(int i, int i2, int i3, int i4) { return this.e.inset(i, i2, i3, i4); } public Rmc c(int i) { return this.e.getInsets(i); } public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof WindowInsetsCompat) { return ZEY.b(this.e, ((WindowInsetsCompat) obj).e); } return false; } public int hashCode() { Impl impl = this.e; if (impl == null) { return 0; } return impl.hashCode(); } public WindowInsets tI_() { Impl impl = this.e; if (impl instanceof Impl20) { return ((Impl20) impl).mPlatformInsets; } return null; } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public static class Impl { static final WindowInsetsCompat CONSUMED = new Sts().a().a().b().c(); final WindowInsetsCompat mHost; WindowInsetsCompat consumeDisplayCutout() { return this.mHost; } WindowInsetsCompat consumeStableInsets() { return this.mHost; } WindowInsetsCompat consumeSystemWindowInsets() { return this.mHost; } void copyRootViewBounds(View view) { } void copyWindowDataInto(WindowInsetsCompat windowInsetsCompat) { } C8935daI getDisplayCutout() { return null; } WindowInsetsCompat inset(int i, int i2, int i3, int i4) { return CONSUMED; } boolean isConsumed() { return false; } boolean isRound() { return false; } boolean isVisible(int i) { return true; } public void setOverriddenInsets(Rmc[] rmcArr) { } void setRootViewData(Rmc rmc) { } void setRootWindowInsets(WindowInsetsCompat windowInsetsCompat) { } public void setStableInsets(Rmc rmc) { } Impl(WindowInsetsCompat windowInsetsCompat) { this.mHost = windowInsetsCompat; } Rmc getSystemWindowInsets() { return Rmc.c; } Rmc getStableInsets() { return Rmc.c; } Rmc getSystemGestureInsets() { return getSystemWindowInsets(); } Rmc getMandatorySystemGestureInsets() { return getSystemWindowInsets(); } Rmc getTappableElementInsets() { return getSystemWindowInsets(); } Rmc getInsets(int i) { return Rmc.c; } Rmc getInsetsIgnoringVisibility(int i) { if ((i & 8) != 0) { throw new IllegalArgumentException("Unable to query the maximum insets for IME"); } return Rmc.c; } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Impl)) { return false; } Impl impl = (Impl) obj; return isRound() == impl.isRound() && isConsumed() == impl.isConsumed() && ZEY.b(getSystemWindowInsets(), impl.getSystemWindowInsets()) && ZEY.b(getStableInsets(), impl.getStableInsets()) && ZEY.b(getDisplayCutout(), impl.getDisplayCutout()); } public int hashCode() { boolean isRound = isRound(); boolean isConsumed = isConsumed(); return ZEY.d(Boolean.valueOf(isRound), Boolean.valueOf(isConsumed), getSystemWindowInsets(), getStableInsets(), getDisplayCutout()); } } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public static class Impl20 extends Impl { private static Class sAttachInfoClass = null; private static Field sAttachInfoField = null; private static Method sGetViewRootImplMethod = null; private static Field sVisibleInsetsField = null; private static boolean sVisibleRectReflectionFetched = false; private Rmc[] mOverriddenInsets; final WindowInsets mPlatformInsets; Rmc mRootViewVisibleInsets; private WindowInsetsCompat mRootWindowInsets; private Rmc mSystemWindowInsets; @Override // androidx.core.view.WindowInsetsCompat.Impl public void setOverriddenInsets(Rmc[] rmcArr) { this.mOverriddenInsets = rmcArr; } @Override // androidx.core.view.WindowInsetsCompat.Impl void setRootViewData(Rmc rmc) { this.mRootViewVisibleInsets = rmc; } @Override // androidx.core.view.WindowInsetsCompat.Impl void setRootWindowInsets(WindowInsetsCompat windowInsetsCompat) { this.mRootWindowInsets = windowInsetsCompat; } Impl20(WindowInsetsCompat windowInsetsCompat, WindowInsets windowInsets) { super(windowInsetsCompat); this.mSystemWindowInsets = null; this.mPlatformInsets = windowInsets; } Impl20(WindowInsetsCompat windowInsetsCompat, Impl20 impl20) { this(windowInsetsCompat, new WindowInsets(impl20.mPlatformInsets)); } @Override // androidx.core.view.WindowInsetsCompat.Impl boolean isRound() { return this.mPlatformInsets.isRound(); } @Override // androidx.core.view.WindowInsetsCompat.Impl public Rmc getInsets(int i) { return getInsets(i, false); } @Override // androidx.core.view.WindowInsetsCompat.Impl public Rmc getInsetsIgnoringVisibility(int i) { return getInsets(i, true); } @Override // androidx.core.view.WindowInsetsCompat.Impl boolean isVisible(int i) { for (int i2 = 1; i2 <= 256; i2 <<= 1) { if ((i & i2) != 0 && !isTypeVisible(i2)) { return false; } } return true; } private Rmc getInsets(int i, boolean z) { Rmc rmc = Rmc.c; for (int i2 = 1; i2 <= 256; i2 <<= 1) { if ((i & i2) != 0) { rmc = Rmc.b(rmc, getInsetsForType(i2, z)); } } return rmc; } protected Rmc getInsetsForType(int i, boolean z) { Rmc d; C8935daI displayCutout; if (i == 1) { if (z) { return Rmc.e(0, Math.max(getRootStableInsets().b, getSystemWindowInsets().b), 0, 0); } return Rmc.e(0, getSystemWindowInsets().b, 0, 0); } if (i == 2) { if (z) { Rmc rootStableInsets = getRootStableInsets(); Rmc stableInsets = getStableInsets(); return Rmc.e(Math.max(rootStableInsets.a, stableInsets.a), 0, Math.max(rootStableInsets.d, stableInsets.d), Math.max(rootStableInsets.e, stableInsets.e)); } Rmc systemWindowInsets = getSystemWindowInsets(); WindowInsetsCompat windowInsetsCompat = this.mRootWindowInsets; d = windowInsetsCompat != null ? windowInsetsCompat.d() : null; int i2 = systemWindowInsets.e; if (d != null) { i2 = Math.min(i2, d.e); } return Rmc.e(systemWindowInsets.a, 0, systemWindowInsets.d, i2); } if (i == 8) { Rmc[] rmcArr = this.mOverriddenInsets; d = rmcArr != null ? rmcArr[jbe.e(8)] : null; if (d != null) { return d; } Rmc systemWindowInsets2 = getSystemWindowInsets(); Rmc rootStableInsets2 = getRootStableInsets(); if (systemWindowInsets2.e > rootStableInsets2.e) { return Rmc.e(0, 0, 0, systemWindowInsets2.e); } Rmc rmc = this.mRootViewVisibleInsets; if (rmc != null && !rmc.equals(Rmc.c) && this.mRootViewVisibleInsets.e > rootStableInsets2.e) { return Rmc.e(0, 0, 0, this.mRootViewVisibleInsets.e); } return Rmc.c; } if (i == 16) { return getSystemGestureInsets(); } if (i == 32) { return getMandatorySystemGestureInsets(); } if (i == 64) { return getTappableElementInsets(); } if (i != 128) { return Rmc.c; } WindowInsetsCompat windowInsetsCompat2 = this.mRootWindowInsets; if (windowInsetsCompat2 != null) { displayCutout = windowInsetsCompat2.e(); } else { displayCutout = getDisplayCutout(); } if (displayCutout != null) { return Rmc.e(displayCutout.a(), displayCutout.d(), displayCutout.b(), displayCutout.e()); } return Rmc.c; } protected boolean isTypeVisible(int i) { if (i != 1 && i != 2) { if (i == 4) { return false; } if (i != 8 && i != 128) { return true; } } return !getInsetsForType(i, false).equals(Rmc.c); } @Override // androidx.core.view.WindowInsetsCompat.Impl final Rmc getSystemWindowInsets() { if (this.mSystemWindowInsets == null) { this.mSystemWindowInsets = Rmc.e(this.mPlatformInsets.getSystemWindowInsetLeft(), this.mPlatformInsets.getSystemWindowInsetTop(), this.mPlatformInsets.getSystemWindowInsetRight(), this.mPlatformInsets.getSystemWindowInsetBottom()); } return this.mSystemWindowInsets; } @Override // androidx.core.view.WindowInsetsCompat.Impl WindowInsetsCompat inset(int i, int i2, int i3, int i4) { Sts sts = new Sts(WindowInsetsCompat.tG_(this.mPlatformInsets)); sts.c(WindowInsetsCompat.b(getSystemWindowInsets(), i, i2, i3, i4)); sts.b(WindowInsetsCompat.b(getStableInsets(), i, i2, i3, i4)); return sts.a(); } @Override // androidx.core.view.WindowInsetsCompat.Impl void copyWindowDataInto(WindowInsetsCompat windowInsetsCompat) { windowInsetsCompat.c(this.mRootWindowInsets); windowInsetsCompat.b(this.mRootViewVisibleInsets); } private Rmc getRootStableInsets() { WindowInsetsCompat windowInsetsCompat = this.mRootWindowInsets; if (windowInsetsCompat != null) { return windowInsetsCompat.d(); } return Rmc.c; } @Override // androidx.core.view.WindowInsetsCompat.Impl void copyRootViewBounds(View view) { Rmc visibleInsets = getVisibleInsets(view); if (visibleInsets == null) { visibleInsets = Rmc.c; } setRootViewData(visibleInsets); } private Rmc getVisibleInsets(View view) { if (Build.VERSION.SDK_INT >= 30) { throw new UnsupportedOperationException("getVisibleInsets() should not be called on API >= 30. Use WindowInsets.isVisible() instead."); } if (!sVisibleRectReflectionFetched) { loadReflectionField(); } Method method = sGetViewRootImplMethod; if (method != null && sAttachInfoClass != null && sVisibleInsetsField != null) { try { Object invoke = method.invoke(view, new Object[0]); if (invoke == null) { Log.w("WindowInsetsCompat", "Failed to get visible insets. getViewRootImpl() returned null from the provided view. This means that the view is either not attached or the method has been overridden", new NullPointerException()); return null; } Rect rect = (Rect) sVisibleInsetsField.get(sAttachInfoField.get(invoke)); if (rect != null) { return Rmc.oB_(rect); } return null; } catch (ReflectiveOperationException e) { Log.e("WindowInsetsCompat", "Failed to get visible insets. (Reflection error). " + e.getMessage(), e); } } return null; } private static void loadReflectionField() { try { sGetViewRootImplMethod = View.class.getDeclaredMethod("getViewRootImpl", new Class[0]); Class cls = Class.forName("android.view.View$AttachInfo"); sAttachInfoClass = cls; sVisibleInsetsField = cls.getDeclaredField("mVisibleInsets"); sAttachInfoField = Class.forName("android.view.ViewRootImpl").getDeclaredField("mAttachInfo"); sVisibleInsetsField.setAccessible(true); sAttachInfoField.setAccessible(true); } catch (ReflectiveOperationException e) { Log.e("WindowInsetsCompat", "Failed to get visible insets. (Reflection error). " + e.getMessage(), e); } sVisibleRectReflectionFetched = true; } @Override // androidx.core.view.WindowInsetsCompat.Impl public boolean equals(Object obj) { if (super.equals(obj)) { return Objects.equals(this.mRootViewVisibleInsets, ((Impl20) obj).mRootViewVisibleInsets); } return false; } } /* loaded from: classes.dex */ static class Impl21 extends Impl20 { private Rmc mStableInsets; @Override // androidx.core.view.WindowInsetsCompat.Impl public void setStableInsets(Rmc rmc) { this.mStableInsets = rmc; } Impl21(WindowInsetsCompat windowInsetsCompat, WindowInsets windowInsets) { super(windowInsetsCompat, windowInsets); this.mStableInsets = null; } Impl21(WindowInsetsCompat windowInsetsCompat, Impl21 impl21) { super(windowInsetsCompat, impl21); this.mStableInsets = null; this.mStableInsets = impl21.mStableInsets; } @Override // androidx.core.view.WindowInsetsCompat.Impl boolean isConsumed() { return this.mPlatformInsets.isConsumed(); } @Override // androidx.core.view.WindowInsetsCompat.Impl WindowInsetsCompat consumeStableInsets() { return WindowInsetsCompat.tG_(this.mPlatformInsets.consumeStableInsets()); } @Override // androidx.core.view.WindowInsetsCompat.Impl WindowInsetsCompat consumeSystemWindowInsets() { return WindowInsetsCompat.tG_(this.mPlatformInsets.consumeSystemWindowInsets()); } @Override // androidx.core.view.WindowInsetsCompat.Impl final Rmc getStableInsets() { if (this.mStableInsets == null) { this.mStableInsets = Rmc.e(this.mPlatformInsets.getStableInsetLeft(), this.mPlatformInsets.getStableInsetTop(), this.mPlatformInsets.getStableInsetRight(), this.mPlatformInsets.getStableInsetBottom()); } return this.mStableInsets; } } /* loaded from: classes.dex */ static class Impl28 extends Impl21 { Impl28(WindowInsetsCompat windowInsetsCompat, WindowInsets windowInsets) { super(windowInsetsCompat, windowInsets); } Impl28(WindowInsetsCompat windowInsetsCompat, Impl28 impl28) { super(windowInsetsCompat, impl28); } @Override // androidx.core.view.WindowInsetsCompat.Impl C8935daI getDisplayCutout() { return C8935daI.rj_(this.mPlatformInsets.getDisplayCutout()); } @Override // androidx.core.view.WindowInsetsCompat.Impl WindowInsetsCompat consumeDisplayCutout() { return WindowInsetsCompat.tG_(this.mPlatformInsets.consumeDisplayCutout()); } @Override // androidx.core.view.WindowInsetsCompat.Impl20, androidx.core.view.WindowInsetsCompat.Impl public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Impl28)) { return false; } Impl28 impl28 = (Impl28) obj; return Objects.equals(this.mPlatformInsets, impl28.mPlatformInsets) && Objects.equals(this.mRootViewVisibleInsets, impl28.mRootViewVisibleInsets); } @Override // androidx.core.view.WindowInsetsCompat.Impl public int hashCode() { return this.mPlatformInsets.hashCode(); } } /* loaded from: classes.dex */ static class Impl29 extends Impl28 { private Rmc mMandatorySystemGestureInsets; private Rmc mSystemGestureInsets; private Rmc mTappableElementInsets; @Override // androidx.core.view.WindowInsetsCompat.Impl21, androidx.core.view.WindowInsetsCompat.Impl public void setStableInsets(Rmc rmc) { } Impl29(WindowInsetsCompat windowInsetsCompat, WindowInsets windowInsets) { super(windowInsetsCompat, windowInsets); this.mSystemGestureInsets = null; this.mMandatorySystemGestureInsets = null; this.mTappableElementInsets = null; } Impl29(WindowInsetsCompat windowInsetsCompat, Impl29 impl29) { super(windowInsetsCompat, impl29); this.mSystemGestureInsets = null; this.mMandatorySystemGestureInsets = null; this.mTappableElementInsets = null; } @Override // androidx.core.view.WindowInsetsCompat.Impl Rmc getSystemGestureInsets() { if (this.mSystemGestureInsets == null) { this.mSystemGestureInsets = Rmc.oC_(this.mPlatformInsets.getSystemGestureInsets()); } return this.mSystemGestureInsets; } @Override // androidx.core.view.WindowInsetsCompat.Impl Rmc getMandatorySystemGestureInsets() { if (this.mMandatorySystemGestureInsets == null) { this.mMandatorySystemGestureInsets = Rmc.oC_(this.mPlatformInsets.getMandatorySystemGestureInsets()); } return this.mMandatorySystemGestureInsets; } @Override // androidx.core.view.WindowInsetsCompat.Impl Rmc getTappableElementInsets() { if (this.mTappableElementInsets == null) { this.mTappableElementInsets = Rmc.oC_(this.mPlatformInsets.getTappableElementInsets()); } return this.mTappableElementInsets; } @Override // androidx.core.view.WindowInsetsCompat.Impl20, androidx.core.view.WindowInsetsCompat.Impl WindowInsetsCompat inset(int i, int i2, int i3, int i4) { return WindowInsetsCompat.tG_(this.mPlatformInsets.inset(i, i2, i3, i4)); } } /* JADX INFO: Access modifiers changed from: package-private */ public static Rmc b(Rmc rmc, int i, int i2, int i3, int i4) { int max = Math.max(0, rmc.a - i); int max2 = Math.max(0, rmc.b - i2); int max3 = Math.max(0, rmc.d - i3); int max4 = Math.max(0, rmc.e - i4); return (max == i && max2 == i2 && max3 == i3 && max4 == i4) ? rmc : Rmc.e(max, max2, max3, max4); } /* loaded from: classes.dex */ static class Impl30 extends Impl29 { static final WindowInsetsCompat CONSUMED = WindowInsetsCompat.tG_(WindowInsets.CONSUMED); @Override // androidx.core.view.WindowInsetsCompat.Impl20, androidx.core.view.WindowInsetsCompat.Impl final void copyRootViewBounds(View view) { } Impl30(WindowInsetsCompat windowInsetsCompat, WindowInsets windowInsets) { super(windowInsetsCompat, windowInsets); } Impl30(WindowInsetsCompat windowInsetsCompat, Impl30 impl30) { super(windowInsetsCompat, impl30); } @Override // androidx.core.view.WindowInsetsCompat.Impl20, androidx.core.view.WindowInsetsCompat.Impl public Rmc getInsets(int i) { return Rmc.oC_(this.mPlatformInsets.getInsets(saX.b(i))); } @Override // androidx.core.view.WindowInsetsCompat.Impl20, androidx.core.view.WindowInsetsCompat.Impl public Rmc getInsetsIgnoringVisibility(int i) { return Rmc.oC_(this.mPlatformInsets.getInsetsIgnoringVisibility(saX.b(i))); } @Override // androidx.core.view.WindowInsetsCompat.Impl20, androidx.core.view.WindowInsetsCompat.Impl public boolean isVisible(int i) { return this.mPlatformInsets.isVisible(saX.b(i)); } } /* loaded from: classes.dex */ public static final class Sts { private final LWm a; public Sts() { if (Build.VERSION.SDK_INT >= 30) { this.a = new IeS(); } else if (Build.VERSION.SDK_INT >= 29) { this.a = new RVV(); } else { this.a = new HBt(); } } public Sts(WindowInsetsCompat windowInsetsCompat) { if (Build.VERSION.SDK_INT >= 30) { this.a = new IeS(windowInsetsCompat); } else if (Build.VERSION.SDK_INT >= 29) { this.a = new RVV(windowInsetsCompat); } else { this.a = new HBt(windowInsetsCompat); } } @Deprecated public final Sts c(Rmc rmc) { this.a.e(rmc); return this; } public final Sts c(int i, Rmc rmc) { this.a.e(i, rmc); return this; } @Deprecated public final Sts b(Rmc rmc) { this.a.c(rmc); return this; } public final WindowInsetsCompat a() { return this.a.a(); } } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public static class LWm { private final WindowInsetsCompat a; Rmc[] e; void a(Rmc rmc) { } void b(Rmc rmc) { } void c(Rmc rmc) { } void d(Rmc rmc) { } void e(Rmc rmc) { } LWm() { this(new WindowInsetsCompat((WindowInsetsCompat) null)); } LWm(WindowInsetsCompat windowInsetsCompat) { this.a = windowInsetsCompat; } void e(int i, Rmc rmc) { if (this.e == null) { this.e = new Rmc[9]; } for (int i2 = 1; i2 <= 256; i2 <<= 1) { if ((i & i2) != 0) { this.e[jbe.e(i2)] = rmc; } } } protected final void d() { Rmc[] rmcArr = this.e; if (rmcArr != null) { Rmc rmc = rmcArr[jbe.e(1)]; Rmc rmc2 = this.e[jbe.e(2)]; if (rmc2 == null) { rmc2 = this.a.c(2); } if (rmc == null) { rmc = this.a.c(1); } e(Rmc.b(rmc, rmc2)); Rmc rmc3 = this.e[jbe.e(16)]; if (rmc3 != null) { b(rmc3); } Rmc rmc4 = this.e[jbe.e(32)]; if (rmc4 != null) { d(rmc4); } Rmc rmc5 = this.e[jbe.e(64)]; if (rmc5 != null) { a(rmc5); } } } WindowInsetsCompat a() { d(); return this.a; } } void c(Rmc[] rmcArr) { this.e.setOverriddenInsets(rmcArr); } /* loaded from: classes.dex */ static class HBt extends LWm { private static boolean a = false; private static boolean b = false; private static Constructor c; private static Field d; private WindowInsets f; private Rmc j; HBt() { this.f = tJ_(); } HBt(WindowInsetsCompat windowInsetsCompat) { super(windowInsetsCompat); this.f = windowInsetsCompat.tI_(); } @Override // androidx.core.view.WindowInsetsCompat.LWm void e(Rmc rmc) { WindowInsets windowInsets = this.f; if (windowInsets != null) { this.f = windowInsets.replaceSystemWindowInsets(rmc.a, rmc.b, rmc.d, rmc.e); } } @Override // androidx.core.view.WindowInsetsCompat.LWm WindowInsetsCompat a() { d(); WindowInsetsCompat tG_ = WindowInsetsCompat.tG_(this.f); tG_.c(this.e); tG_.c(this.j); return tG_; } private static WindowInsets tJ_() { if (!a) { try { d = WindowInsets.class.getDeclaredField("CONSUMED"); } catch (ReflectiveOperationException unused) { } a = true; } Field field = d; if (field != null) { try { WindowInsets windowInsets = (WindowInsets) field.get(null); if (windowInsets != null) { return new WindowInsets(windowInsets); } } catch (ReflectiveOperationException unused2) { } } if (!b) { try { c = WindowInsets.class.getConstructor(Rect.class); } catch (ReflectiveOperationException unused3) { } b = true; } Constructor constructor = c; if (constructor != null) { try { return constructor.newInstance(new Rect()); } catch (ReflectiveOperationException unused4) { } } return null; } @Override // androidx.core.view.WindowInsetsCompat.LWm void c(Rmc rmc) { this.j = rmc; } } void c(Rmc rmc) { this.e.setStableInsets(rmc); } /* loaded from: classes.dex */ static class RVV extends LWm { final WindowInsets.Builder b; RVV() { this.b = new WindowInsets.Builder(); } RVV(WindowInsetsCompat windowInsetsCompat) { super(windowInsetsCompat); WindowInsets.Builder builder; WindowInsets tI_ = windowInsetsCompat.tI_(); if (tI_ != null) { builder = new WindowInsets.Builder(tI_); } else { builder = new WindowInsets.Builder(); } this.b = builder; } @Override // androidx.core.view.WindowInsetsCompat.LWm void e(Rmc rmc) { this.b.setSystemWindowInsets(Rmc.IeS.oD_(rmc.a, rmc.b, rmc.d, rmc.e)); } @Override // androidx.core.view.WindowInsetsCompat.LWm void b(Rmc rmc) { this.b.setSystemGestureInsets(Rmc.IeS.oD_(rmc.a, rmc.b, rmc.d, rmc.e)); } @Override // androidx.core.view.WindowInsetsCompat.LWm void d(Rmc rmc) { this.b.setMandatorySystemGestureInsets(Rmc.IeS.oD_(rmc.a, rmc.b, rmc.d, rmc.e)); } @Override // androidx.core.view.WindowInsetsCompat.LWm void a(Rmc rmc) { this.b.setTappableElementInsets(Rmc.IeS.oD_(rmc.a, rmc.b, rmc.d, rmc.e)); } @Override // androidx.core.view.WindowInsetsCompat.LWm void c(Rmc rmc) { this.b.setStableInsets(Rmc.IeS.oD_(rmc.a, rmc.b, rmc.d, rmc.e)); } @Override // androidx.core.view.WindowInsetsCompat.LWm WindowInsetsCompat a() { d(); WindowInsetsCompat tG_ = WindowInsetsCompat.tG_(this.b.build()); tG_.c(this.e); return tG_; } } /* loaded from: classes.dex */ static class IeS extends RVV { IeS() { } IeS(WindowInsetsCompat windowInsetsCompat) { super(windowInsetsCompat); } @Override // androidx.core.view.WindowInsetsCompat.LWm void e(int i, Rmc rmc) { this.b.setInsets(saX.b(i), Rmc.IeS.oD_(rmc.a, rmc.b, rmc.d, rmc.e)); } } /* loaded from: classes.dex */ public static final class jbe { public static int b() { return 7; } public static int d() { return 32; } public static int e() { return 8; } static int e(int i) { if (i == 1) { return 0; } if (i == 2) { return 1; } if (i == 4) { return 2; } if (i == 8) { return 3; } if (i == 16) { return 4; } if (i == 32) { return 5; } if (i == 64) { return 6; } if (i == 128) { return 7; } if (i == 256) { return 8; } throw new IllegalArgumentException("type needs to be >= FIRST and <= LAST, type=".concat(String.valueOf(i))); } } /* loaded from: classes.dex */ static final class saX { static int b(int i) { int statusBars; int i2 = 0; for (int i3 = 1; i3 <= 256; i3 <<= 1) { if ((i & i3) != 0) { if (i3 == 1) { statusBars = WindowInsets.Type.statusBars(); } else if (i3 == 2) { statusBars = WindowInsets.Type.navigationBars(); } else if (i3 == 4) { statusBars = WindowInsets.Type.captionBar(); } else if (i3 == 8) { statusBars = WindowInsets.Type.ime(); } else if (i3 == 16) { statusBars = WindowInsets.Type.systemGestures(); } else if (i3 == 32) { statusBars = WindowInsets.Type.mandatorySystemGestures(); } else if (i3 == 64) { statusBars = WindowInsets.Type.tappableElement(); } else if (i3 == 128) { statusBars = WindowInsets.Type.displayCutout(); } i2 |= statusBars; } } return i2; } } /* JADX INFO: Access modifiers changed from: package-private */ public void c(WindowInsetsCompat windowInsetsCompat) { this.e.setRootWindowInsets(windowInsetsCompat); } void b(Rmc rmc) { this.e.setRootViewData(rmc); } /* JADX INFO: Access modifiers changed from: package-private */ public void d(View view) { this.e.copyRootViewBounds(view); } }