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

Commit dc0fcb2c authored by Sara Ting's avatar Sara Ting Committed by Android (Google) Code Review
Browse files

Merge "Remove occasional extra bullet at the end of notification text." into jb-dev

parents bc7be297 c90ed73b
Loading
Loading
Loading
Loading
+11 −9
Original line number Original line Diff line number Diff line
@@ -250,20 +250,22 @@ public class AlertReceiver extends BroadcastReceiver {
                summaryText, startMillis, endMillis, eventId, notificationId,
                summaryText, startMillis, endMillis, eventId, notificationId,
                doPopup, highPriority, true);
                doPopup, highPriority, true);


        if (TextUtils.isEmpty(description)) {
        // Create an expanded notification
            // When no description, don't use BigTextStyle since it puts too much whitespace.
            // This still has the same desired behavior (expands with buttons, pinch closed, etc).
            return basicBuilder.build();
        } else {
            // Create an expanded notification.
        Notification.BigTextStyle expandedBuilder = new Notification.BigTextStyle(
        Notification.BigTextStyle expandedBuilder = new Notification.BigTextStyle(
                basicBuilder);
                basicBuilder);
            String text = context.getResources().getString(
        if (description != null) {
            description = description.trim();
        }
        String text;
        if (TextUtils.isEmpty(description)) {
            text = summaryText;
        } else {
            text = context.getResources().getString(
                    R.string.event_notification_big_text, summaryText, description);
                    R.string.event_notification_big_text, summaryText, description);
        }
        expandedBuilder.bigText(text);
        expandedBuilder.bigText(text);
        return expandedBuilder.build();
        return expandedBuilder.build();
    }
    }
    }


    /**
    /**
     * Creates an expanding digest notification for expired events.
     * Creates an expanding digest notification for expired events.