[PR #286] [MERGED] android(fix): parse and send hearing aid data properly #356

Closed
opened 2026-03-02 12:40:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kavishdevar/librepods/pull/286
Author: @kavishdevar
Created: 11/19/2025
Status: Merged
Merged: 11/22/2025
Merged by: @kavishdevar

Base: mainHead: android/fix/hearing-aid


📝 Commits (1)

  • 26581c8 android(fix): parse and send hearing aid data properly

📊 Changes

2 files changed (+73 additions, -106 deletions)

View changed files

📝 android/app/src/main/java/me/kavishdevar/librepods/screens/HearingAidAdjustmentsScreen.kt (+10 -31)
📝 android/app/src/main/java/me/kavishdevar/librepods/screens/UpdateHearingTestScreen.kt (+63 -75)

📄 Description

By copying the transparency customizations code to hearing aid settings, I overwrote the same eq (loss data) for both pods. And, by ATT didn't work, it would use the EQ from AACP, which was actually not linked to the hearing loss data at all.


ai gen'd sumamry:

This pull request refactors how hearing aid settings are managed in both the HearingAidAdjustmentsScreen.kt and UpdateHearingTestScreen.kt files. The main changes involve splitting the equalizer (EQ) state into separate left and right channels, removing unused phone/media EQ code, and improving the way UI state is handled for hearing aid configuration. These updates make the codebase more modular, easier to maintain, and ensure that individual hearing aid parameters are tracked and updated correctly.

Hearing Aid EQ State Refactoring

  • Split the single eq state into separate leftEQ and rightEQ states, updating all references to use these new variables for more accurate per-ear adjustments. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Removal of Unused and Redundant Code

  • Removed all phone/media EQ state and related toggles, as well as legacy code for reading EQ data from the AACPManager, streamlining the state management and initialization logic. [1] [2] [3] [4] [5] [6]

Improved State Management for UI Controls

  • Added dedicated state variables for tone, ambient noise reduction, own voice amplification, and per-ear amplification, ensuring that these parameters are independently tracked and updated in the UI. [1] [2] [3] [4]

UI and Theming Enhancements

  • Updated UI code to use dynamic text color based on the system theme and refactored TextStyle usage for better readability and maintainability.

Cleanup of Legacy Hearing Aid Enable Logic

  • Removed legacy logic related to hearing aid enablement and listeners that were previously tied to the AACPManager, further simplifying the codebase. [1] [2]

These changes collectively enhance the modularity and clarity of hearing aid settings management in the app.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kavishdevar/librepods/pull/286 **Author:** [@kavishdevar](https://github.com/kavishdevar) **Created:** 11/19/2025 **Status:** ✅ Merged **Merged:** 11/22/2025 **Merged by:** [@kavishdevar](https://github.com/kavishdevar) **Base:** `main` ← **Head:** `android/fix/hearing-aid` --- ### 📝 Commits (1) - [`26581c8`](https://github.com/kavishdevar/librepods/commit/26581c8674aabeeba9ce6d925a96713e7cbe8e76) android(fix): parse and send hearing aid data properly ### 📊 Changes **2 files changed** (+73 additions, -106 deletions) <details> <summary>View changed files</summary> 📝 `android/app/src/main/java/me/kavishdevar/librepods/screens/HearingAidAdjustmentsScreen.kt` (+10 -31) 📝 `android/app/src/main/java/me/kavishdevar/librepods/screens/UpdateHearingTestScreen.kt` (+63 -75) </details> ### 📄 Description By copying the transparency customizations code to hearing aid settings, I overwrote the same eq (loss data) for both pods. And, by ATT didn't work, it would use the EQ from AACP, which was actually not linked to the hearing loss data at all. --- ai gen'd sumamry: This pull request refactors how hearing aid settings are managed in both the `HearingAidAdjustmentsScreen.kt` and `UpdateHearingTestScreen.kt` files. The main changes involve splitting the equalizer (EQ) state into separate left and right channels, removing unused phone/media EQ code, and improving the way UI state is handled for hearing aid configuration. These updates make the codebase more modular, easier to maintain, and ensure that individual hearing aid parameters are tracked and updated correctly. ### Hearing Aid EQ State Refactoring * Split the single `eq` state into separate `leftEQ` and `rightEQ` states, updating all references to use these new variables for more accurate per-ear adjustments. [[1]](diffhunk://#diff-0045c8d2f573f06de120ab07343df3eeba225b7a4460cd4ad3133e70d9844273L99-L105) [[2]](diffhunk://#diff-0045c8d2f573f06de120ab07343df3eeba225b7a4460cd4ad3133e70d9844273L114-R112) [[3]](diffhunk://#diff-0045c8d2f573f06de120ab07343df3eeba225b7a4460cd4ad3133e70d9844273L160-R158) [[4]](diffhunk://#diff-0045c8d2f573f06de120ab07343df3eeba225b7a4460cd4ad3133e70d9844273L195-R194) [[5]](diffhunk://#diff-0045c8d2f573f06de120ab07343df3eeba225b7a4460cd4ad3133e70d9844273L264-R243) [[6]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL131-L164) [[7]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbR164-R168) [[8]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL208-R208) [[9]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbR243-R247) ### Removal of Unused and Redundant Code * Removed all phone/media EQ state and related toggles, as well as legacy code for reading EQ data from the `AACPManager`, streamlining the state management and initialization logic. [[1]](diffhunk://#diff-0045c8d2f573f06de120ab07343df3eeba225b7a4460cd4ad3133e70d9844273L99-L105) [[2]](diffhunk://#diff-0045c8d2f573f06de120ab07343df3eeba225b7a4460cd4ad3133e70d9844273L219-L238) [[3]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL65) [[4]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL94) [[5]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL131-L164) [[6]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL230-L247) ### Improved State Management for UI Controls * Added dedicated state variables for tone, ambient noise reduction, own voice amplification, and per-ear amplification, ensuring that these parameters are independently tracked and updated in the UI. [[1]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbR109-R127) [[2]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbR164-R168) [[3]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL208-R208) [[4]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbR243-R247) ### UI and Theming Enhancements * Updated UI code to use dynamic text color based on the system theme and refactored `TextStyle` usage for better readability and maintainability. ### Cleanup of Legacy Hearing Aid Enable Logic * Removed legacy logic related to hearing aid enablement and listeners that were previously tied to the `AACPManager`, further simplifying the codebase. [[1]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL131-L164) [[2]](diffhunk://#diff-b1cfa2e63a29227bcc88c462290b9e57be45d4695b7382aa0d83a8f0aef87bbbL181-R184) These changes collectively enhance the modularity and clarity of hearing aid settings management in the app. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 12:40:49 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librepods#356
No description provided.