Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16a62a9a authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Unhide the API to promote the picture

Fixes: 177698229
Test: atest NotificationTemplateApi30Test
Test: atest CtsAppTestCases:NotificationTemplateTest
Change-Id: Id8c9d957a00ab441539d2ecb2e7463beebc07a84
parent 090d5b0c
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -5573,6 +5573,7 @@ package android.app {
    field public static final String EXTRA_PROGRESS = "android.progress";
    field public static final String EXTRA_PROGRESS_INDETERMINATE = "android.progressIndeterminate";
    field public static final String EXTRA_PROGRESS_MAX = "android.progressMax";
    field public static final String EXTRA_PROMOTE_PICTURE = "android.promotePicture";
    field public static final String EXTRA_REMOTE_INPUT_DRAFT = "android.remoteInputDraft";
    field public static final String EXTRA_REMOTE_INPUT_HISTORY = "android.remoteInputHistory";
    field @Deprecated public static final String EXTRA_SELF_DISPLAY_NAME = "android.selfDisplayName";
@@ -5712,12 +5713,13 @@ package android.app {
  public static class Notification.BigPictureStyle extends android.app.Notification.Style {
    ctor public Notification.BigPictureStyle();
    ctor @Deprecated public Notification.BigPictureStyle(android.app.Notification.Builder);
    method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.Bitmap);
    method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.drawable.Icon);
    method public android.app.Notification.BigPictureStyle bigPicture(android.graphics.Bitmap);
    method @NonNull public android.app.Notification.BigPictureStyle bigLargeIcon(@Nullable android.graphics.Bitmap);
    method @NonNull public android.app.Notification.BigPictureStyle bigLargeIcon(@Nullable android.graphics.drawable.Icon);
    method @NonNull public android.app.Notification.BigPictureStyle bigPicture(@Nullable android.graphics.Bitmap);
    method @NonNull public android.app.Notification.BigPictureStyle bigPictureContentDescription(@Nullable CharSequence);
    method public android.app.Notification.BigPictureStyle setBigContentTitle(CharSequence);
    method public android.app.Notification.BigPictureStyle setSummaryText(CharSequence);
    method @NonNull public android.app.Notification.BigPictureStyle setBigContentTitle(@Nullable CharSequence);
    method @NonNull public android.app.Notification.BigPictureStyle setSummaryText(@Nullable CharSequence);
    method @NonNull public android.app.Notification.BigPictureStyle showBigPictureWhenCollapsed(boolean);
  }
  public static class Notification.BigTextStyle extends android.app.Notification.Style {
+10 −7
Original line number Diff line number Diff line
@@ -1202,7 +1202,6 @@ public class Notification implements Parcelable
     * {@link BigPictureStyle#bigPicture(Bitmap) big picture} is to be shown in the collapsed state
     * of a {@link BigPictureStyle} notification.  This will replace a
     * {@link Builder#setLargeIcon(Icon) large icon} in that state if one was provided.
     * @hide
     */
    public static final String EXTRA_PROMOTE_PICTURE = "android.promotePicture";

@@ -7022,7 +7021,8 @@ public class Notification implements Parcelable
         * Overrides ContentTitle in the big form of the template.
         * This defaults to the value passed to setContentTitle().
         */
        public BigPictureStyle setBigContentTitle(CharSequence title) {
        @NonNull
        public BigPictureStyle setBigContentTitle(@Nullable CharSequence title) {
            internalSetBigContentTitle(safeCharSequence(title));
            return this;
        }
@@ -7030,7 +7030,8 @@ public class Notification implements Parcelable
        /**
         * Set the first line of text after the detail section in the big form of the template.
         */
        public BigPictureStyle setSummaryText(CharSequence cs) {
        @NonNull
        public BigPictureStyle setSummaryText(@Nullable CharSequence cs) {
            internalSetSummaryText(safeCharSequence(cs));
            return this;
        }
@@ -7055,7 +7056,8 @@ public class Notification implements Parcelable
        /**
         * Provide the bitmap to be used as the payload for the BigPicture notification.
         */
        public BigPictureStyle bigPicture(Bitmap b) {
        @NonNull
        public BigPictureStyle bigPicture(@Nullable Bitmap b) {
            mPicture = b;
            return this;
        }
@@ -7064,7 +7066,6 @@ public class Notification implements Parcelable
         * When set, the {@link #bigPicture(Bitmap) big picture} of this style will be promoted and
         * shown in place of the {@link Builder#setLargeIcon(Icon) large icon} in the collapsed
         * state of this notification.
         * @hide
         */
        @NonNull
        public BigPictureStyle showBigPictureWhenCollapsed(boolean show) {
@@ -7075,14 +7076,16 @@ public class Notification implements Parcelable
        /**
         * Override the large icon when the big notification is shown.
         */
        public BigPictureStyle bigLargeIcon(Bitmap b) {
        @NonNull
        public BigPictureStyle bigLargeIcon(@Nullable Bitmap b) {
            return bigLargeIcon(b != null ? Icon.createWithBitmap(b) : null);
        }

        /**
         * Override the large icon when the big notification is shown.
         */
        public BigPictureStyle bigLargeIcon(Icon icon) {
        @NonNull
        public BigPictureStyle bigLargeIcon(@Nullable Icon icon) {
            mBigLargeIconSet = true;
            mBigLargeIcon = icon;
            return this;