Merge "Update the summary strings in the Deletion Helper to match the latest mocks." into nyc-mr1-dev
am: 668c297603

* commit '668c297603c6ae20225717741d90d06e819216c0':
  Update the summary strings in the Deletion Helper to match the latest mocks.

Change-Id: I9936874c26db790379b6b5781547182c21e74470
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 333a106..ff0c2fe 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7486,14 +7486,12 @@
 
     <!-- Activity title for deletion helper. [CHAR LIMIT=25] -->
     <string name="deletion_helper_title">Remove from Device</string>
-    <!-- Preference group title for the list of apps to uninstall. [CHAR LIMIT=40]-->
-    <string name="deletion_helper_apps_title">Apps</string>
     <!-- Summary of how much storage an app is using and the number of days since last use. [CHAR LIMIT=NONE]-->
-    <string name="deletion_helper_app_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g>, last used <xliff:g id="days" example="67">%2$d</xliff:g> days ago</string>
+    <string name="deletion_helper_app_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g> • Last used <xliff:g id="days" example="67">%2$d</xliff:g> days ago</string>
     <!-- Summary of how much storage an app is using when it has never been used before. [CHAR LIMIT=NONE]-->
-    <string name="deletion_helper_app_summary_never_used"><xliff:g id="used" example="1.2GB">%1$s</xliff:g>, never used before</string>
+    <string name="deletion_helper_app_summary_never_used"><xliff:g id="used" example="1.2GB">%1$s</xliff:g> • Never used before</string>
     <!-- Summary of how much storage an app is using when its last use is unknown. [CHAR LIMIT=NONE]-->
-    <string name="deletion_helper_app_summary_unknown_used"><xliff:g id="used" example="1.2GB">%1$s</xliff:g>, not sure when last used</string>
+    <string name="deletion_helper_app_summary_unknown_used"><xliff:g id="used" example="1.2GB">%1$s</xliff:g> • Not sure when last used</string>
     <!-- Button which clears out storage in the deletion helper. [CHAR LIMIT=60]-->
     <string name="deletion_helper_free_button">Free up <xliff:g id="freeable" example="1.2GB">%1$s</xliff:g></string>
 
@@ -7598,13 +7596,13 @@
     <string name="deletion_helper_photos_title">Photos &amp; Videos (<xliff:g id="num_items">%1$d</xliff:g>)</string>
 
     <!-- Summary of how much backed up storage that photos and videos service can clear from the local device. [CHAR LIMIT=NONE]-->
-    <string name="deletion_helper_photos_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g>, older than <xliff:g id="days">%2$d</xliff:g> days</string>
+    <string name="deletion_helper_photos_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g> • Older than <xliff:g id="days">%2$d</xliff:g> days</string>
 
     <!-- Preference title for the downloads deletion service. [CHAR LIMIT=40]-->
     <string name="deletion_helper_downloads_title">Downloads (<xliff:g id="numItems" example="67">%1$d</xliff:g>)</string>
 
     <!-- Summary of how much stale data can be cleared from the local download folder. [CHAR LIMIT=NONE]-->
-    <string name="deletion_helper_downloads_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g> • last modified <xliff:g id="days">%2$s</xliff:g></string>
+    <string name="deletion_helper_downloads_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g> • Last modified <xliff:g id="days">%2$s</xliff:g></string>
 
     <!-- Summary for when when there is nothing in the downloads folder to clear. [CHAR LIMIT=NONE]-->
     <string name="deletion_helper_downloads_summary_empty"><xliff:g id="used" example="1.2GB">%1$s</xliff:g></string>
@@ -7637,7 +7635,7 @@
     <string name="deletion_helper_apps_group_title">Apps (<xliff:g id="num_items">%1$d</xliff:g>)</string>
 
     <!-- Summary for the apps category in the deletion helper, showing how many space to clear. [CHAR LIMIT=NONE]-->
-    <string name="deletion_helper_apps_group_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g></string>
+    <string name="deletion_helper_apps_group_summary"><xliff:g id="used" example="1.2GB">%1$s</xliff:g> • Last used <xliff:g id="days">%2$d</xliff:g> days ago</string>
 
     <!-- Category title for the automatic settings in the storage manager settings. [CHAR LIMIT=40] -->
     <string name="deletion_helper_automatic_title">Automatic</string>
diff --git a/src/com/android/settings/deletionhelper/AppStateUsageStatsBridge.java b/src/com/android/settings/deletionhelper/AppStateUsageStatsBridge.java
index 36c4196..6f77a29 100644
--- a/src/com/android/settings/deletionhelper/AppStateUsageStatsBridge.java
+++ b/src/com/android/settings/deletionhelper/AppStateUsageStatsBridge.java
@@ -41,6 +41,7 @@
     private PackageManager mPm;
     public static final long NEVER_USED = -1;
     public static final long UNKNOWN_LAST_USE = -2;
+    public static final long UNUSED_DAYS_DELETION_THRESHOLD = 60;
 
     public AppStateUsageStatsBridge(Context context, ApplicationsState appState,
                                     Callback callback) {
@@ -105,7 +106,6 @@
      * usage is unknown, it is skipped.
      */
     public static final AppFilter FILTER_USAGE_STATS = new AppFilter() {
-        private long UNUSED_DAYS_DELETION_THRESHOLD = 60;
 
         @Override
         public void init() {
diff --git a/src/com/android/settings/deletionhelper/DeletionHelperFragment.java b/src/com/android/settings/deletionhelper/DeletionHelperFragment.java
index 85c1035..9e1d0ea 100644
--- a/src/com/android/settings/deletionhelper/DeletionHelperFragment.java
+++ b/src/com/android/settings/deletionhelper/DeletionHelperFragment.java
@@ -394,7 +394,8 @@
                     mAppEntries.size()));
             mApps.setSummary(app.getString(R.string.deletion_helper_apps_group_summary,
                     Formatter.formatFileSize(app,
-                            getTotalAppsFreeableSpace(true))));
+                            getTotalAppsFreeableSpace(true)),
+                    AppStateUsageStatsBridge.UNUSED_DAYS_DELETION_THRESHOLD));
         }
     }