From 6e5ef5533a0c3f2207ca85c1288b492eb42d1315 Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Tue, 16 Mar 2021 10:12:42 -0400 Subject: [PATCH] Do not use getPackageContext where Icon.createWithResource just extracts the packageName Bug: 182662365 Test: build & run Change-Id: I681e5627ba87f0c644e57f22f0abf8112ec076a0 --- .../src/com/android/systemui/media/MediaDataManager.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt b/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt index 55c55b97db514..41c9daedf2d44 100644 --- a/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt +++ b/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt @@ -476,7 +476,6 @@ class MediaDataManager( Notification.EXTRA_COMPACT_ACTIONS)?.toMutableList() ?: mutableListOf() // 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)