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

Function encodeSet_2

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

Source from the content-addressed store, hash-verified

851}
852
853MMKV_JNI jboolean encodeSet_2(JNIEnv *env, jobject, jlong handle, jstring oKey, jobjectArray arrStr, jint expiration) {
854 MMKV *kv = reinterpret_cast<MMKV *>(handle);
855 if (kv && oKey) {
856 string key = jstring2string(env, oKey);
857 if (arrStr) {
858 vector<string> value = jarray2vector(env, arrStr);
859 return (jboolean) kv->set(value, key, (uint32_t) expiration);
860 } else {
861 kv->removeValueForKey(key);
862 return (jboolean) true;
863 }
864 }
865 return (jboolean) false;
866}
867
868MMKV_JNI jobjectArray decodeStringSet(JNIEnv *env, jobject, jlong handle, jstring oKey) {
869 MMKV *kv = reinterpret_cast<MMKV *>(handle);

Callers

nothing calls this directly

Calls 4

jarray2vectorFunction · 0.85
jstring2stringFunction · 0.70
setMethod · 0.45
removeValueForKeyMethod · 0.45

Tested by

no test coverage detected