Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 51d6b3e9 authored by Simon Bowden's avatar Simon Bowden
Browse files

Fix vibration race condition in Ringer.

Currently, there is a "stopped" check at the start of the play
action but this may become stale while loading the ringtone,
and specifically before starting the vibration. This can result
in starting the vibration after its stop signal, and it never
ending.

This is fixed by recording the vibration as pending ("reserving")
when it is being setup. This way, a stop and start are both covered
with checks under the same lock, and the start won't happen if its
reservation was cleared.

MUST_SLEEP to imitate slow ringtone load.

Bug: 278073224
Test: extended RingerTest
Change-Id: Ia0103ea990fe86dc4481b4b2105bf6377ff164ba
parent 464a9a6d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment