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

Commit fd3c6d01 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix security vulnerability allowing apps to start from background" into main

parents b828afed 13dd0c48
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -1362,9 +1362,15 @@ public class MediaSessionRecord extends MediaSessionRecordImpl implements IBinde

        @Override
        public IBinder getBinderForSetQueue() throws RemoteException {
            return new ParcelableListBinder<QueueItem>((list) -> {
            return new ParcelableListBinder<QueueItem>(
                    (list) -> {
                        // Checking list items are instanceof QueueItem to validate against
                        // malicious apps calling it directly via reflection with non compilable
                        // items. See b/317048338 for more details
                        List<QueueItem> sanitizedQueue =
                                list.stream().filter(it -> it instanceof QueueItem).toList();
                        synchronized (mLock) {
                    mQueue = list;
                            mQueue = sanitizedQueue;
                        }
                        mHandler.post(MessageHandler.MSG_UPDATE_QUEUE);
                    });