Close dialogs and activity on Escape down

Currently closing dialogs and activities that look like dialogs
requires the user to release the Escape key, that is, the up
event; applying the action on the down event will increase
responsiveness.

Bug: 324221986
Test: Tested on Google Play voice search, and private DNS dialog
in the Settings app.

Change-Id: Ie1fd3a47955e0c693f9b5eaa6ba788a57e8973ed
2 files changed