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

Commit 62730e15 authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Merge "Prevent audio players starting on startup." into cm-10.1

parents 70dd5148 b9719055
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -516,6 +516,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
        intentFilter.addAction(Intent.ACTION_BOOT_COMPLETED);
        intentFilter.addAction(Intent.ACTION_SCREEN_ON);
        intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
        intentFilter.addAction(Intent.ACTION_USER_BACKGROUND);
        intentFilter.addAction(Intent.ACTION_USER_SWITCHED);
        intentFilter.addAction(Intent.ACTION_WIFI_DISPLAY_AUDIO);

@@ -3975,7 +3976,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
                AudioSystem.setParameters("screen_state=off");
            } else if (action.equalsIgnoreCase(Intent.ACTION_CONFIGURATION_CHANGED)) {
                handleConfigurationChanged(context);
            } else if (action.equals(Intent.ACTION_USER_SWITCHED)) {
            } else if (action.equals(Intent.ACTION_USER_BACKGROUND)) {
                // attempt to stop music playback for background user
                sendMsg(mAudioHandler,
                        MSG_BROADCAST_AUDIO_BECOMING_NOISY,
@@ -3984,6 +3985,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
                        0,
                        null,
                        0);
            } else if (action.equals(Intent.ACTION_USER_SWITCHED)) {
                // the current audio focus owner is no longer valid
                discardAudioFocusOwner();