From 086ab74938f8545d0cef96cb748c15c8cdf0e466 Mon Sep 17 00:00:00 2001 From: Salvador Martinez Date: Tue, 3 Apr 2018 13:05:39 -0700 Subject: [PATCH] Update notification to allow multiline text Sometimes the remaining time text can be a bit too long for one line. This change updates the notification to allow the text to go onto the second line. Test: visual inspection Bug: 77500880 Change-Id: I8f87383dab9b27890934ad969d0c4e8a26f3c3a3 --- .../com/android/systemui/power/PowerNotificationWarnings.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java index 49b00ce132331..c53ee5f28eb34 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java @@ -229,10 +229,11 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { // Bump the notification when the bucket dropped. .setWhen(mWarningTriggerTimeMs) .setShowWhen(false) - .setContentTitle(title) .setContentText(contentText) + .setContentTitle(title) .setOnlyAlertOnce(true) .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING)) + .setStyle(new Notification.BigTextStyle().bigText(contentText)) .setVisibility(Notification.VISIBILITY_PUBLIC); if (hasBatterySettings()) { nb.setContentIntent(pendingBroadcast(ACTION_SHOW_BATTERY_SETTINGS));