From d44a2fe211b8163e6c842f236b3564944a3726ac Mon Sep 17 00:00:00 2001 From: Yi-Ling Chuang Date: Thu, 4 Jun 2020 17:14:17 +0800 Subject: [PATCH] Use the plural format for "See all COUNT apps" Although there will never be only one app on the device, we still have to use the plural format for the strings. Fixes: 146513299 Test: rebuild and see the string in Apps&Notifications page. Change-Id: I326be50cfddb605584390ebba57dbd06c0ac29b0 --- res/values/strings.xml | 5 ++++- .../applications/RecentAppsPreferenceController.java | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index b60bca7e1e0..1a1c9911ca3 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4285,7 +4285,10 @@ Recently opened apps - See all %1$d apps + + See all apps + See all %1$d apps + Contact your IT admin diff --git a/src/com/android/settings/applications/RecentAppsPreferenceController.java b/src/com/android/settings/applications/RecentAppsPreferenceController.java index 69a68ef9e7e..20f9806d35f 100644 --- a/src/com/android/settings/applications/RecentAppsPreferenceController.java +++ b/src/com/android/settings/applications/RecentAppsPreferenceController.java @@ -117,7 +117,8 @@ public class RecentAppsPreferenceController extends BasePreferenceController @Override protected void onCountComplete(int num) { mAppEntitiesController.setHeaderDetails( - mContext.getString(R.string.see_all_apps_title, num)); + mContext.getResources().getQuantityString(R.plurals.see_all_apps_title, + num, num)); mAppEntitiesController.apply(); } }.execute();