Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java

Issue 2699533002: Revert of Add the url attribute to the IceCandidate (Java Wrapper) (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 }); 401 });
402 httpConnection.send(); 402 httpConnection.send();
403 } 403 }
404 404
405 // Converts a Java candidate to a JSONObject. 405 // Converts a Java candidate to a JSONObject.
406 private JSONObject toJsonCandidate(final IceCandidate candidate) { 406 private JSONObject toJsonCandidate(final IceCandidate candidate) {
407 JSONObject json = new JSONObject(); 407 JSONObject json = new JSONObject();
408 jsonPut(json, "label", candidate.sdpMLineIndex); 408 jsonPut(json, "label", candidate.sdpMLineIndex);
409 jsonPut(json, "id", candidate.sdpMid); 409 jsonPut(json, "id", candidate.sdpMid);
410 jsonPut(json, "candidate", candidate.sdp); 410 jsonPut(json, "candidate", candidate.sdp);
411 jsonPut(json, "url", candidate.serverUrl);
412 return json; 411 return json;
413 } 412 }
414 413
415 // Converts a JSON candidate to a Java object. 414 // Converts a JSON candidate to a Java object.
416 IceCandidate toJavaCandidate(JSONObject json) throws JSONException { 415 IceCandidate toJavaCandidate(JSONObject json) throws JSONException {
417 return new IceCandidate(json.getString("id"), json.getInt("label"), json.get String("candidate"), 416 return new IceCandidate(
418 json.getString("url")); 417 json.getString("id"), json.getInt("label"), json.getString("candidate")) ;
419 } 418 }
420 } 419 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698