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

Skip to content
Commit c1845792 authored by Alexandra-Mara Smau's avatar Alexandra-Mara Smau
Browse files

Fix press HOME logging tests.

The logic to log the system event triggered by the key press is executed after the tests check if the system event was logged. This happens when:
1. PhoneWindowManager posts handleShortPressOnHome, message queue: [handleShortPressOnHome]
2. TestPhoneWindowManager posts runWithScissors, message queue: [handleShortPressOnHome, runWithScissors]
3. Handler runs handleShortPressOnHome, which posts logKeyboardSystemsEvent, message queue: [runWithScissors, logKeyboardSystemsEvent]
4. Handler runs runWithScissors, fails the assertion that keyboardSystemEvent was logged, message queue: [logKeyboardSystemsEvent]
5. Handler runs logKeyboardSystemsEvent, message queue: []

A copy of the KeyEvent is needed, because the KeyEvent gets recycle later on.

Test: atest ShortcutLoggingTests
Change-Id: I0878bb616296ebbed4bf2a7e9479a970c3eb6bce
Bug: b/300023716
parent 7f9d72ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment