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

Commit d10af358 authored by Josep del Río's avatar Josep del Río Committed by Android (Google) Code Review
Browse files

Merge "Dismiss dialog with Escape key if closeable" into main

parents 6f67bf71 b2d272bd
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -679,12 +679,14 @@ public class Dialog implements DialogInterface, Window.Callback,
        if (keyCode == KeyEvent.KEYCODE_ESCAPE) {
        if (keyCode == KeyEvent.KEYCODE_ESCAPE) {
            if (mCancelable) {
            if (mCancelable) {
                cancel();
                cancel();
            } else {
                event.startTracking();
                return true;
            } else if (mWindow.shouldCloseOnTouchOutside()) {
                dismiss();
                dismiss();
            }
                event.startTracking();
                event.startTracking();
                return true;
                return true;
            }
            }
        }


        return false;
        return false;
    }
    }