Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Android] Avoid possible crash using essentials Battery #18386

Merged
merged 7 commits into from Dec 1, 2023
Merged

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Error with a simple fix that I have seen doing triage taking a look to new issues.
Avoid BatteryInfoChanged unsubscribe crashes when no subscribe has happened before.

Issues Fixed

Fixes #18376

@jsuarezruiz jsuarezruiz added t/bug Something isn't working platform/android 🤖 area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info labels Oct 26, 2023
@jsuarezruiz jsuarezruiz requested a review from a team as a code owner October 26, 2023 17:55
jonathanpeppers
jonathanpeppers previously approved these changes Nov 8, 2023
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, #nullable enable looks like it may have caught some other future bugs.

src/Essentials/src/Battery/Battery.android.cs Outdated Show resolved Hide resolved
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
@jfversluis jfversluis merged commit 8546f63 into main Dec 1, 2023
47 checks passed
@jfversluis jfversluis deleted the fix-18376 branch December 1, 2023 10:44
@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android - Event handler BatteryInfoChanged unsubscribe crashes when no subscribe has happened before
4 participants