delete pre lolipop weOwnFile() [Daniel Gultsch]

This commit is contained in:
12aw 2022-03-19 17:20:38 +01:00
parent a79c664d5f
commit ce1df6af95
2 changed files with 3 additions and 3 deletions

View file

@ -2008,7 +2008,7 @@ public class FileBackend {
} }
} }
public static boolean weOwnFile(Context context, Uri uri) { public static boolean weOwnFile(final Uri uri) {
if (uri == null || !ContentResolver.SCHEME_FILE.equals(uri.getScheme())) { if (uri == null || !ContentResolver.SCHEME_FILE.equals(uri.getScheme())) {
return false; return false;
} else { } else {

View file

@ -2749,10 +2749,10 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} }
private List<Uri> cleanUris(final List<Uri> uris) { private List<Uri> cleanUris(final List<Uri> uris) {
Iterator<Uri> iterator = uris.iterator(); final Iterator<Uri> iterator = uris.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
final Uri uri = iterator.next(); final Uri uri = iterator.next();
if (FileBackend.weOwnFile(getActivity(), uri)) { if (FileBackend.weOwnFile(uri)) {
iterator.remove(); iterator.remove();
ToastCompat.makeText(getActivity(), R.string.security_violation_not_attaching_file, ToastCompat.LENGTH_SHORT).show(); ToastCompat.makeText(getActivity(), R.string.security_violation_not_attaching_file, ToastCompat.LENGTH_SHORT).show();
} }