feat: configurable ring volume
Adds a volume slider (1-100% of the alarm stream) to Settings. RingService plays at the configured percentage instead of always maxing STREAM_ALARM.
This commit is contained in:
parent
e83c7c3344
commit
4a04052845
6 changed files with 71 additions and 3 deletions
|
|
@ -30,6 +30,9 @@ Choose between:
|
|||
Playback runs for the configured number of seconds (`5–300`, default **30**), then
|
||||
the previous volume is restored.
|
||||
|
||||
### Volume
|
||||
The ring plays at a configurable percentage (`1–100%`) of the alarm-stream volume.
|
||||
|
||||
---
|
||||
|
||||
## How Do Not Disturb Override Works (read this)
|
||||
|
|
@ -50,7 +53,7 @@ Only after the user flips that toggle will a trigger actually ring.
|
|||
|
||||
When access **is** granted, `RingService`:
|
||||
- saves the current **alarm-stream** volume,
|
||||
- forces `AudioManager.STREAM_ALARM` to max,
|
||||
- sets `AudioManager.STREAM_ALARM` to the configured volume percentage,
|
||||
- requests `AUDIOFOCUS_GAIN_TRANSIENT` using `AudioAttributes.USAGE_ALARM`,
|
||||
- plays on the **alarm stream** — the one stream Do Not Disturb does **not**
|
||||
silence by default (media/music *is* silenced), which is what lets the ring
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue