Reason for revert:
Breaks downstream dependencies
Original issue's description:
> Combine webrtc/api/java/android and webrtc/api/java/src.
>
> It used to be that there was a Java api for devices not running Android
> but that is no longer the case. I combined the directories and made
> the folder structure chromium style.
>
> BUG=webrtc:6067
> R=magjed@webrtc.org, tommi@webrtc.org
>
> Committed: ceefe20dd6
TBR=magjed@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6067
Review URL: https://codereview.webrtc.org/2106333005 .
Cr-Commit-Position: refs/heads/master@{#13357}
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
/*
|
|
* Copyright 2015 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 "webrtc/api/java/jni/classreferenceholder.h"
|
|
#include "webrtc/api/java/jni/jni_helpers.h"
|
|
#include "webrtc/base/ssladapter.h"
|
|
|
|
namespace webrtc_jni {
|
|
|
|
extern "C" jint JNIEXPORT JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) {
|
|
jint ret = InitGlobalJniVariables(jvm);
|
|
RTC_DCHECK_GE(ret, 0);
|
|
if (ret < 0)
|
|
return -1;
|
|
|
|
RTC_CHECK(rtc::InitializeSSL()) << "Failed to InitializeSSL()";
|
|
LoadGlobalClassReferenceHolder();
|
|
|
|
return ret;
|
|
}
|
|
|
|
extern "C" void JNIEXPORT JNICALL JNI_OnUnLoad(JavaVM *jvm, void *reserved) {
|
|
FreeGlobalClassReferenceHolder();
|
|
RTC_CHECK(rtc::CleanupSSL()) << "Failed to CleanupSSL()";
|
|
}
|
|
|
|
} // namespace webrtc_jni
|