Repository navigation
Bluetooth MIC detection logic fixes. Add "Always use Bluetooth mic when available" setting with related state management. - #157
Merged
Conversation
… improve bitrate estimation.
…n handling and waveform rendering; add Kover for code coverage reporting
… Added FormatConfig that describes configuration of each format.
… simplify null checks.
…d on format capabilities.
…sources for each format instead of combined one.
…ML resources for each sample rate instead of combined one.
…esources for each bitrate instead of combined one.
…en available" setting with related state management.
This was referenced Oct 5, 2026
kosatchev
pushed a commit
to kosatchev/Golos
that referenced
this pull request
Dec 2, 2026
…en available" setting with related state management. (Dimowner#157) * AudioDecoder fixes and improvements to handle missing format keys and improve bitrate estimation. * Refactor WavRecorderV2 and AudioRecordingService for improved duration handling and waveform rendering; add Kover for code coverage reporting * Update logic that checks if record should have bitrate value. * Improve error handling in AudioDecoder for track selection and format properties. * Refactor recording format handling to centralize format capabilities. Added FormatConfig that describes configuration of each format. * Unit test coverage for FormatConfig. Refactor FormatConfig methods to simplify null checks. * Update bitrate handling in restore broken record and set bitrate based on format capabilities. * Refactor recording format information display to use multiple HTML resources for each format instead of combined one. * Refactor recording sample rate information display to use multiple HTML resources for each sample rate instead of combined one. * Refactor recording bitrate information display to use multiple HTML resources for each bitrate instead of combined one. * Enable vertical scrolling for dialog text in AppComponents * Added a dialog with recommendation to switch to the new app V2. * Bluetooth MIC detection logic fixes. Add "Always use Bluetooth mic when available" setting with related state management. * Fix AudioManagerHelper release logic to prevent Bluetooth mic issues during recording * Add string resource for always using Bluetooth microphone when available
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.
This pull request introduces a new "Always use Bluetooth mic when available" feature, allowing users to automatically enable Bluetooth microphone routing whenever a compatible device is connected. It also improves the reliability and safety of Bluetooth audio routing by centralizing and safeguarding routing state transitions. The changes span UI, preferences, state management, and the audio helper logic.
Bluetooth mic auto-enable feature:
HomeViewModeland persistence in preferences. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Bluetooth audio routing reliability and safety:
disableBluetoothRouting()method inAudioManagerHelper, ensuring that audio mode and device state are only changed when this helper enabled routing, preventing side effects with other apps. [1] [2] [3] [4] [5] [6]isCommunicationDeviceSetflag to avoid clobbering the global audio mode and to safely restore previous audio states. [1] [2]UI and state management updates:
BluetoothMicSelectorand its usages to support the new "always use" checkbox and wire up callbacks for preference changes. [1] [2] [3] [4]Testing and defaults:
false.Minor improvements:
Other bugs fixed in AudioManagerHelper
isn't already active, tracked via a new isCommunicationDeviceSet flag.
routing (which could interfere with, e.g., an ongoing call). All cleanup now goes through one disableBluetoothRouting() that only undoes what the helper actually set.
mode were never reset. Now routing is disabled whenever it's active and the last Bluetooth input device disappears.
immediately when routing is active (API 31+).