Android: Clean up JNI generated code
It's now possible to generate JNI code for constructors and enums correctly. This CL cleans that up. Bug: webrtc:8278,webrtc:8551,webrtc:8556 Change-Id: I2284a30139cbb186c80713eb6113eda5659c16ad Reviewed-on: https://webrtc-review.googlesource.com/25622 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20860}
This commit is contained in:
committed by
Commit Bot
parent
aea1d1ad3f
commit
1f2a3e7058
@ -38,6 +38,9 @@ public class Metrics {
|
||||
public final Map<String, HistogramInfo> map =
|
||||
new HashMap<String, HistogramInfo>(); // <name, HistogramInfo>
|
||||
|
||||
@CalledByNative
|
||||
Metrics() {}
|
||||
|
||||
/**
|
||||
* Class holding histogram information.
|
||||
*/
|
||||
@ -48,6 +51,7 @@ public class Metrics {
|
||||
public final Map<Integer, Integer> samples =
|
||||
new HashMap<Integer, Integer>(); // <value, # of events>
|
||||
|
||||
@CalledByNative("HistogramInfo")
|
||||
public HistogramInfo(int min, int max, int bucketCount) {
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
@ -76,18 +80,6 @@ public class Metrics {
|
||||
return getAndResetNative();
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org/8551) Remove.
|
||||
@CalledByNative
|
||||
static Metrics createMetrics() {
|
||||
return new Metrics();
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org/8551) Remove.
|
||||
@CalledByNative
|
||||
static HistogramInfo createHistogramInfo(int min, int max, int bucketCount) {
|
||||
return new HistogramInfo(min, max, bucketCount);
|
||||
}
|
||||
|
||||
private static native void enableNative();
|
||||
private static native Metrics getAndResetNative();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user