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

Commit b3ef538f authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android (Google) Code Review
Browse files

Merge "Fix connect on a network id with zero"

parents cbed96ae ab264071
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1289,7 +1289,10 @@ public class WifiManager {
        if (c == null) throw new IllegalArgumentException("Channel needs to be initialized");
        if (config == null) throw new IllegalArgumentException("config cannot be null");

        c.mAsyncChannel.sendMessage(CONNECT_NETWORK, 0, c.putListener(listener), config);
        // Use INVALID_NETWORK_ID for arg1 when passing a config object
        // arg1 is used to pass network id when the network already exists
        c.mAsyncChannel.sendMessage(CONNECT_NETWORK, WifiConfiguration.INVALID_NETWORK_ID,
                c.putListener(listener), config);
    }

    /**