Fix some Android lint warnings in AppRTCMobile.
Bug: webrtc:6597 Change-Id: I73e304ff03a5fcb166ff7bca61319904ef495426 Reviewed-on: https://webrtc-review.googlesource.com/15322 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20439}
This commit is contained in:
committed by
Commit Bot
parent
68e56a5951
commit
2729c16143
@ -37,7 +37,6 @@ public class RoomParametersFetcher {
|
||||
private final RoomParametersFetcherEvents events;
|
||||
private final String roomUrl;
|
||||
private final String roomMessage;
|
||||
private AsyncHttpURLConnection httpConnection;
|
||||
|
||||
/**
|
||||
* Room parameters fetcher callbacks.
|
||||
@ -64,7 +63,7 @@ public class RoomParametersFetcher {
|
||||
|
||||
public void makeRequest() {
|
||||
Log.d(TAG, "Connecting to room: " + roomUrl);
|
||||
httpConnection =
|
||||
AsyncHttpURLConnection httpConnection =
|
||||
new AsyncHttpURLConnection("POST", roomUrl, roomMessage, new AsyncHttpEvents() {
|
||||
@Override
|
||||
public void onHttpError(String errorMessage) {
|
||||
@ -100,7 +99,7 @@ public class RoomParametersFetcher {
|
||||
String wssPostUrl = roomJson.getString("wss_post_url");
|
||||
boolean initiator = (roomJson.getBoolean("is_initiator"));
|
||||
if (!initiator) {
|
||||
iceCandidates = new LinkedList<IceCandidate>();
|
||||
iceCandidates = new LinkedList<>();
|
||||
String messagesString = roomJson.getString("messages");
|
||||
JSONArray messages = new JSONArray(messagesString);
|
||||
for (int i = 0; i < messages.length(); ++i) {
|
||||
@ -161,7 +160,7 @@ public class RoomParametersFetcher {
|
||||
// off the main thread!
|
||||
private LinkedList<PeerConnection.IceServer> requestTurnServers(String url)
|
||||
throws IOException, JSONException {
|
||||
LinkedList<PeerConnection.IceServer> turnServers = new LinkedList<PeerConnection.IceServer>();
|
||||
LinkedList<PeerConnection.IceServer> turnServers = new LinkedList<>();
|
||||
Log.d(TAG, "Request TURN from: " + url);
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||
connection.setDoOutput(true);
|
||||
@ -203,7 +202,7 @@ public class RoomParametersFetcher {
|
||||
throws JSONException {
|
||||
JSONObject json = new JSONObject(pcConfig);
|
||||
JSONArray servers = json.getJSONArray("iceServers");
|
||||
LinkedList<PeerConnection.IceServer> ret = new LinkedList<PeerConnection.IceServer>();
|
||||
LinkedList<PeerConnection.IceServer> ret = new LinkedList<>();
|
||||
for (int i = 0; i < servers.length(); ++i) {
|
||||
JSONObject server = servers.getJSONObject(i);
|
||||
String url = server.getString("urls");
|
||||
|
||||
Reference in New Issue
Block a user