Skip to content

Commit 9384625

Browse files
[Android] Fix Cursor Not Closing in File Picker to Prevent Log Spam. (#27718)
* explicitly close the cursor * changing to not null Co-authored-by: MartyIX <203266+MartyIX@users.noreply.github.com> --------- Co-authored-by: MartyIX <203266+MartyIX@users.noreply.github.com>
1 parent 771462d commit 9384625

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Essentials/src/FileSystem/FileSystemUtils.android.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ static string QueryContentResolverColumn(AndroidUri contentUri, string columnNam
345345
text = cursor.GetString(columnIndex);
346346
}
347347

348+
if (cursor is not null && !cursor.IsClosed)
349+
cursor.Close();
350+
348351
return text;
349352
}
350353

0 commit comments

Comments
 (0)