Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a671272b authored by Daniel Nishi's avatar Daniel Nishi
Browse files

Add a deletion helper view for clearing space.

This view provides an interface which allows users to clear out
apps and other data which they may no longer need to alleviate
storage pressure. This implementation gives the bits to uninstall
apps which have not been used within the last 60 days from the
system.

A future patch will add in the ability to extend the deletion helper
view to have additional clearing types.

Change-Id: I65cba54ca247d52227e67e2fa9b84fe63fb8ab34
parent 86f5ad39
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@
    <uses-permission android:name="android.permission.CHANGE_APP_IDLE_STATE" />
    <uses-permission android:name="android.permission.PEERS_MAC_ADDRESS"/>
    <uses-permission android:name="android.permission.MANAGE_NOTIFICATIONS"/>
    <uses-permission android:name="android.permission.DELETE_PACKAGES"/>

    <application android:label="@string/settings_label"
            android:icon="@mipmap/ic_launcher_settings"
+8 −0
Original line number Diff line number Diff line
@@ -60,6 +60,14 @@
        android:textColor="?android:attr/textColorSecondary"
        android:duplicateParentState="true" />

    <Switch
            android:id="@android:id/switch_widget"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:background="@null"
            android:visibility="gone"/>

    <FrameLayout
        android:id="@android:id/widget_frame"
        android:layout_width="wrap_content"
+3 −0
Original line number Diff line number Diff line
@@ -30,4 +30,7 @@
    <item
        android:id="@+id/storage_migrate"
        android:title="@string/storage_menu_migrate" />
    <item
        android:id="@+id/storage_free"
        android:title="@string/storage_menu_free" />
</menu>
+15 −0
Original line number Diff line number Diff line
@@ -2437,6 +2437,8 @@
    <string name="storage_menu_set_up">Set up</string>
    <!-- Storage setting.  Menu option for exploring a storage device [CHAR LIMIT=30]-->
    <string name="storage_menu_explore">Explore</string>
    <!-- Storage setting. Menu option for using the deletion helper. [CHAR LIMIT=30] -->
    <string name="storage_menu_free">Free up space</string>
    <!-- Storage setting.  Title for USB transfer settings [CHAR LIMIT=30]-->
    <string name="storage_title_usb">USB computer connection</string>
@@ -7408,4 +7410,17 @@
    <!-- [CHAR LIMIT=60] Name of dev option called demo mode -->
    <string name="demo_mode">Demo mode</string>
    <!-- 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>
    <!-- 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>
    <!-- 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>
    <!-- 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>
</resources>
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                  android:title="@string/deletion_helper_title">

    <PreferenceCategory
            android:key="apps_group"
            android:title="@string/deletion_helper_apps_title" />

</PreferenceScreen>
Loading