feat(android): Auto-disable CA volume ducking when only one AirPod is worn (#616)#675
Open
QuantumBreakz wants to merge 1 commit into
Open
feat(android): Auto-disable CA volume ducking when only one AirPod is worn (#616)#675QuantumBreakz wants to merge 1 commit into
QuantumBreakz wants to merge 1 commit into
Conversation
- Add conversationalAwarenessBothPodsOnly field to ServiceConfig (default false) - Seed 'conversational_awareness_both_pods_only' pref on first run (default false) - Load pref in initializeConfig() and handle live changes in onSharedPreferenceChanged() - Add conversationalAwarenessBothPodsOnlyEnabled to AppSettingsUiState - Add setConversationalAwarenessBothPodsOnlyEnabled() setter to AppSettingsViewModel - Add StyledToggle in AppSettingsScreen inside the Conversational Awareness list - Add string resources: conversational_awareness_both_pods_only + _description Default is off — no behavior change for existing users. Fixes librepods-org#616
Author
|
Hey @kavishdevar 👋 This PR implements the feature requested in #616 by @tabjy using the app-side suppression approach you approved. Since this is submitted from a fork, I can't set reviewers or assignees programmatically. Could you please:
Build is verified: Happy to make any changes based on your review! 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #616
Implements the app-side suppression approach suggested by @tabjy and accepted by @kavishdevar.
When the new "Only when both AirPods are worn" toggle is ON, the Conversational Awareness volume-ducking event (
startSpeaking()) is silently ignored if fewer than two buds are currently in-ear. ThestopSpeaking()(volume restore) path is never gated, so volume can never get stuck low.Changes
AirPodsService.ktconversationalAwarenessBothPodsOnly: Boolean = falsetoServiceConfigconversational_awareness_both_pods_onlyin first-run SharedPreferences defaults (false)initializeConfig()onSharedPreferenceChanged()onConversationAwarenessReceived():AppSettingsViewModel.ktconversationalAwarenessBothPodsOnlyEnabled: Boolean = falsetoAppSettingsUiStateloadSettings()setConversationalAwarenessBothPodsOnlyEnabled(enabled: Boolean)setterAppSettingsScreen.ktStyledToggleinside the existing Conversational AwarenessStyledList, between "Pause Music" and "Relative volume"strings.xmlBehaviour
The
stopSpeaking()path always runs regardless of toggle state — volume is always restored.Testing
Build verified:
./gradlew assembleFossDebug→ BUILD SUCCESSFUL (51 tasks, 0 errors).Manual test steps:
Notes
falsein all five required places — zero behaviour change for existing usersearDetectionNotification.statusarray (0x00= in-ear)