Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java +7 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java +13 −3 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -246,9 +248,17 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask bubbleMessage.senderName = sender != null ? sender.getName() : null; bubbleMessage.senderAvatar = sender != null && sender.getIcon() != null ? sender.getIcon().loadDrawable(context) : null; bubbleMessage.senderAvatar = null; if (sender != null && sender.getIcon() != null) { if (sender.getIcon().getType() == Icon.TYPE_URI || sender.getIcon().getType() == Icon.TYPE_URI_ADAPTIVE_BITMAP) { context.grantUriPermission(context.getPackageName(), sender.getIcon().getUri(), Intent.FLAG_GRANT_READ_URI_PERMISSION); } bubbleMessage.senderAvatar = sender.getIcon().loadDrawable(context); } return bubbleMessage; } } else if (Notification.InboxStyle.class.equals(style)) { Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleIconFactory.java +7 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java +13 −3 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -246,9 +248,17 @@ public class BubbleViewInfoTask extends AsyncTask<Void, Void, BubbleViewInfoTask bubbleMessage.senderName = sender != null ? sender.getName() : null; bubbleMessage.senderAvatar = sender != null && sender.getIcon() != null ? sender.getIcon().loadDrawable(context) : null; bubbleMessage.senderAvatar = null; if (sender != null && sender.getIcon() != null) { if (sender.getIcon().getType() == Icon.TYPE_URI || sender.getIcon().getType() == Icon.TYPE_URI_ADAPTIVE_BITMAP) { context.grantUriPermission(context.getPackageName(), sender.getIcon().getUri(), Intent.FLAG_GRANT_READ_URI_PERMISSION); } bubbleMessage.senderAvatar = sender.getIcon().loadDrawable(context); } return bubbleMessage; } } else if (Notification.InboxStyle.class.equals(style)) { Loading