From dc0dea95767256cd24f0a37ba0bae00c3cfb3bf4 Mon Sep 17 00:00:00 2001 From: fanchao Date: Mon, 29 Jul 2024 11:26:31 +1000 Subject: [PATCH] Fix double closing on memory file --- .../java/org/thoughtcrime/securesms/util/MemoryFileUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/MemoryFileUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/MemoryFileUtil.java index 4ee43e1e9ce..f193827efda 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/MemoryFileUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/MemoryFileUtil.java @@ -22,7 +22,7 @@ public static ParcelFileDescriptor getParcelFileDescriptor(MemoryFile file) thro int fd = field.getInt(fileDescriptor); - return ParcelFileDescriptor.adoptFd(fd); + return ParcelFileDescriptor.fromFd(fd); } catch (IllegalAccessException e) { throw new IOException(e); } catch (InvocationTargetException e) {