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

Fix casting for Health Connect buildReadRecordsRequest result #4931

Conversation

jpelgrom
Copy link
Member

Summary

Add the magic code* so manually casting the result from buildReadRecordsRequest is no longer needed and quite a large list of compilation warnings for this class like below is resolved:

/app/src/full/java/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt:474:102 Unchecked cast of 'androidx.health.connect.client.request.ReadRecordsRequest<out androidx.health.connect.client.records.Record>' to 'androidx.health.connect.client.request.ReadRecordsRequest<androidx.health.connect.client.records.ActiveCaloriesBurnedRecord>'.

* similar to line 984

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

@dshokouhi dshokouhi merged commit f76bc6a into home-assistant:master Dec 24, 2024
4 checks passed
@jpelgrom jpelgrom deleted the health-connect-readrecordsrequest-casting branch December 24, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants