allow deletion of all files
This commit is contained in:
parent
ceceead505
commit
56f01c29b9
|
@ -362,8 +362,12 @@ public class FileBackend {
|
|||
}
|
||||
|
||||
private static boolean weOwnFileLollipop(final Uri uri) {
|
||||
final String path = uri.getPath();
|
||||
if (path == null) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
File file = new File(uri.getPath());
|
||||
File file = new File(path);
|
||||
FileDescriptor fd =
|
||||
ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY)
|
||||
.getFileDescriptor();
|
||||
|
|
|
@ -1184,11 +1184,8 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
|||
cancelTransmission.setVisible(true);
|
||||
}
|
||||
if (m.isFileOrImage() && !deleted && !cancelable) {
|
||||
final String path = m.getRelativeFilePath();
|
||||
if (path == null || !path.startsWith("/")) {
|
||||
deleteFile.setVisible(true);
|
||||
deleteFile.setTitle(activity.getString(R.string.delete_x_file, UIHelper.getFileDescriptionString(activity, m)));
|
||||
}
|
||||
deleteFile.setVisible(true);
|
||||
deleteFile.setTitle(activity.getString(R.string.delete_x_file, UIHelper.getFileDescriptionString(activity, m)));
|
||||
}
|
||||
if (showError) {
|
||||
showErrorMessage.setVisible(true);
|
||||
|
|
Loading…
Reference in a new issue