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

Commit 86490862 authored by John Spurlock's avatar John Spurlock
Browse files

AudioService: Use the foreground broadcast queue for fired intents.

Minimize delay for receivers, assume they are providing volume UI.

Change-Id: I054bac4292ad7c608cd46543409595dcea6a7731
parent cff41ae3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1425,6 +1425,7 @@ public class AudioService extends IAudioService.Stub {

    private void sendBroadcastToAll(Intent intent) {
        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        final long ident = Binder.clearCallingIdentity();
        try {
            mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
@@ -1434,6 +1435,7 @@ public class AudioService extends IAudioService.Stub {
    }

    private void sendStickyBroadcastToAll(Intent intent) {
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        final long ident = Binder.clearCallingIdentity();
        try {
            mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);