-
-
Notifications
You must be signed in to change notification settings - Fork 825
Move Health Connect to main module #5612
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR moves the Health Connect sensor manager from the minimal build variant to the main module, enabling Health Connect functionality to work on minimal builds when the SDK is available. The key motivation is to support de-googled phones where Health Connect may be present.
- Health Connect functionality is now available in minimal builds
- Import aliases are replaced with direct imports and companion object references
- The stub implementation is removed from the minimal variant
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| app/src/minimal/kotlin/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt | Removes the stub implementation that was previously used in minimal builds |
| app/src/main/kotlin/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt | Updates imports and companion object references after moving to main module |
app/src/main/kotlin/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ktlint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
Why remove the |
i can switch it back, that was all android studio lol |
|
Simple move and changing the dependency looks good, also after reviewing the docs, but let's wait for user feedback before merging. |
Summary
Based on #5605 health connect should work on the minimal build if the SDK is available. We have a user who can test on a de-googled phone to confirm it works for them. Our hasSensor check should work as is here.
Checklist
Screenshots
Link to pull request in documentation repositories
User Documentation: home-assistant/companion.home-assistant#1230
Any other notes
We should probably get some users to test and confirm, on my end sensors continue to work as expected.
I used android studio to move the files and committed as is, the
Companionaddition in multiple locations surprised me but works.