diff options
| author | 2022-03-09 13:51:58 +0800 | |
|---|---|---|
| committer | 2022-03-09 06:13:27 +0000 | |
| commit | 758393a388313ac6ff57c23754962e0623cbba3c (patch) | |
| tree | a1a4a6292ccab544a522f73ede3c74cf0225a259 /api/api.go | |
| parent | ef439b26ee0545e2e2c12daf2869369d1a4fea12 (diff) | |
Prevent NPE for onKeyDown and onKeyUp
We expected `onKeyDown` and `onKeyUp` should be used for the key event
delivery from input, but some apps may misuse it and pass a null
key event, that would cause app itself crash if it didn't override
onKeyDown and onKeyUp properly.
To prevent this, we swap the conditions that first check the confirm
key code then access the other states of the key event.
Bug: 219708835
Test: manual
Change-Id: I612ca560d768134bdcaa688c83217738b5254b5a
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions