package o; import android.content.Context; import android.graphics.Point; import android.graphics.Rect; import android.view.Display; import android.view.View; import android.view.WindowManager; import android.widget.PopupWindow; import androidx.core.view.ViewCompat; import o.InterfaceC15933jjG; import o.SYO; /* renamed from: o.lLe, reason: case insensitive filesystem */ /* loaded from: classes.dex */ public class C16108lLe { public int a; public View b; public PopupWindow.OnDismissListener c; public boolean d; public WpL e; private final PopupWindow.OnDismissListener f; private final Context g; public InterfaceC15933jjG.Sts h; private final boolean i; private final NoP j; private final int k; private final int l; public C16108lLe(Context context, NoP noP, View view, boolean z, int i) { this(context, noP, view, z, i, 0); } public C16108lLe(Context context, NoP noP, View view, boolean z, int i, int i2) { this.a = 8388611; this.f = new PopupWindow.OnDismissListener(this) { // from class: o.lLe.4 final C16108lLe a; { this.a = this; } @Override // android.widget.PopupWindow.OnDismissListener public final void onDismiss() { this.a.d(); } }; this.g = context; this.j = noP; this.b = view; this.i = z; this.k = i; this.l = i2; } public final WpL c() { WpL zeI; Display defaultDisplay = ((WindowManager) this.g.getSystemService("window")).getDefaultDisplay(); Point point = new Point(); LWm.eW_(defaultDisplay, point); if (Math.min(point.x, point.y) >= this.g.getResources().getDimensionPixelSize(SYO.Sts.abc_cascading_menus_min_smallest_width)) { zeI = new RHH(this.g, this.b, this.k, this.l, this.i); } else { zeI = new ZeI(this.g, this.j, this.b, this.k, this.l, this.i); } zeI.b(this.j); zeI.fd_(this.f); zeI.a(this.b); zeI.c(this.h); zeI.c(this.d); zeI.b(this.a); return zeI; } public final void a(int i, int i2, boolean z, boolean z2) { if (this.e == null) { this.e = c(); } WpL wpL = this.e; wpL.e(z2); if (z) { if ((HpP.c(this.a, ViewCompat.m(this.b)) & 7) == 5) { i -= this.b.getWidth(); } wpL.e(i); wpL.c(i2); int i3 = (int) ((this.g.getResources().getDisplayMetrics().density * 48.0f) / 2.0f); wpL.h = new Rect(i - i3, i2 - i3, i + i3, i2 + i3); } wpL.h(); } public final void a() { WpL wpL = this.e; if (wpL == null || !wpL.j()) { return; } this.e.b(); } public void d() { this.e = null; PopupWindow.OnDismissListener onDismissListener = this.c; if (onDismissListener != null) { onDismissListener.onDismiss(); } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.lLe$LWm */ /* loaded from: classes.dex */ public static class LWm { static void eW_(Display display, Point point) { display.getRealSize(point); } } public final void e() { WpL wpL = this.e; if (wpL == null || !wpL.j()) { if (this.b == null) { throw new IllegalStateException("MenuPopupHelper cannot be used without an anchor"); } a(0, 0, false, false); } } }