Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34cb111b authored by Daniel Hillenbrand's avatar Daniel Hillenbrand Committed by Gerrit Code Review
Browse files

Merge "Add Deskdock support to WiredAccessoryObserver" into ics

parents 445c2f3a 55f4fc87
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -151,14 +151,15 @@ class WiredAccessoryObserver extends UEventObserver {
                                         ((state == 2) ? BIT_USB_HEADSET_DGTL : 0)));
        } else if (name.equals("dock")) {
             switchState = ((mHeadsetState & (BIT_HEADSET|BIT_HEADSET_NO_MIC|BIT_HDMI_AUDIO)) |
                           ((state == 2) ? BIT_USB_HEADSET_ANLG : 0));
                           ((state == 2 || state == 1) ? BIT_USB_HEADSET_ANLG : 0));
            // This sets the switchsate to 4 (for USB HEADSET - BIT_USB_HEADSET_ANLG)
            // Looking at the other types, maybe the state that emitted should be a 1 and at 
            //       /devices/virtual/switch/usb_audio
            //
            // However the we need to deal with changes at
            //       /devices/virtual/switch/dock
            // for this the state of 2 - means that we have a USB ANLG headset
            // for the state of 2 - means that we have a USB ANLG headset Car Dock
            // for the state of 1 - means that we have a USB ANLG headset Desk Dock
        } else if (name.equals("hdmi")) {
            switchState = ((mHeadsetState & (BIT_HEADSET|BIT_HEADSET_NO_MIC|
                                             BIT_USB_HEADSET_DGTL|BIT_USB_HEADSET_ANLG)) |