sm8250-common: KeyHandler: Do nothing when action != ACTION_DOWN
This makes sure we only change the ringer mode / play haptics once. Change-Id: Ie5a6050338cee75cd8fe6da6edfae03141263033
This commit is contained in:
parent
6de1b949cd
commit
41bff4b172
1 changed files with 4 additions and 0 deletions
|
@ -50,6 +50,10 @@ public class KeyHandler implements DeviceKeyHandler {
|
|||
}
|
||||
|
||||
public KeyEvent handleKeyEvent(KeyEvent event) {
|
||||
if (event.getAction() != KeyEvent.ACTION_DOWN) {
|
||||
return event;
|
||||
}
|
||||
|
||||
int scanCode = event.getScanCode();
|
||||
|
||||
switch (scanCode) {
|
||||
|
|
Loading…
Reference in a new issue