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

Commit dc0e6ac7 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Fix NPE in MediaPlayerList

Bug: 78289651
Test: manual
Change-Id: Ia6fa0d45591c04210294895afa35167ad67c3e02
parent cc2d8e0e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -547,7 +547,7 @@ public class MediaPlayerList {
                if (intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) return;
                if (intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) return;


                String packageName = intent.getData().getSchemeSpecificPart();
                String packageName = intent.getData().getSchemeSpecificPart();
                if (packageName != null) {
                if (packageName != null && mMediaPlayerIds.containsKey(packageName)) {
                    removeMediaPlayer(mMediaPlayerIds.get(packageName));
                    removeMediaPlayer(mMediaPlayerIds.get(packageName));
                }
                }
            } else if (action.equals(Intent.ACTION_PACKAGE_ADDED)
            } else if (action.equals(Intent.ACTION_PACKAGE_ADDED)