Implements JavaToNativeStringMap and adds tests for native API.

Implements JavaToNativeStringMap that is a replacement for
JavaToStdMapStrings. It uses a new template method JavaToNativeMap. Also
adds testing support for native API and a test for JavaToNativeStringMap.

Bug: webrtc:8769
Change-Id: I580d4992a899ebe02da39af450fa51d52ee9b88b
Reviewed-on: https://webrtc-review.googlesource.com/48060
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21967}
This commit is contained in:
Sami Kalliomäki
2018-02-07 16:59:33 +01:00
committed by Commit Bot
parent 1bc1ec43a3
commit 78498cf5ee
11 changed files with 204 additions and 23 deletions

View File

@ -36,13 +36,13 @@ class JniHelper {
// TODO(bugs.webrtc.org/8606): Remove.
@CalledByNative
static String getKey(Map.Entry<String, String> entry) {
static Object getKey(Map.Entry entry) {
return entry.getKey();
}
// TODO(bugs.webrtc.org/8606): Remove.
@CalledByNative
static String getValue(Map.Entry<String, String> entry) {
static Object getValue(Map.Entry entry) {
return entry.getValue();
}
}