mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
On ColorOS 16, setStreamVolume from a backgrounded app is accepted without an exception and leaves the volume untouched: a debug log from an OPPO PME110 shows "duckMusicVolume(100%): 40 -> 40 (requested 0)" while the same call succeeded in the foreground. duckMusicVolume returned a VolumeDuck for that, so ConversationReaction recorded an Active session, armed the stale backstop, and later "restored" a level that was never left. It now returns null when the read-back shows no decrease, which routes the caller into its existing duck-no-op path: nothing armed, nothing to restore, and a repeat START retries the duck instead of treating the dead session as a keep-alive. The predicate is applied >= prior rather than == prior. A route that quantizes the target back up to the starting index attenuated nothing either, and a volume that came back higher (user raised it between the two reads) must not produce a duck whose restore would undo their change. The WARN says "volume did not decrease" rather than blaming the ROM, since the read-back alone cannot distinguish those three causes.