Merge pull request #9221 from JosJuice/android-saf-sd-card

Android: Use storage access framework for custom SD card paths
This commit is contained in:
JMC47
2020-12-10 16:32:43 -05:00
committed by GitHub
14 changed files with 311 additions and 47 deletions

View File

@ -12,7 +12,16 @@ std::string GetJString(JNIEnv* env, jstring jstr);
jstring ToJString(JNIEnv* env, const std::string& str);
std::vector<std::string> JStringArrayToVector(JNIEnv* env, jobjectArray array);
// Returns true if the given path should be opened as Android content instead of a normal file.
bool IsPathAndroidContent(const std::string& uri);
// Turns a C/C++ style mode (e.g. "rb") into one which can be used with OpenAndroidContent.
std::string OpenModeToAndroid(std::string mode);
// Opens a given file and returns a file descriptor.
int OpenAndroidContent(const std::string& uri, const std::string& mode);
// Deletes a given file.
bool DeleteAndroidContent(const std::string& uri);
int GetNetworkIpAddress();
int GetNetworkPrefixLength();