This updates this page to match the newer mocks. The changes
include:
* Changing the toggle from a switch to a switch bar.
* Removing the Deletion Helper flow from the screen.
* Unit testing the previously untested functionality.
Change-Id: I35eb1e065c9acfbf32a64d659d35e18034025472
Fixes: 36486021
Test: Robotest
Now, it is a master switch preference which can toggle the
automatic management on/off. This also removes the old
UI in the storage summary at the top.
Bug: 33199077
Test: SettingsRoboTests
Change-Id: I709fd2ca0687f760a5d97ad6bebe477b427b0464
This trigger fires if ASM is not enabled by default for
the device and the toggle is only visible if the ASM visible
flag is enabled.
Bug: 30455784
Change-Id: Id6adf8a75dbd4290f042d743689a75f496efb0c9
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
The automatic storage management settings have been left in place
and updated to use the intent to get into the deletion helper.
Bug: 28965462
Change-Id: I736c8e741b519eceb89075b74d42b38c3aa5d0f4
Previously, we used Shared Preferences, which worked when the
storage manager was localized to Settings. Now that it is in
its own separate APK, we need to use a separate setting to configure
it.
Bug: 28965462
Change-Id: I073859ef1a764679bbc63d3c0cd96af82306212e
This service runs once a day when plugged in when the device has
under 15% free space remaining. If the FeatureFactory has a
storage management job, it runs the job to begin to free up space
on the device.
This is a temporary landing place and will be refactored very
quickly out of Settings.
Bug: 28600825
Change-Id: Id2ebb42a333b3b4e3daef4e50cf985fe055b85c7
The first implementation simply had every file in the Downloads folder
be under a single checkbox. This iteration makes Downloads an
expandable dropdown preference listing every single file individually
for selection to be deleted.
Bug: 28621781
Change-Id: I5169caf718cee4c0fa7f0248bc4c443984766005
Older Android style buttons were used for the bottom button bar.
By changing them to use the buttonBarBottomStyle, they are updated
to flat buttons. The bottom button bar for settings preference
fragments now more closely tracks the Material Design spec as seen
here in [0].
The other Settings views which use the button bar buttons are the
Redaction settings and WiFi network picker in some contexts. These
should be unaffected as they are based on the SettingsActivity,
rather than the SettingsFragment, and inflate a different view.
[0] https://material-design.storage.googleapis.com/publish/material_v_8/material_ext_publish/0B7WCemMG6e0VaDdZWXpLXzNicjg/components_buttons_usage6.png
Bug: 28845586
Change-Id: I9ea55aa2fe1e76f8f952880675501cbb0f76719d
This was caused by a change I made to the extraInfo on the app.
The extra info used to be a long which was the last usage time.
I changed it to a UsageStatsState and missed this usage of it.
The attempted cast to long caused a crash.
Bug: 28885317
Change-Id: Ie0d6bcea5d0afccd2762acd19d628c742c7e3db9
This adds a custom preference group which has both a checkbox
and collapse/expand behavior. This is intended to be used in
the deletion helper for apps deletion and downloads folder
deletion.
This patch implements the apps deletion integration.
Bug: 28769691
Change-Id: I9fb28a1baa4067841742b5dbeaf2083728c16144
This solves several problems. The first is that if a user installs
a large app which triggers the deletion helper, the deletion helper
may clear out the recently installed large app to free up space.
The second is that it appears that the usage stats may not be
synced from device to device currently using Backup and Restore.
By considering the installation to be a use for deletion helper
filtering, this should avoid the problem for 60 days (and if the
user hasn't used the app at that point, it should be fair game
to clear).
Bug: 28800057
Change-Id: Idb8545aa45a42e45dc673dc5c179c0197204edfd
After a manual clear, the user will be prompted to turn
on the storage manager, if it is turned off. The prompt
will only show up after certain defined delay times and
stop showing up entirely if denied enough times.
Currently, the dialog does not actually turn on the storage
manager because the storage manager is not yet landed.
Bug: 28801159
Change-Id: I3c221786d08a7102b3b5357416ab12692d1894cf
This provides a toggle for changing if the storage manager
is turned on or off and how many days of data to retain.
It is currently not hooked up to anything currently and only acts as
the view, pending b/28600825.
Bug: 28560570
Change-Id: Iaa2d819f26addab4dc02ced80e9ba79e0fcf0980
The dialog states how much space will be freed by the deletion
and prompts the user to either cancel or continue with the
deletion.
BUG: 28762412
Change-Id: I8db2a8f928c82ebaa2cf5fea030b6b6f4730eb3e
This adds a deletion service to delete files in the Downloads
folder. All of the files there are collected and offered to the
user to delete.
Bug: 28621781
Change-Id: I94431f9abc3a0afa2d07dbab763312c09e830aef
This overlay defines a checkbox preference in the deletion helper for
facilitating the deletion of photos and videos. The service which
provides deletion clearing can be overridden and used to create a
custom photo and video deletion helper.
Bug: 28554187
Bug: 28560856
Change-Id: Id5d9671a307aaac0d1331f055b8f2ab7aa67977c
Negative file sizes for packages occurs when the file size is either
unknown or if an error occurred during size calculation. As a result,
we can skip them for total freeable space calculations.
Bug: 28465884
Change-Id: I340d725a66a228fd94993781c5e8ef732a60a7b3
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
(cherry picked from commit a671272bf6)