The problem is this - there is a Plantronics M180 headset. It is necessary to handle pressing the main button (I say right away - this is not MEDIA_BUTTON, through XEVENT it is also not caught).
In logcat, clicking on it displays nothing, except for the moment when the call is on and pressing the button completes it, the following is displayed:
E/bt-rfcomm: PORT_DataInd, p_port:0xa4f3294c, p_data_co_callback is null D/bt-btif: bta_ag_hdl_event: p_scb 0xa4f3b4e4 D/bt-btif: AG evt (hdl 0x0001): State 2, Event 0x050b D/bt-btif: HFP AT cmd:6 arg_type:1 arg:0 arg: D/bt-btif: bta_ag_rfc_data, change link policy for SCO D/bt-btif: btif_hf_upstreams_evt: event=BTA_AG_AT_CHUP_EVT D/HeadsetStateMachine: AudioOn process message: 101, size: 1 D/HeadsetStateMachine: event type: 5 What are some ways to handle a click?
