Fix issue in ring volume sample not always being played.
- when we adjust the sound volme in Sound settings, we only re-post the stop sample message when we receive the onSampleStarting callback. However, if we change the volume while a sample is still playing, onSampleStarting will not be called as it's already started. This results in shortened sample duration, which in extreme case, the new sample will not be played at all if the new volume change is made almost towards the end of the previous sample period. So, everytime user change the volume, we should re-post the stop sample message, so that the sample playing duration would be extended properly. - also removed the original calls to the onStreamValueChanged() during init, as the original implementation is empty, and during init, we do not need any handling to start/stop the sample. Change-Id: I9f35ddfb6d809eeb83b1a732a09362286ff6ed77 Fixes: 77514234 Test: make RunSettingsRoboTests
Loading
Please register or sign in to comment