package o; import android.graphics.PorterDuff; import android.view.View; import android.view.ViewParent; import android.view.inputmethod.InputMethodManager; import androidx.core.view.ViewCompat; import androidx.core.view.WindowInsetsCompat; import androidx.core.view.WindowInsetsControllerCompat; import com.google.android.gms.maps.model.BitmapDescriptorFactory; /* loaded from: classes2.dex */ public final class Lot { /* loaded from: classes2.dex */ public interface IeS { WindowInsetsCompat b(View view, WindowInsetsCompat windowInsetsCompat, RVV rvv); } public static void e(View view, boolean z) { WindowInsetsControllerCompat y; if (z && (y = ViewCompat.y(view)) != null) { y.b(WindowInsetsCompat.jbe.e()); return; } InputMethodManager inputMethodManager = (InputMethodManager) nMh.getSystemService(view.getContext(), InputMethodManager.class); if (inputMethodManager != null) { inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } } public static PorterDuff.Mode Kf_(int i, PorterDuff.Mode mode) { if (i == 3) { return PorterDuff.Mode.SRC_OVER; } if (i == 5) { return PorterDuff.Mode.SRC_IN; } if (i == 9) { return PorterDuff.Mode.SRC_ATOP; } switch (i) { case 14: return PorterDuff.Mode.MULTIPLY; case 15: return PorterDuff.Mode.SCREEN; case 16: return PorterDuff.Mode.ADD; default: return mode; } } /* loaded from: classes2.dex */ public static class RVV { public int a; public int c; public int d; public int e; public RVV(int i, int i2, int i3, int i4) { this.a = i; this.e = i2; this.c = i3; this.d = i4; } public RVV(RVV rvv) { this.a = rvv.a; this.e = rvv.e; this.c = rvv.c; this.d = rvv.d; } public final void a(View view) { ViewCompat.a(view, this.a, this.e, this.c, this.d); } } public static void c(View view, IeS ieS) { ViewCompat.c(view, new LbT(ieS, new RVV(ViewCompat.q(view), view.getPaddingTop(), ViewCompat.r(view), view.getPaddingBottom())) { // from class: o.Lot.4 private IeS c; private RVV d; { this.c = ieS; this.d = r2; } @Override // o.LbT public final WindowInsetsCompat e(View view2, WindowInsetsCompat windowInsetsCompat) { return this.c.b(view2, windowInsetsCompat, new RVV(this.d)); } }); if (ViewCompat.H(view)) { ViewCompat.J(view); } else { view.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { // from class: o.Lot.5 @Override // android.view.View.OnAttachStateChangeListener public final void onViewDetachedFromWindow(View view2) { } @Override // android.view.View.OnAttachStateChangeListener public final void onViewAttachedToWindow(View view2) { view2.removeOnAttachStateChangeListener(this); ViewCompat.J(view2); } }); } } public static float e(View view) { float f = BitmapDescriptorFactory.HUE_RED; for (ViewParent parent = view.getParent(); parent instanceof View; parent = parent.getParent()) { f += ViewCompat.i((View) parent); } return f; } }