From 89bdfef4b9114131cfed8e859fa42e1688fc67aa Mon Sep 17 00:00:00 2001 From: Haggai Eran Date: Fri, 16 Aug 2024 17:44:20 +0300 Subject: [PATCH] media browser: clean up Uri.parse() null checks --- .../player/mediabrowser/MediaBrowserConnector.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/mediabrowser/MediaBrowserConnector.java b/app/src/main/java/org/schabi/newpipe/player/mediabrowser/MediaBrowserConnector.java index 18133311e..e7856db06 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediabrowser/MediaBrowserConnector.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediabrowser/MediaBrowserConnector.java @@ -315,10 +315,6 @@ public class MediaBrowserConnector implements MediaSessionConnector.PlaybackPrep try { final Uri parentIdUri = Uri.parse(parentId); - if (parentIdUri == null) { - throw parseError(); - } - final List path = new ArrayList<>(parentIdUri.getPathSegments()); if (path.isEmpty()) { @@ -510,10 +506,6 @@ public class MediaBrowserConnector implements MediaSessionConnector.PlaybackPrep private Single extractPlayQueueFromMediaId(final String mediaId) { try { final Uri mediaIdUri = Uri.parse(mediaId); - if (mediaIdUri == null) { - throw parseError(); - } - final List path = new ArrayList<>(mediaIdUri.getPathSegments()); if (path.isEmpty()) {