Loading core/java/android/app/Notification.java +44 −1 Original line number Diff line number Diff line Loading @@ -1593,6 +1593,17 @@ public class Notification implements Parcelable */ @FlaggedApi(Flags.FLAG_API_RICH_ONGOING) public static final String EXTRA_ENROUTE_LARGE_ICON_SUBTEXT = "android.enrouteLargeIconSubText"; /** * {@link #extras} key: {@link Icon} of an image used as a thumb icon on * {@link Notification} progress bar for {@link EnRouteStyle} notifications. * This extra is an {@code Icon}. * @hide */ @FlaggedApi(Flags.FLAG_API_RICH_ONGOING) public static final String EXTRA_ENROUTE_PROGRESS_THUMB_ICON = "android.enrouteProgressThumbIcon"; /** * {@link #extras} key: whether the notification should be colorized as * supplied to {@link Builder#setColorized(boolean)}. Loading Loading @@ -3052,6 +3063,8 @@ public class Notification implements Parcelable if (Flags.apiRichOngoing()) { visitIconUri(visitor, extras.getParcelable(EXTRA_ENROUTE_OVERLAY_ICON, Icon.class)); visitIconUri(visitor, extras.getParcelable(EXTRA_ENROUTE_PROGRESS_THUMB_ICON, Icon.class)); } if (mBubbleMetadata != null) { Loading Loading @@ -11015,6 +11028,9 @@ public class Notification implements Parcelable @Nullable private CharSequence mLargeIconSubText = null; @Nullable private Icon mProgressThumbIcon = null; public EnRouteStyle() { } Loading Loading @@ -11058,6 +11074,25 @@ public class Notification implements Parcelable return this; } /** * Returns the progress thumb icon. * @see EnRouteStyle#setProgressThumbIcon */ @Nullable public Icon getProgressThumbIcon() { return mProgressThumbIcon; } /** * Optional icon to be used as a progress thumb. */ @NonNull public EnRouteStyle setProgressThumbIcon(@Nullable Icon progressThumbIcon) { mProgressThumbIcon = progressThumbIcon; return this; } /** * @hide */ Loading @@ -11069,7 +11104,8 @@ public class Notification implements Parcelable final EnRouteStyle enRouteStyle = (EnRouteStyle) other; return !Objects.equals(mOverlayIcon, enRouteStyle.mOverlayIcon) || !Objects.equals(mLargeIconSubText, enRouteStyle.mLargeIconSubText); || !Objects.equals(mLargeIconSubText, enRouteStyle.mLargeIconSubText) || !Objects.equals(mProgressThumbIcon, enRouteStyle.mProgressThumbIcon); } /** Loading @@ -11080,6 +11116,7 @@ public class Notification implements Parcelable super.addExtras(extras); extras.putParcelable(EXTRA_ENROUTE_OVERLAY_ICON, mOverlayIcon); extras.putCharSequence(EXTRA_ENROUTE_LARGE_ICON_SUBTEXT, mLargeIconSubText); extras.putParcelable(EXTRA_ENROUTE_PROGRESS_THUMB_ICON, mProgressThumbIcon); } /** Loading @@ -11090,6 +11127,8 @@ public class Notification implements Parcelable super.restoreFromExtras(extras); mOverlayIcon = extras.getParcelable(EXTRA_ENROUTE_OVERLAY_ICON, Icon.class); mLargeIconSubText = extras.getCharSequence(EXTRA_ENROUTE_LARGE_ICON_SUBTEXT); mProgressThumbIcon = extras.getParcelable(EXTRA_ENROUTE_PROGRESS_THUMB_ICON, Icon.class); } /** Loading @@ -11101,6 +11140,10 @@ public class Notification implements Parcelable if (mOverlayIcon != null) { mOverlayIcon.convertToAshmem(); } if (mProgressThumbIcon != null) { mProgressThumbIcon.convertToAshmem(); } } /** Loading Loading
core/java/android/app/Notification.java +44 −1 Original line number Diff line number Diff line Loading @@ -1593,6 +1593,17 @@ public class Notification implements Parcelable */ @FlaggedApi(Flags.FLAG_API_RICH_ONGOING) public static final String EXTRA_ENROUTE_LARGE_ICON_SUBTEXT = "android.enrouteLargeIconSubText"; /** * {@link #extras} key: {@link Icon} of an image used as a thumb icon on * {@link Notification} progress bar for {@link EnRouteStyle} notifications. * This extra is an {@code Icon}. * @hide */ @FlaggedApi(Flags.FLAG_API_RICH_ONGOING) public static final String EXTRA_ENROUTE_PROGRESS_THUMB_ICON = "android.enrouteProgressThumbIcon"; /** * {@link #extras} key: whether the notification should be colorized as * supplied to {@link Builder#setColorized(boolean)}. Loading Loading @@ -3052,6 +3063,8 @@ public class Notification implements Parcelable if (Flags.apiRichOngoing()) { visitIconUri(visitor, extras.getParcelable(EXTRA_ENROUTE_OVERLAY_ICON, Icon.class)); visitIconUri(visitor, extras.getParcelable(EXTRA_ENROUTE_PROGRESS_THUMB_ICON, Icon.class)); } if (mBubbleMetadata != null) { Loading Loading @@ -11015,6 +11028,9 @@ public class Notification implements Parcelable @Nullable private CharSequence mLargeIconSubText = null; @Nullable private Icon mProgressThumbIcon = null; public EnRouteStyle() { } Loading Loading @@ -11058,6 +11074,25 @@ public class Notification implements Parcelable return this; } /** * Returns the progress thumb icon. * @see EnRouteStyle#setProgressThumbIcon */ @Nullable public Icon getProgressThumbIcon() { return mProgressThumbIcon; } /** * Optional icon to be used as a progress thumb. */ @NonNull public EnRouteStyle setProgressThumbIcon(@Nullable Icon progressThumbIcon) { mProgressThumbIcon = progressThumbIcon; return this; } /** * @hide */ Loading @@ -11069,7 +11104,8 @@ public class Notification implements Parcelable final EnRouteStyle enRouteStyle = (EnRouteStyle) other; return !Objects.equals(mOverlayIcon, enRouteStyle.mOverlayIcon) || !Objects.equals(mLargeIconSubText, enRouteStyle.mLargeIconSubText); || !Objects.equals(mLargeIconSubText, enRouteStyle.mLargeIconSubText) || !Objects.equals(mProgressThumbIcon, enRouteStyle.mProgressThumbIcon); } /** Loading @@ -11080,6 +11116,7 @@ public class Notification implements Parcelable super.addExtras(extras); extras.putParcelable(EXTRA_ENROUTE_OVERLAY_ICON, mOverlayIcon); extras.putCharSequence(EXTRA_ENROUTE_LARGE_ICON_SUBTEXT, mLargeIconSubText); extras.putParcelable(EXTRA_ENROUTE_PROGRESS_THUMB_ICON, mProgressThumbIcon); } /** Loading @@ -11090,6 +11127,8 @@ public class Notification implements Parcelable super.restoreFromExtras(extras); mOverlayIcon = extras.getParcelable(EXTRA_ENROUTE_OVERLAY_ICON, Icon.class); mLargeIconSubText = extras.getCharSequence(EXTRA_ENROUTE_LARGE_ICON_SUBTEXT); mProgressThumbIcon = extras.getParcelable(EXTRA_ENROUTE_PROGRESS_THUMB_ICON, Icon.class); } /** Loading @@ -11101,6 +11140,10 @@ public class Notification implements Parcelable if (mOverlayIcon != null) { mOverlayIcon.convertToAshmem(); } if (mProgressThumbIcon != null) { mProgressThumbIcon.convertToAshmem(); } } /** Loading