xduoox3ii: Ignore the remote events when headphones aren't plugged in
This prevents the actual insertion/removal from triggering false events Change-Id: I54114ce903e110c31eca6b2ce258a0cf5f6b782b
This commit is contained in:
parent
2731144094
commit
5e663f0420
|
@ -58,13 +58,13 @@ int button_map(int keycode)
|
|||
|
||||
#if defined(XDUOO_X3II) && defined(USE_REMOTE) /* Headphone remote */
|
||||
case KEY_NEXTSONG:
|
||||
return (BUTTON_NEXT | BUTTON_DELAY_RELEASE);
|
||||
return headphones_inserted()? (BUTTON_NEXT | BUTTON_DELAY_RELEASE) : 0;
|
||||
|
||||
case KEY_PLAYPAUSE:
|
||||
return (BUTTON_PLAY | BUTTON_DELAY_RELEASE);
|
||||
return headphones_inserted()? (BUTTON_PLAY | BUTTON_DELAY_RELEASE) : 0;
|
||||
|
||||
case KEY_PREVIOUSSONG:
|
||||
return (BUTTON_PREV | BUTTON_DELAY_RELEASE);
|
||||
return headphones_inserted()? (BUTTON_PREV | BUTTON_DELAY_RELEASE) : 0;
|
||||
|
||||
#endif
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue