package o; import android.app.Dialog; import android.graphics.Rect; import android.graphics.RectF; import android.os.Build; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; /* loaded from: classes2.dex */ public final class JjA implements View.OnTouchListener { private final Dialog b; private final int c; private final int d; private final int e; public JjA(Dialog dialog, Rect rect) { this.b = dialog; this.e = rect.left; this.c = rect.top; this.d = ViewConfiguration.get(dialog.getContext()).getScaledWindowTouchSlop(); } @Override // android.view.View.OnTouchListener public final boolean onTouch(View view, MotionEvent motionEvent) { View findViewById = view.findViewById(android.R.id.content); int left = this.e + findViewById.getLeft(); int width = findViewById.getWidth(); if (new RectF(left, this.c + findViewById.getTop(), width + left, findViewById.getHeight() + r3).contains(motionEvent.getX(), motionEvent.getY())) { return false; } MotionEvent obtain = MotionEvent.obtain(motionEvent); if (motionEvent.getAction() == 1) { obtain.setAction(4); } if (Build.VERSION.SDK_INT < 28) { obtain.setAction(0); float f = (-this.d) - 1; obtain.setLocation(f, f); } view.performClick(); return this.b.onTouchEvent(obtain); } }