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

Commit 6e5ef553 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Do not use getPackageContext where Icon.createWithResource just extracts the packageName

Bug: 182662365
Test: build & run
Change-Id: I681e5627ba87f0c644e57f22f0abf8112ec076a0
parent 4f1ad7e4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -476,7 +476,6 @@ class MediaDataManager(
                Notification.EXTRA_COMPACT_ACTIONS)?.toMutableList() ?: mutableListOf<Int>()
        // TODO: b/153736623 look into creating actions when this isn't a media style notification

        val packageContext: Context = sbn.getPackageContext(context)
        if (actions != null) {
            for ((index, action) in actions.withIndex()) {
                if (action.getIcon() == null) {
@@ -499,7 +498,7 @@ class MediaDataManager(
                    null
                }
                val mediaActionIcon = if (action.getIcon()?.getType() == Icon.TYPE_RESOURCE) {
                    Icon.createWithResource(packageContext, action.getIcon()!!.getResId())
                    Icon.createWithResource(sbn.packageName, action.getIcon()!!.getResId())
                } else {
                    action.getIcon()
                }.setTint(themeText)