blob: b6177a1e3aca89b6b8167f1f9934521306cb5548 [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
24jint JNI_OnLoad(JavaVM *vm, void *reserved) {
25 JNIEnv *env = NULL;
26
27 if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) {
28 return JNI_ERR;
29 }
30
31#ifndef CTS_TARGET_SIMULATOR
32 if (register_android_os_cts_CpuFeatures(env)) {
33 return JNI_ERR;
34 }
35#endif
36
37 return JNI_VERSION_1_4;
38}