blob: 06be7c74987c2288ab4fc98a2d2b6e20b412966c [file] [log] [blame]
Brian Muramatsu8c005b32010-07-07 16:43:01 -07001/*
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 <jni.h>
18#include <stdio.h>
19
Brian Muramatsu8c005b32010-07-07 16:43:01 -070020extern int register_android_os_cts_CpuFeatures(JNIEnv*);
Brian Muramatsu8c005b32010-07-07 16:43:01 -070021
Rom Lemarchand762312d2014-02-11 10:59:15 -080022extern int register_android_os_cts_TaggedPointer(JNIEnv*);
23
Nick Kralevicha948d732013-05-10 11:06:47 -070024extern int register_android_os_cts_OSFeatures(JNIEnv*);
25
Brian Muramatsub33836e2011-04-19 11:35:22 -070026extern int register_android_os_cts_FileUtils(JNIEnv*);
27
Brian Muramatsu8c005b32010-07-07 16:43:01 -070028jint JNI_OnLoad(JavaVM *vm, void *reserved) {
29 JNIEnv *env = NULL;
30
31 if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) {
32 return JNI_ERR;
33 }
34
Brian Muramatsu8c005b32010-07-07 16:43:01 -070035 if (register_android_os_cts_CpuFeatures(env)) {
36 return JNI_ERR;
37 }
Brian Muramatsu8c005b32010-07-07 16:43:01 -070038
Rom Lemarchand762312d2014-02-11 10:59:15 -080039 if (register_android_os_cts_TaggedPointer(env)) {
40 return JNI_ERR;
41 }
42
Nick Kralevicha948d732013-05-10 11:06:47 -070043 if (register_android_os_cts_OSFeatures(env)) {
44 return JNI_ERR;
45 }
46
Brian Muramatsub33836e2011-04-19 11:35:22 -070047 if (register_android_os_cts_FileUtils(env)) {
Brian Muramatsu328dfec2011-05-02 15:13:01 -070048 return JNI_ERR;
49 }
50
Brian Muramatsu8c005b32010-07-07 16:43:01 -070051 return JNI_VERSION_1_4;
52}