OSDN Git Service

Update the summary strings in the Deletion Helper to match the latest mocks.
authorDaniel Nishi <dhnishi@google.com>
Tue, 24 May 2016 01:11:49 +0000 (18:11 -0700)
committerDaniel Nishi <dhnishi@google.com>
Wed, 25 May 2016 18:11:03 +0000 (11:11 -0700)
Bug: 28917902
Change-Id: I35af7483f2a97dffc230093a90f0b7d87a4532c1

res/values/strings.xml
src/com/android/settings/deletionhelper/AppStateUsageStatsBridge.java
src/com/android/settings/deletionhelper/DeletionHelperFragment.java

index 333a106..ff0c2fe 100644 (file)
 
     <!-- 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>
 
     <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>
     <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>
index 36c4196..6f77a29 100644 (file)
@@ -41,6 +41,7 @@ public class AppStateUsageStatsBridge extends AppStateBaseBridge {
     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 @@ public class AppStateUsageStatsBridge extends AppStateBaseBridge {
      * 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() {
index 85c1035..9e1d0ea 100644 (file)
@@ -394,7 +394,8 @@ public class DeletionHelperFragment extends SettingsPreferenceFragment implement
                     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));
         }
     }