| 65 | bool cursorChanged = false; |
| 66 | |
| 67 | std::string getFileNameFromURI(const std::string& uri) { |
| 68 | JNIEnv* env = static_cast<JNIEnv*>(SDL_GetAndroidJNIEnv()); |
| 69 | std::string strToRet = ""; |
| 70 | jni_local_frame(env, 16, [&] { |
| 71 | jobject activity = (jobject) SDL_GetAndroidActivity(); |
| 72 | jclass clazz = env->GetObjectClass(activity); |
| 73 | jmethodID method_id = env->GetStaticMethodID(clazz, "getFileNameFromUriString", |
| 74 | "(Ljava/lang/String;)Ljava/lang/String;"); |
| 75 | jobject obj = env->CallStaticObjectMethod(clazz, method_id, string2jstring(env, uri)); |
| 76 | if(obj == nullptr) |
| 77 | return; |
| 78 | strToRet = jstring2string(env, static_cast<jstring>(obj)); |
| 79 | }); |
| 80 | return strToRet; |
| 81 | } |
| 82 | |
| 83 | void shareInternalFiles(const std::vector<std::string>& filePaths, const std::string& mimeType) { |
| 84 | if(filePaths.empty()) |
no test coverage detected