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

Commit 36003d29 authored by Isak Lilja's avatar Isak Lilja Committed by Beth Thibodeau
Browse files

[DO NOT MERGE] Use loadDrawableAsUser in MediaDataManager

This fixes a SystemUI loopcrash when casting as a guest user.

Bug: 173026465
Test: Manual - install media app that can cast on guest user only,
      then cast from guest user.  SystemUI should not crash.
Test: atest com.android.systemui.media
Change-Id: I70f5de89a813c54a616eb701a02aa43272754580
parent 02bd1685
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -360,7 +360,8 @@ class MediaDataManager(
        val app = builder.loadHeaderAppName()

        // App Icon
        val smallIconDrawable: Drawable = sbn.notification.smallIcon.loadDrawable(context)
        val smallIconDrawable: Drawable = sbn.notification.smallIcon.loadDrawableAsUser(context,
                sbn.user.identifier)

        // Song name
        var song: CharSequence? = metadata.getString(MediaMetadata.METADATA_KEY_DISPLAY_TITLE)