Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #include <jni.h> |
| 12 | #undef JNIEXPORT |
| 13 | #define JNIEXPORT __attribute__((visibility("default"))) |
| 14 | |
| 15 | #include "rtc_base/checks.h" |
| 16 | #include "sdk/android/native_api/base/init.h" |
| 17 | #include "sdk/android/native_api/jni/java_types.h" |
| 18 | |
| 19 | // This is called by the VM when the shared library is first loaded. |
| 20 | JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { |
| 21 | webrtc::InitAndroid(vm); |
| 22 | return JNI_VERSION_1_4; |
| 23 | } |