Skip to content

Commit

Permalink
[Android] Fix Cursor Not Closing in File Picker to Prevent Log Spam. (
Browse files Browse the repository at this point in the history
…#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>
  • Loading branch information
bhavanesh2001 and MartyIX authored Feb 13, 2025
1 parent 771462d commit 9384625
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Essentials/src/FileSystem/FileSystemUtils.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ static string QueryContentResolverColumn(AndroidUri contentUri, string columnNam
text = cursor.GetString(columnIndex);
}

if (cursor is not null && !cursor.IsClosed)
cursor.Close();

return text;
}

Expand Down

0 comments on commit 9384625

Please # to comment.