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

Commit 1eb5088a authored by Deeraj's avatar Deeraj Committed by Deeraj Soman
Browse files

AudioService: Register MASTER_BALANCE/MONO observer for all users

Audioservice register content observer for MASTER_BALANCE/MONO at the time of initialization/boot up. Registration by default is only applicable for current user which in this case is primary user.
So even when audio balance/mono changes for secondary user, the callback
won't be received in audioservice and hence the settings update won't
have any effect on the audio output.

Bug: 339131898
Test: manual
- Validated that audio output balance and mono varies based on the settings in the secondary user
- atest AudioManagerTest
- atest AudioServiceTest

Change-Id: Ifce17d23e0dd0af61d6e27de7c7da629e9480e77
parent ab3903da
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9448,9 +9448,9 @@ public class AudioService extends IAudioService.Stub
            mContentResolver.registerContentObserver(Settings.Global.getUriFor(
                Settings.Global.DOCK_AUDIO_MEDIA_ENABLED), false, this);
            mContentResolver.registerContentObserver(Settings.System.getUriFor(
                    Settings.System.MASTER_MONO), false, this);
                    Settings.System.MASTER_MONO), false, this, UserHandle.USER_ALL);
            mContentResolver.registerContentObserver(Settings.System.getUriFor(
                    Settings.System.MASTER_BALANCE), false, this);
                    Settings.System.MASTER_BALANCE), false, this, UserHandle.USER_ALL);
            mEncodedSurroundMode = mSettings.getGlobalInt(
                    mContentResolver, Settings.Global.ENCODED_SURROUND_OUTPUT,