blob: b1d7e82c73ae681af8df2b0bc78da765978740ef [file] [log] [blame]
Dimitry Ivanov4449ef52016-02-25 17:41:13 -08001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <poll.h>
18#include <android/dlext.h>
19
20#include "core_jni_helpers.h"
21
22namespace android
23{
24
25static jstring getDlWarning_native(JNIEnv* env, jobject) {
26 const char* text = android_dlwarning();
27 return text == nullptr ? nullptr : env->NewStringUTF(text);
28}
29
30static const JNINativeMethod g_methods[] = {
31 { "getDlWarning",
32 "()Ljava/lang/String;",
33 reinterpret_cast<void*>(getDlWarning_native) },
34};
35
36static const char* const kActivityPathName = "android/app/Activity";
37
38int register_android_app_Activity(JNIEnv* env) {
39 return RegisterMethodsOrDie(env, kActivityPathName, g_methods, NELEM(g_methods));
40}
41
42} // namespace android