Fix volume key handling for key press repeat
The original code for translating volume key presses into CEC commands was sending the equivalent of a key up / key down for each call to adjustSuggestedStreamVolume. This behavior caused CEC commands to pile up in HdmiControlService, and a repeated key press (user keeping finger on volume button on remote) would cause volume to still change on the CEC device handling volume even after the key was released. The fix consists in changing how PhoneWindowManager communicates with AudioService, by passing the key event directly, so AudioService can communicate the key up / key down information to the CEC library, which already deals with repeated commands on the CEC bus. Bug: 137311120 Test: connect DUT to CEC TV or receiver capable of handling vol cmds, keep pressing on vol key, verify releasing key stops volume changes on TV/receiver. Change-Id: I7a75af651b6b424129515a8991b5afb15c62dba3 Merged-In: I7a75af651b6b424129515a8991b5afb15c62dba3 (cherry picked from commit 12ba113894ec8ad7c24913a0a09ea70047d25353) (cherry picked from commit 7e58c9145d71ba92053ad6629f910456566cfea9)
Loading
Please register or sign in to comment