Flutter Engine
jni_util.cc File Reference
#include "flutter/fml/platform/android/jni_util.h"
#include <sys/prctl.h>
#include <codecvt>
#include <string>
#include "flutter/fml/logging.h"

Go to the source code of this file.

Namespaces

 fml
 
 fml::jni
 

Macros

#define ASSERT_NO_EXCEPTION()   FML_CHECK(env->ExceptionCheck() == JNI_FALSE);
 

Functions

void fml::jni::InitJavaVM (JavaVM *vm)
 
JNIEnv * fml::jni::AttachCurrentThread ()
 
void fml::jni::DetachFromVM ()
 
static std::string fml::jni::UTF16StringToUTF8String (const char16_t *chars, size_t len)
 
std::string fml::jni::JavaStringToString (JNIEnv *env, jstring str)
 
static std::u16string fml::jni::UTF8StringToUTF16String (const std::string &string)
 
ScopedJavaLocalRef< jstring > fml::jni::StringToJavaString (JNIEnv *env, const std::string &u8_string)
 
std::vector< std::string > fml::jni::StringArrayToVector (JNIEnv *env, jobjectArray array)
 
ScopedJavaLocalRef< jobjectArray > fml::jni::VectorToStringArray (JNIEnv *env, const std::vector< std::string > &vector)
 
bool fml::jni::HasException (JNIEnv *env)
 
bool fml::jni::ClearException (JNIEnv *env)
 
std::string fml::jni::GetJavaExceptionInfo (JNIEnv *env, jthrowable java_throwable)
 

Variables

static JavaVM * fml::jni::g_jvm = nullptr
 

Macro Definition Documentation

◆ ASSERT_NO_EXCEPTION

#define ASSERT_NO_EXCEPTION ( )    FML_CHECK(env->ExceptionCheck() == JNI_FALSE);