+18
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Currently, if a KeyButtonView gesture is aborted, no further events are sent. This means that there is an ACTION_DOWN event with no corresponding ACTION_UP, which causes problems with the KeyCombinationManager. Specifically, if the home button is long-pressed, it registers the initial DOWN event but never gets the UP event, preventing it from registering keychords correctly (since it looks for keychords including the home button) until either the home button is tapped (which does send the ACTION_UP event) or the phone is rebooted. While in this state, screenshots cannot be successfully recognized and taken with the keychord. Bug: 181178545 Fix: 181178545 Test: manual -- repro case: in 2 or 3-button mode, long-press the home button to trigger the assistant. Without tapping the home button again, attempt to take a screenshot with power+vol_down. At HEAD, this fails; after this change, it works correctly. Added tests to KeyButtonViewTest.java to verify behavior on abortCurrentGesture: atest KeyButtonViewTest Change-Id: Ib82b855a3eefeb6baf09ea7ac107e0f8ce46ee1c