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

Commit 2893fc93 authored by Etienne Ruffieux's avatar Etienne Ruffieux Committed by Gerrit Code Review
Browse files

Merge "Add null check before string comparison"

parents 0fb6bdac f7056b5f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -144,6 +144,10 @@ public class MediaPlayerWrapper {
        // MediaDescription is usually compared via its title, artist and album.
        if (mediaPlayingMetadata != null) {
            for (Metadata metadata : mCurrentData.queue) {
                if (metadata.title == null || metadata.artist == null || metadata.album == null) {
                    // if one of the informations is missing we can't assume it is the same media.
                    continue;
                }
                if (metadata.title.equals(mediaPlayingMetadata.title)
                        && metadata.artist.equals(mediaPlayingMetadata.artist)
                        && metadata.album.equals(mediaPlayingMetadata.album)) {