mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00

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}
23 lines
813 B
C++
23 lines
813 B
C++
/*
|
|
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include <jni.h>
|
|
#undef JNIEXPORT
|
|
#define JNIEXPORT __attribute__((visibility("default")))
|
|
|
|
#include "rtc_base/checks.h"
|
|
#include "sdk/android/native_api/base/init.h"
|
|
#include "sdk/android/native_api/jni/java_types.h"
|
|
|
|
// This is called by the VM when the shared library is first loaded.
|
|
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
|
webrtc::InitAndroid(vm);
|
|
return JNI_VERSION_1_4;
|
|
}
|