Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8446a300 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add support for ACTION_OUTSIDE to Dialog"

parents ea421c3b ddec8fb4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1242,8 +1242,10 @@ public abstract class Window {

    /** @hide */
    public boolean shouldCloseOnTouch(Context context, MotionEvent event) {
        if (mCloseOnTouchOutside && event.getAction() == MotionEvent.ACTION_DOWN
                && isOutOfBounds(context, event) && peekDecorView() != null) {
        final boolean isOutside =
                event.getAction() == MotionEvent.ACTION_DOWN && isOutOfBounds(context, event)
                || event.getAction() == MotionEvent.ACTION_OUTSIDE;
        if (mCloseOnTouchOutside && peekDecorView() != null && isOutside) {
            return true;
        }
        return false;