Android: Generate JNI code for RTCStats

Bug: webrtc:8278
Change-Id: I183cec54ec3e97894db7f26e365eb9941a1ab458
Reviewed-on: https://webrtc-review.googlesource.com/25660
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20879}
This commit is contained in:
Magnus Jedvert
2017-11-24 18:46:15 +01:00
committed by Commit Bot
parent 6bd39025ec
commit c4c8876f70
6 changed files with 26 additions and 25 deletions

View File

@ -103,4 +103,11 @@ public class RTCStats {
builder.append(value);
}
}
// TODO(bugs.webrtc.org/8557) Use ctor directly with full Map type.
@SuppressWarnings("unchecked")
@CalledByNative
static RTCStats create(long timestampUs, String type, String id, Map members) {
return new RTCStats(timestampUs, type, id, members);
}
}

View File

@ -13,5 +13,5 @@ package org.webrtc;
/** Interface for receiving stats reports (see webrtc::RTCStatsCollectorCallback). */
public interface RTCStatsCollectorCallback {
/** Called when the stats report is ready. */
public void onStatsDelivered(RTCStatsReport report);
@CalledByNative public void onStatsDelivered(RTCStatsReport report);
}

View File

@ -52,4 +52,11 @@ public class RTCStatsReport {
builder.append(" ] }");
return builder.toString();
}
// TODO(bugs.webrtc.org/8557) Use ctor directly with full Map type.
@SuppressWarnings("unchecked")
@CalledByNative
private static RTCStatsReport create(long timestampUs, Map stats) {
return new RTCStatsReport(timestampUs, stats);
}
}