blob: ef6973270fc7a2bb4330fe515fc07e60deadfb25 [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
Greg Hackmannde908cb2014-07-25 16:38:45 -070022extern int register_android_os_cts_CpuInstructions(JNIEnv*);
23
Rom Lemarchand762312d2014-02-11 10:59:15 -080024extern int register_android_os_cts_TaggedPointer(JNIEnv*);
25
Nick Kralevicha948d732013-05-10 11:06:47 -070026extern int register_android_os_cts_OSFeatures(JNIEnv*);
27
Brian Muramatsub33836e2011-04-19 11:35:22 -070028extern int register_android_os_cts_FileUtils(JNIEnv*);
29
Brian Muramatsu8c005b32010-07-07 16:43:01 -070030jint JNI_OnLoad(JavaVM *vm, void *reserved) {
31 JNIEnv *env = NULL;
32
33 if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) {
34 return JNI_ERR;
35 }
36
Brian Muramatsu8c005b32010-07-07 16:43:01 -070037 if (register_android_os_cts_CpuFeatures(env)) {
38 return JNI_ERR;
39 }
Brian Muramatsu8c005b32010-07-07 16:43:01 -070040
Greg Hackmannde908cb2014-07-25 16:38:45 -070041 if (register_android_os_cts_CpuInstructions(env)) {
42 return JNI_ERR;
43 }
44
Rom Lemarchand762312d2014-02-11 10:59:15 -080045 if (register_android_os_cts_TaggedPointer(env)) {
46 return JNI_ERR;
47 }
48
Nick Kralevicha948d732013-05-10 11:06:47 -070049 if (register_android_os_cts_OSFeatures(env)) {
50 return JNI_ERR;
51 }
52
Brian Muramatsub33836e2011-04-19 11:35:22 -070053 if (register_android_os_cts_FileUtils(env)) {
Brian Muramatsu328dfec2011-05-02 15:13:01 -070054 return JNI_ERR;
55 }
56
Brian Muramatsu8c005b32010-07-07 16:43:01 -070057 return JNI_VERSION_1_4;
58}