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

Commit 7fd9e92e authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge "[RONs] Drop BigPictureStyle from Promotable styles " into main

parents 46bc22e8 1f93cec6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3266,7 +3266,6 @@ public class Notification implements Parcelable
        final Class<? extends Style> notificationStyle = getNotificationStyle();
        return notificationStyle == null
                || BigPictureStyle.class.equals(notificationStyle)
                || BigTextStyle.class.equals(notificationStyle)
                || CallStyle.class.equals(notificationStyle)
                || ProgressStyle.class.equals(notificationStyle);
+5 −5
Original line number Diff line number Diff line
@@ -371,22 +371,22 @@ public class NotificationTest {

    @Test
    @EnableFlags(Flags.FLAG_UI_RICH_ONGOING)
    public void testHasPromotableStyle_bigPicture() {
    public void testHasPromotableStyle_bigText() {
        Notification n = new Notification.Builder(mContext, "test")
                .setSmallIcon(android.R.drawable.sym_def_app_icon)
                .setStyle(new Notification.BigPictureStyle())
                .setStyle(new Notification.BigTextStyle())
                .build();
        assertThat(n.hasPromotableStyle()).isTrue();
    }

    @Test
    @EnableFlags(Flags.FLAG_UI_RICH_ONGOING)
    public void testHasPromotableStyle_bigText() {
    public void testHasPromotableStyle_no_bigPictureStyle() {
        Notification n = new Notification.Builder(mContext, "test")
                .setSmallIcon(android.R.drawable.sym_def_app_icon)
                .setStyle(new Notification.BigTextStyle())
                .setStyle(new Notification.BigPictureStyle())
                .build();
        assertThat(n.hasPromotableStyle()).isTrue();
        assertThat(n.hasPromotableStyle()).isFalse();
    }

    @Test