blob: d6a1d2b76c1528540aade5c28587c52136beef15 [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
20#ifndef CTS_TARGET_SIMULATOR
21extern int register_android_os_cts_CpuFeatures(JNIEnv*);
22#endif
23
Brian Muramatsub33836e2011-04-19 11:35:22 -070024extern int register_android_os_cts_FileUtils(JNIEnv*);
25
Brian Muramatsu8c005b32010-07-07 16:43:01 -070026jint JNI_OnLoad(JavaVM *vm, void *reserved) {
27 JNIEnv *env = NULL;
28
29 if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) {
30 return JNI_ERR;
31 }
32
33#ifndef CTS_TARGET_SIMULATOR
34 if (register_android_os_cts_CpuFeatures(env)) {
35 return JNI_ERR;
36 }
37#endif
38
Brian Muramatsub33836e2011-04-19 11:35:22 -070039 if (register_android_os_cts_FileUtils(env)) {
40 return JNI_ERR;
41 }
42
Brian Muramatsu8c005b32010-07-07 16:43:01 -070043 return JNI_VERSION_1_4;
44}