| 655 | } |
| 656 | |
| 657 | MMKV_JNI jstring decodeString(JNIEnv *env, jobject obj, jlong handle, jstring oKey, jstring oDefaultValue) { |
| 658 | MMKV *kv = reinterpret_cast<MMKV *>(handle); |
| 659 | if (kv && oKey) { |
| 660 | string key = jstring2string(env, oKey); |
| 661 | string value; |
| 662 | bool hasValue = kv->getString(key, value); |
| 663 | if (hasValue) { |
| 664 | return string2jstring(env, value); |
| 665 | } |
| 666 | } |
| 667 | return oDefaultValue; |
| 668 | } |
| 669 | |
| 670 | MMKV_JNI jboolean encodeBytes(JNIEnv *env, jobject, jlong handle, jstring oKey, jbyteArray oValue) { |
| 671 | MMKV *kv = reinterpret_cast<MMKV *>(handle); |
nothing calls this directly
no test coverage detected