Skip to content
Commit 87d31ecd authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

Fix logic for Intent.ACTION_HEADSET_PLUG for USB headsets

In the broadcast of Intent.ACTION_HEADSET_PLUG:
- restore setting "microphone" to 0 for line and headphone as
  the input bit is never set for those devices
- for USB_HEADSET: there is no input bit for this device, so:
  * when observing change for DEVICE_OUT, check status of DEVICE_IN
  * when observing change for DEVICE_IN, only send the intent
     if DEVICE_OUT is available.

Test: test broadcast and extras for Intent.ACTION_HEADSET_PLUG
Bug: 64250808
Change-Id: I0913933d03e21189bb552f60ae5dd35ffe28ddca
parent b6ba151a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment