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

Skip to content
Commit 085346ac authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

AudioService: fix deadlock

Source of deadlock:
Thread A:
 readAudioSettings()
  -> checkAllAliasStreamVolumes()
    -> synchronized (VolumeStreamState.class)
         -> mStreamStates[streamType].setAllIndexes()
            -> synchronized (mSettingsLock)
Thread B:
 updateStreamVolumeAlias()
  -> mStreamStates[ACCESSIBILITY].setAllIndexes()
     -> synchronized (mSettingsLock)
        -> synchronized (VolumeStreamState.class)

Fix:
 Ensure all calls to VSS.setAllIndexes() are synchronized
 on mSettingsLock then on VolumeStreamState.class.

Bug: 72122435
Test: see bug for repro
Change-Id: I16ad1d1df88256291c36d8f5b8ebe830fe1b0b84
parent 11817c6b
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