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

Skip to content
Commit 5b6c96fb authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Add key event label to Entry dump

When examining bugreports, it is inconvenient to have to look up
keycodes at the KeyEvent.java file or online in the documentation. When
checking the recent queue, it's nice to just have a printed value of a
specific key event.

Add KeyEvent::getLabel to the entry dump for KeyEntry.

Bug: 181096406

Test: press volume keys and then `adb shell dumpsys input`
Observe:
RecentQueue: length=10
    FocusEvent(hasFocus=false), age=14108ms
    FocusEvent(hasFocus=true), age=14099ms
    FocusEvent(hasFocus=false), age=14079ms
    FocusEvent(hasFocus=true), age=11936ms
    KeyEvent(deviceId=3, eventTime=477682467000, source=0x00000101, displayId=-1, action=DOWN, flags=0x00000008, keyCode=VOLUME_DOWN(25), scanCode=114, metaState=0x00000000, repeatCount=0), policyFlags=0x62000000, age=4160ms
    KeyEvent(deviceId=3, eventTime=477826780000, source=0x00000101, displayId=-1, action=UP, flags=0x00000008, keyCode=VOLUME_DOWN(25), scanCode=114, metaState=0x00000000, repeatCount=0), policyFlags=0x62000000, age=4015ms
    KeyEvent(deviceId=3, eventTime=479897187000, source=0x00000101, displayId=-1, action=DOWN, flags=0x00000008, keyCode=VOLUME_DOWN(25), scanCode=114, metaState=0x00000000, repeatCount=0), policyFlags=0x62000000, age=1945ms
    KeyEvent(deviceId=3, eventTime=480050313000, source=0x00000101, displayId=-1, action=UP, flags=0x00000008, keyCode=VOLUME_DOWN(25), scanCode=114, metaState=0x00000000, repeatCount=0), policyFlags=0x62000000, age=1792ms
    KeyEvent(deviceId=2, eventTime=480483397000, source=0x00000101, displayId=-1, action=DOWN, flags=0x00000008, keyCode=VOLUME_UP(24), scanCode=115, metaState=0x00000000, repeatCount=0), policyFlags=0x62000000, age=1359ms
    KeyEvent(deviceId=2, eventTime=480646721000, source=0x00000101, displayId=-1, action=UP, flags=0x00000008, keyCode=VOLUME_UP(24), scanCode=115, metaState=0x00000000, repeatCount=0), policyFlags=0x62000000, age=1195ms
Change-Id: Ifeb70526c589508220cade800bd104344dc312ab
parent 2587c83e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment