Loading core/java/android/app/Notification.java +16 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package android.app; import static android.annotation.Dimension.DP; import static android.graphics.drawable.Icon.TYPE_URI; import static android.graphics.drawable.Icon.TYPE_URI_ADAPTIVE_BITMAP; import static com.android.internal.util.ContrastColorUtil.satisfiesTextContrast; Loading Loading @@ -2504,6 +2506,14 @@ public class Notification implements Parcelable } } } if (mBubbleMetadata != null && mBubbleMetadata.getBubbleIcon() != null) { final Icon icon = mBubbleMetadata.getBubbleIcon(); final int iconType = icon.getType(); if (iconType == TYPE_URI_ADAPTIVE_BITMAP || iconType == TYPE_URI) { visitor.accept(icon.getUri()); } } } /** Loading Loading @@ -8900,6 +8910,12 @@ public class Notification implements Parcelable if (icon == null) { throw new IllegalArgumentException("Bubbles require non-null icon"); } if (icon.getType() != TYPE_URI_ADAPTIVE_BITMAP && icon.getType() != TYPE_URI) { Log.w(TAG, "Bubbles work best with icons of TYPE_URI or " + "TYPE_URI_ADAPTIVE_BITMAP. " + "In the future, using an icon of this type will be required."); } mShortcutId = null; mPendingIntent = intent; mIcon = icon; Loading Loading
core/java/android/app/Notification.java +16 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package android.app; import static android.annotation.Dimension.DP; import static android.graphics.drawable.Icon.TYPE_URI; import static android.graphics.drawable.Icon.TYPE_URI_ADAPTIVE_BITMAP; import static com.android.internal.util.ContrastColorUtil.satisfiesTextContrast; Loading Loading @@ -2504,6 +2506,14 @@ public class Notification implements Parcelable } } } if (mBubbleMetadata != null && mBubbleMetadata.getBubbleIcon() != null) { final Icon icon = mBubbleMetadata.getBubbleIcon(); final int iconType = icon.getType(); if (iconType == TYPE_URI_ADAPTIVE_BITMAP || iconType == TYPE_URI) { visitor.accept(icon.getUri()); } } } /** Loading Loading @@ -8900,6 +8910,12 @@ public class Notification implements Parcelable if (icon == null) { throw new IllegalArgumentException("Bubbles require non-null icon"); } if (icon.getType() != TYPE_URI_ADAPTIVE_BITMAP && icon.getType() != TYPE_URI) { Log.w(TAG, "Bubbles work best with icons of TYPE_URI or " + "TYPE_URI_ADAPTIVE_BITMAP. " + "In the future, using an icon of this type will be required."); } mShortcutId = null; mPendingIntent = intent; mIcon = icon; Loading