diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-04-14 14:44:21 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-04-14 14:44:21 +0000 |
commit | f11789c7532131b05ba5d7c86ee5b432f49ba099 (patch) | |
tree | 2aba65167e81ebf211f1503a64fa3f5ccc08c537 /nativeruntime/cpp/jni/AndroidRuntime.cpp | |
parent | 70ae854c1a5a6d161490f4f6a700ea24cbea3fae (diff) | |
parent | 669bd7c87aad3fc72259b08e79aeacf34e9ebced (diff) | |
download | robolectric-android13-qpr3-c-s8-release.tar.gz |
Snap for 9936701 from 669bd7c87aad3fc72259b08e79aeacf34e9ebced to tm-qpr3-c-releaseandroid-13.0.0_r82android-13.0.0_r81android-13.0.0_r80android-13.0.0_r74android-13.0.0_r73android-13.0.0_r72android-13.0.0_r66android-13.0.0_r65android-13.0.0_r64android-13.0.0_r60android-13.0.0_r59android-13.0.0_r58android13-qpr3-c-s8-releaseandroid13-qpr3-c-s7-releaseandroid13-qpr3-c-s6-releaseandroid13-qpr3-c-s5-releaseandroid13-qpr3-c-s4-releaseandroid13-qpr3-c-s3-releaseandroid13-qpr3-c-s2-releaseandroid13-qpr3-c-s12-releaseandroid13-qpr3-c-s11-releaseandroid13-qpr3-c-s10-releaseandroid13-qpr3-c-s1-release
Change-Id: Iaf1372b35245ad3745bae61ebfafc7624856de14
Diffstat (limited to 'nativeruntime/cpp/jni/AndroidRuntime.cpp')
-rw-r--r-- | nativeruntime/cpp/jni/AndroidRuntime.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/nativeruntime/cpp/jni/AndroidRuntime.cpp b/nativeruntime/cpp/jni/AndroidRuntime.cpp deleted file mode 100644 index e22381c17..000000000 --- a/nativeruntime/cpp/jni/AndroidRuntime.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2005 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Derived from -// https://cs.android.com/android/platform/superproject/+/android-11.0.0_r1:frameworks/base/core/jni/AndroidRuntime.cpp - -#include "AndroidRuntime.h" - -#include <assert.h> - -#include "jni.h" - -using namespace android; - -/*static*/ JavaVM* AndroidRuntime::mJavaVM = nullptr; - -/*static*/ JavaVM* AndroidRuntime::getJavaVM() { - return AndroidRuntime::mJavaVM; -} - -/* - * Get the JNIEnv pointer for this thread. - * - * Returns NULL if the slot wasn't allocated or populated. - */ -/*static*/ JNIEnv* AndroidRuntime::getJNIEnv() { - JNIEnv* env; - JavaVM* vm = AndroidRuntime::getJavaVM(); - assert(vm != nullptr); - - if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_4) != JNI_OK) - return nullptr; - return env; -} |