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

Commit ec84daee authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

AudioManager: PendingIntent for media button is immutable

Annotate PendingIntent for media button event receiver as
immutable

Bug: 170425075
Test: don't crash in december, see bug
Change-Id: I6042790fe3a154c67f448962b6ebdcc652978495
parent 283d7b9c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -4049,7 +4049,8 @@ public class AudioManager {
        //     the associated intent will be handled by the component being registered
        mediaButtonIntent.setComponent(eventReceiver);
        PendingIntent pi = PendingIntent.getBroadcast(getContext(),
                0/*requestCode, ignored*/, mediaButtonIntent, 0/*flags*/);
                0/*requestCode, ignored*/, mediaButtonIntent,
                PendingIntent.FLAG_IMMUTABLE);
        registerMediaButtonIntent(pi, eventReceiver);
    }

@@ -4102,7 +4103,8 @@ public class AudioManager {
        //     the associated intent will be handled by the component being registered
        mediaButtonIntent.setComponent(eventReceiver);
        PendingIntent pi = PendingIntent.getBroadcast(getContext(),
                0/*requestCode, ignored*/, mediaButtonIntent, 0/*flags*/);
                0/*requestCode, ignored*/, mediaButtonIntent,
                PendingIntent.FLAG_IMMUTABLE);
        unregisterMediaButtonIntent(pi);
    }