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:
LuK1337 2021-04-14 18:51:40 +02:00
parent 6de1b949cd
commit 41bff4b172

View file

@ -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) {