MCPcopy Create free account
hub / github.com/Tencent/MMKV / decodeBool

Function decodeBool

Android/MMKV/mmkv/src/main/cpp/native-bridge.cpp:510–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510MMKV_JNI jboolean decodeBool(JNIEnv *env, jobject, jlong handle, jstring oKey, jboolean defaultValue) {
511 MMKV *kv = reinterpret_cast<MMKV *>(handle);
512 if (kv && oKey) {
513 string key = jstring2string(env, oKey);
514 return (jboolean) kv->getBool(key, defaultValue);
515 }
516 return defaultValue;
517}
518
519MMKV_JNI jboolean encodeInt(JNIEnv *env, jobject obj, jlong handle, jstring oKey, jint value) {
520 MMKV *kv = reinterpret_cast<MMKV *>(handle);

Callers

nothing calls this directly

Calls 2

jstring2stringFunction · 0.70
getBoolMethod · 0.45

Tested by

no test coverage detected