parent
d9c9baf516
commit
95aea4291e
|
@ -648,9 +648,14 @@ public class FileBackend {
|
|||
}
|
||||
}
|
||||
|
||||
public String getOriginalPath(Uri uri) {
|
||||
public String getOriginalPath(final Uri uri) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
// On Android 11+ we don’t have access to the original file
|
||||
return null;
|
||||
} else {
|
||||
return FileUtils.getPath(mXmppConnectionService, uri);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyFileToPrivateStorage(File file, Uri uri) throws FileCopyException {
|
||||
Log.d(
|
||||
|
|
|
@ -34,10 +34,8 @@ public class FileUtils {
|
|||
return null;
|
||||
}
|
||||
|
||||
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
|
||||
|
||||
// DocumentProvider
|
||||
if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {
|
||||
if (DocumentsContract.isDocumentUri(context, uri)) {
|
||||
// ExternalStorageProvider
|
||||
if (isExternalStorageDocument(uri)) {
|
||||
final String docId = DocumentsContract.getDocumentId(uri);
|
||||
|
|
Loading…
Reference in a new issue