Skip to content

Add pause-on-volume-zero feature and update settings UI#2415

Open
Amonoman wants to merge 3 commits into
PixelPlayerHQ:masterfrom
Amonoman:master
Open

Add pause-on-volume-zero feature and update settings UI#2415
Amonoman wants to merge 3 commits into
PixelPlayerHQ:masterfrom
Amonoman:master

Conversation

@Amonoman

Copy link
Copy Markdown
Contributor

Automatically pauses playback when the media volume is set to 0.

Changes

  • Add PAUSE_ON_VOLUME_ZERO DataStore preference to UserPreferencesRepository
  • Observe system volume via ContentObserver in MusicService and pause when media stream hits 0
  • ReplayGain programmatic volume adjustments are unaffected
  • Add Volume subsection with toggle to Playback settings in SettingsCategoryScreen
  • Wire pauseOnVolumeZero into SettingsViewModel uiState and setter
  • Inject settings_volume_section, settings_pause_on_volume_zero and _desc into strings_settings.xml for all 12 locales (ar, de, es, fr, in, it, ko, nb, ru, tr, zh-rCN)

Amonoman added 3 commits June 19, 2026 19:54
- Add PAUSE_ON_VOLUME_ZERO DataStore key + flow + setter to UserPreferencesRepository
- Collect pref in MusicService and pause playback when volume hits 0
- ReplayGain programmatic volume adjustments are unaffected
- Add Python script to inject localized strings into all 12 locale files
- Add ContentObserver on Settings.System.CONTENT_URI to detect hardware
  volume key changes and pause when media stream reaches 0
- Registers observer in onCreate, unregisters in onDestroy
- Add Volume subsection with SwitchSettingItem to SettingsCategoryScreen
- Add pauseOnVolumeZero field to SettingsUiState
- Add pauseOnVolumeZeroFlow to SettingsViewModel combine() block
- Add setPauseOnVolumeZero() setter in SettingsViewModel
- Inject settings_volume_section, settings_pause_on_volume_zero and _desc
  into strings_settings.xml for all 12 locales
- Remove duplicate keys from strings.xml (AAPT2 duplicate resources fix)
- Fix rogue spaces in Korean strings_settings.xml entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant