Android: Generate JNI code for IceCandidate

Bug: webrtc:8278
Change-Id: I4facd1f6babd6e8a9b35c86b6ad7420e52321f49
Reviewed-on: https://webrtc-review.googlesource.com/25960
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20888}
This commit is contained in:
Magnus Jedvert
2017-11-25 21:18:34 +01:00
committed by Commit Bot
parent 5b8c0a2a1e
commit 80610c4fd1
6 changed files with 62 additions and 43 deletions

View File

@ -27,8 +27,8 @@ public class IceCandidate {
this.serverUrl = "";
}
// Only be called internally from JNI.
private IceCandidate(String sdpMid, int sdpMLineIndex, String sdp, String serverUrl) {
@CalledByNative
IceCandidate(String sdpMid, int sdpMLineIndex, String sdp, String serverUrl) {
this.sdpMid = sdpMid;
this.sdpMLineIndex = sdpMLineIndex;
this.sdp = sdp;
@ -39,4 +39,19 @@ public class IceCandidate {
public String toString() {
return sdpMid + ":" + sdpMLineIndex + ":" + sdp + ":" + serverUrl;
}
@CalledByNative
String getSdpMid() {
return sdpMid;
}
@CalledByNative
String getSdp() {
return sdp;
}
@CalledByNative
static IceCandidate[] createArray(int size) {
return new IceCandidate[size];
}
}