Skip to content

Commit

Permalink
#141 - Fix the exportation toast on Android 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
GrazianoCapelli committed Dec 27, 2021
1 parent b61d994 commit f52115d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,12 @@ public String getFileName(Track track) {
*/
public String extractFolderNameFromEncodedUri(String uriPath) {
String spath = Uri.decode(uriPath);
if (spath.contains(":")) {
String[] spathParts = spath.split(":");
String pathSeparator = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) ? ":" : "/";
if (spath.contains(pathSeparator)) {
String[] spathParts = spath.split(pathSeparator);
return spathParts[spathParts.length - 1];
} else return spath;
}
}

// ---------------------------------------------------------------------- Preferences Excluded from Backup
// These are Boolean SharedPreferences that are excluded by automatic Backups
Expand Down

0 comments on commit f52115d

Please sign in to comment.