Deprecate IceServer constructors and update dependencies
Bug: webrtc:8176 Change-Id: I2ebc0edf1776c49c202a181d7597099e9242c0e7 Reviewed-on: https://chromium-review.googlesource.com/642710 Commit-Queue: Diogo Real <diogor@google.com> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#19621}
This commit is contained in:
parent
125e95eaf6
commit
05ea2b39e0
@ -187,7 +187,12 @@ public class RoomParametersFetcher {
|
||||
String credential = server.has("credential") ? server.getString("credential") : "";
|
||||
for (int j = 0; j < turnUrls.length(); j++) {
|
||||
String turnUrl = turnUrls.getString(j);
|
||||
turnServers.add(new PeerConnection.IceServer(turnUrl, username, credential));
|
||||
PeerConnection.IceServer turnServer =
|
||||
PeerConnection.IceServer.builder(turnUrl)
|
||||
.setUsername(username)
|
||||
.setPassword(credential)
|
||||
.createIceServer();
|
||||
turnServers.add(turnServer);
|
||||
}
|
||||
}
|
||||
return turnServers;
|
||||
@ -204,7 +209,11 @@ public class RoomParametersFetcher {
|
||||
JSONObject server = servers.getJSONObject(i);
|
||||
String url = server.getString("urls");
|
||||
String credential = server.has("credential") ? server.getString("credential") : "";
|
||||
ret.add(new PeerConnection.IceServer(url, "", credential));
|
||||
PeerConnection.IceServer turnServer =
|
||||
PeerConnection.IceServer.builder(url)
|
||||
.setPassword(credential)
|
||||
.createIceServer();
|
||||
ret.add(turnServer);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -114,18 +114,22 @@ public class PeerConnection {
|
||||
public final List<String> tlsAlpnProtocols;
|
||||
|
||||
/** Convenience constructor for STUN servers. */
|
||||
@Deprecated
|
||||
public IceServer(String uri) {
|
||||
this(uri, "", "");
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public IceServer(String uri, String username, String password) {
|
||||
this(uri, username, password, TlsCertPolicy.TLS_CERT_POLICY_SECURE);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public IceServer(String uri, String username, String password, TlsCertPolicy tlsCertPolicy) {
|
||||
this(uri, username, password, tlsCertPolicy, "");
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public IceServer(String uri, String username, String password, TlsCertPolicy tlsCertPolicy,
|
||||
String hostname) {
|
||||
this(uri, username, password, tlsCertPolicy, hostname, null);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user