package o; import android.view.View; import androidx.core.view.WindowInsetsAnimationCompat; import androidx.core.view.WindowInsetsCompat; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import java.util.Iterator; import java.util.List; /* loaded from: classes2.dex */ public final class Tur extends WindowInsetsAnimationCompat.Callback { private int a; private int b; private final View c; private final int[] e; public Tur(View view) { super(0); this.e = new int[2]; this.c = view; } @Override // androidx.core.view.WindowInsetsAnimationCompat.Callback public final void c(WindowInsetsAnimationCompat windowInsetsAnimationCompat) { this.c.getLocationOnScreen(this.e); this.a = this.e[1]; } @Override // androidx.core.view.WindowInsetsAnimationCompat.Callback public final WindowInsetsAnimationCompat.HBt b(WindowInsetsAnimationCompat windowInsetsAnimationCompat, WindowInsetsAnimationCompat.HBt hBt) { this.c.getLocationOnScreen(this.e); int i = this.a - this.e[1]; this.b = i; this.c.setTranslationY(i); return hBt; } @Override // androidx.core.view.WindowInsetsAnimationCompat.Callback public final WindowInsetsCompat e(WindowInsetsCompat windowInsetsCompat, List list) { Iterator it = list.iterator(); while (true) { if (!it.hasNext()) { break; } if ((it.next().d() & WindowInsetsCompat.jbe.e()) != 0) { int i = this.b; this.c.setTranslationY(i + Math.round(r0.a() * (0 - i))); break; } } return windowInsetsCompat; } @Override // androidx.core.view.WindowInsetsAnimationCompat.Callback public final void a(WindowInsetsAnimationCompat windowInsetsAnimationCompat) { this.c.setTranslationY(BitmapDescriptorFactory.HUE_RED); } }