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

Commit 64d0e9e2 authored by Shai Barack's avatar Shai Barack Committed by Android (Google) Code Review
Browse files

Merge "Don't copy MediaMetadata in sanitizer if there is nothing to sanitize" into main

parents 0d3728a1 b3d6e869
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1265,6 +1265,19 @@ public class MediaSessionRecord extends MediaSessionRecordImpl implements IBinde
            if (metadata == null) {
                return null;
            }

            // Check if there are URIs to sanitize
            boolean hasUris = false;
            for (String key : ART_URIS) {
                if (metadata.containsKey(key)) {
                    hasUris = true;
                    break;
                }
            }
            if (!hasUris) {
                return metadata;
            }

            MediaMetadata.Builder metadataBuilder = new MediaMetadata.Builder(metadata);
            for (String key: ART_URIS) {
                String uriString = metadata.getString(key);