Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
jni_util.cc File Reference
#include "flutter/fml/platform/android/jni_util.h"
#include <sys/prctl.h>
#include <memory>
#include <string>
#include "flutter/fml/logging.h"
#include "flutter/fml/string_conversion.h"

Go to the source code of this file.

Classes

struct  fml::jni::JNIDetach
 

Namespaces

namespace  fml
 
namespace  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 ()
 
std::string fml::jni::JavaStringToString (JNIEnv *env, jstring str)
 
ScopedJavaLocalRef< jstring > fml::jni::StringToJavaString (JNIEnv *env, const std::string &u8_string)
 
std::vector< std::string > fml::jni::StringArrayToVector (JNIEnv *env, jobjectArray array)
 
std::vector< std::string > fml::jni::StringListToVector (JNIEnv *env, jobject list)
 
ScopedJavaLocalRef< jobjectArray > fml::jni::VectorToStringArray (JNIEnv *env, const std::vector< std::string > &vector)
 
ScopedJavaLocalRef< jobjectArray > fml::jni::VectorToBufferArray (JNIEnv *env, const std::vector< std::vector< uint8_t > > &vector)
 
bool fml::jni::HasException (JNIEnv *env)
 
bool fml::jni::ClearException (JNIEnv *env, bool silent)
 
bool fml::jni::CheckException (JNIEnv *env)
 
std::string fml::jni::GetJavaExceptionInfo (JNIEnv *env, jthrowable java_throwable)
 

Variables

static JavaVM * fml::jni::g_jvm = nullptr
 
static thread_local std::unique_ptr< JNIDetachfml::jni::tls_jni_detach
 

Macro Definition Documentation

◆ ASSERT_NO_EXCEPTION

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

Definition at line 20 of file jni_util.cc.