| 836 | } |
| 837 | |
| 838 | MMKV_JNI jboolean encodeSet(JNIEnv *env, jobject, jlong handle, jstring oKey, jobjectArray arrStr) { |
| 839 | MMKV *kv = reinterpret_cast<MMKV *>(handle); |
| 840 | if (kv && oKey) { |
| 841 | string key = jstring2string(env, oKey); |
| 842 | if (arrStr) { |
| 843 | vector<string> value = jarray2vector(env, arrStr); |
| 844 | return (jboolean) kv->set(value, key); |
| 845 | } else { |
| 846 | kv->removeValueForKey(key); |
| 847 | return (jboolean) true; |
| 848 | } |
| 849 | } |
| 850 | return (jboolean) false; |
| 851 | } |
| 852 | |
| 853 | MMKV_JNI jboolean encodeSet_2(JNIEnv *env, jobject, jlong handle, jstring oKey, jobjectArray arrStr, jint expiration) { |
| 854 | MMKV *kv = reinterpret_cast<MMKV *>(handle); |
nothing calls this directly
no test coverage detected