From 8126e93ff2d573cd647e84fda065f235eb263e06 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Thu, 16 Mar 2023 12:27:37 -0400 Subject: [PATCH] Remove explicit number from string So it can be translated properly Test: View notification history screen Fixes: 222128037 Change-Id: I2d11dd4e427c19ef0c003b1fa2b6882267e2026e --- res/layout/notification_history.xml | 2 +- res/values/strings.xml | 2 +- .../notification/history/NotificationHistoryActivity.java | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/res/layout/notification_history.xml b/res/layout/notification_history.xml index 557f1723a85..29744cc7846 100644 --- a/res/layout/notification_history.xml +++ b/res/layout/notification_history.xml @@ -186,9 +186,9 @@ android:layout_height="wrap_content" android:orientation="vertical"> diff --git a/res/values/strings.xml b/res/values/strings.xml index 4ae9e670cdb..7eaa3b81be9 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5722,7 +5722,7 @@ Notification log Notification history - Last 24 hours + Last %d hours Snoozed Recently dismissed diff --git a/src/com/android/settings/notification/history/NotificationHistoryActivity.java b/src/com/android/settings/notification/history/NotificationHistoryActivity.java index 021ba6fead8..b71d295f7f5 100644 --- a/src/com/android/settings/notification/history/NotificationHistoryActivity.java +++ b/src/com/android/settings/notification/history/NotificationHistoryActivity.java @@ -78,6 +78,7 @@ public class NotificationHistoryActivity extends CollapsingToolbarBaseActivity { // R.integer.config_notificationServiceArchiveSize, which is the Number of notifications kept // in the notification service historical archive private static final int MAX_RECENT_DISMISS_ITEM_COUNT = 50; + private static final int HISTORY_HOURS = 24; private ViewGroup mHistoryOn; private ViewGroup mHistoryOff; @@ -243,6 +244,8 @@ public class NotificationHistoryActivity extends CollapsingToolbarBaseActivity { mHistoryOn = findViewById(R.id.history_on); mHistoryEmpty = findViewById(R.id.history_on_empty); mSwitchBar = findViewById(R.id.main_switch_bar); + ((TextView) findViewById(R.id.today_header)).setText( + getString(R.string.notification_history_today, HISTORY_HOURS)); ActionBar actionBar = getActionBar(); if (actionBar != null) {