| 941 | } |
| 942 | |
| 943 | MMKV_JNI void doCheckReSetCryptKey(JNIEnv *env, jobject instance, jstring cryptKey, jboolean aes256) { |
| 944 | MMKV *kv = getMMKV(env, instance); |
| 945 | if (kv) { |
| 946 | string newKey; |
| 947 | if (cryptKey) { |
| 948 | newKey = jstring2string(env, cryptKey); |
| 949 | } |
| 950 | |
| 951 | if (!cryptKey || newKey.empty()) { |
| 952 | kv->checkReSetCryptKey(nullptr, aes256); |
| 953 | } else { |
| 954 | kv->checkReSetCryptKey(&newKey, aes256); |
| 955 | } |
| 956 | } |
| 957 | } |
| 958 | |
| 959 | # else |
| 960 |
nothing calls this directly
no test coverage detected