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

Commit 3715ec57 authored by Sungsoo Lim's avatar Sungsoo Lim
Browse files

Fix possible NPE in MediaSessionManager

Bug: 77885219
Test: build
Change-Id: Id20dd73f00521beeccd4704f722547ba32bb5722
parent 5f91d5ee
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -354,7 +354,10 @@ public final class MediaSessionManager {
     * @return {@code true} if the remote user is trusted and its package name matches with the UID.
     *            {@code false} otherwise.
     */
    public boolean isTrustedForMediaControl(RemoteUserInfo userInfo) {
    public boolean isTrustedForMediaControl(@NonNull RemoteUserInfo userInfo) {
        if (userInfo == null) {
            throw new IllegalArgumentException("userInfo may not be null");
        }
        if (userInfo.getPackageName() == null) {
            return false;
        }