diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java index 3b818dbc1f285..5c536c34c35dd 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java @@ -17,6 +17,7 @@ package com.android.systemui.bubbles; import android.app.Notification; import android.content.Context; +import android.content.Intent; import android.content.pm.LauncherApps; import android.content.pm.ShortcutInfo; import android.graphics.Bitmap; @@ -59,6 +60,12 @@ public class BubbleIconFactory extends BaseIconFactory { } else { Icon ic = metadata.getBubbleIcon(); if (ic != null) { + if (ic.getType() == Icon.TYPE_URI + || ic.getType() == Icon.TYPE_URI_ADAPTIVE_BITMAP) { + context.grantUriPermission(context.getPackageName(), + ic.getUri(), + Intent.FLAG_GRANT_READ_URI_PERMISSION); + } return ic.loadDrawable(context); } return null; diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java index 55a7a11987fc9..501e5024d9405 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java @@ -25,6 +25,7 @@ import android.annotation.NonNull; import android.app.Notification; import android.app.Person; import android.content.Context; +import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.ShortcutInfo; @@ -33,6 +34,7 @@ import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Path; import android.graphics.drawable.Drawable; +import android.graphics.drawable.Icon; import android.os.AsyncTask; import android.os.Parcelable; import android.service.notification.StatusBarNotification; @@ -246,9 +248,17 @@ public class BubbleViewInfoTask extends AsyncTask