Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Android] Fix Cursor Not Closing in File Picker to Prevent Log Spam. #27718

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

bhavanesh2001
Copy link
Contributor

@bhavanesh2001 bhavanesh2001 commented Feb 11, 2025

Description of Change

When using the File Picker API (FilePicker.PickAsync()) on Android , following warnings are being spammed on debug console:
Screenshot 2025-02-11 at 11 30 46 PM
This issue occurs because cursor does not being immediately closed.Even though the cursor is inside a using statement, Android system still logs these warnings.To ensure immediate cleanup, this PR explicitly calls cursor.Close();preventing log spam and potential resource leaks.

Issues Fixed

Fixes #27716

@bhavanesh2001 bhavanesh2001 requested a review from a team as a code owner February 11, 2025 18:50
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Feb 11, 2025
Copy link
Contributor

Hey there @bhavanesh2001! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Co-authored-by: MartyIX <203266+MartyIX@users.noreply.github.com>
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info essentials-file-picker labels Feb 12, 2025
@jfversluis jfversluis merged commit 9384625 into dotnet:main Feb 13, 2025
123 checks passed
@bhavanesh2001 bhavanesh2001 deleted the filepicker_fix branch February 13, 2025 18:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info community ✨ Community Contribution essentials-file-picker partner/syncfusion/review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[System] A resource failed to call CursorWindow.close. | Warning spamming while using FilePicker on Android
5 participants