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

Commit 2577558b authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge "Do not use getPackageContext where Icon.createWithResource just...

Merge "Do not use getPackageContext where Icon.createWithResource just extracts the packageName" into sc-dev
parents c6c86d83 6e5ef553
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)