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

Commit 5e0cc0d7 authored by Andreas Huber's avatar Andreas Huber
Browse files

Fix port logic in WifiDisplayController.

It's not the port advertised in the sink's wfd IE, it's the one our
source broadcasts in its wfd IE. In addition some dongles ignore the
broadcast port and have to be special cased.

Change-Id: Id5d279652e336391ba34dfc30bba700043d49b1d
parent 753e1280
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -493,8 +493,13 @@ final class WifiDisplayController implements DumpUtils.Dump {
                return; // done
            }

            WifiP2pWfdInfo wfdInfo = mConnectedDevice.wfdInfo;
            int port = (wfdInfo != null ? wfdInfo.getControlPort() : DEFAULT_CONTROL_PORT);
            int port = DEFAULT_CONTROL_PORT;
            if (mConnectedDevice.deviceName.startsWith("DIRECT-")
                    && mConnectedDevice.deviceName.endsWith("Broadcom")) {
                // These dongles ignore the port we broadcast in our WFD IE.
                port = 8554;
            }

            final WifiDisplay display = createWifiDisplay(mConnectedDevice);
            final String iface = addr.getHostAddress() + ":" + port;