Commit Graph

51 Commits

Author SHA1 Message Date
Daniel Nishi
bf8f896879 Update the deletion helper intent string.
Bug: 28675265
Change-Id: Ic56e1617d0cf66e347c3a9b31592de4737b19bb3
2016-06-21 16:06:12 -07:00
Daniel Nishi
aad643caf2 Remove the Deletion Helper and Automatic Storage Management jobs.
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
2016-06-21 10:00:52 -07:00
Daniel Nishi
0074855229 Show storage manager settings using a system property.
This removes a Settings-only configuration on whether or not the
storage manager is enabled and replaced it with a system property.

Bug: 29336081
Change-Id: I2328c213f5f11f89bf0fe61e77d3062459036fc3
2016-06-15 11:01:58 -07:00
Felipe Leme
ff162a3c23 Display total storage for Internal shared storage.
Prior to this change, Settings was using
volume.getPath().getTotalBytes() to calculate the total, which includes
the user-accessible storage, but not the internal partitions. As such,
the total displayed was often missing many GBs (for example, in a 32GB
device, it could display "12.09GB of 25.01GB used".

This change fix this problem by using the total size and creating a
"System" section containing the "missing" storage.

BUG: 24128505

Change-Id: Ic35cd7c8406eff16ac1d97c4b4c233ecde64a6e1

** Cherrypicked from master - DO NOT MERGE **
2016-06-08 14:49:32 +00:00
Daniel Nishi
728eebe3c0 Hide the Deletion Helper entry points from Settings.
Remove the menu item which enters the Deletion Helper fragment.
The deletion helper can still be accessed if storage management is
enabled in the storage management settings.

Bug: 28967987
Change-Id: Iff4730998edbab5889b2b8e23b6ad260ae0c0359
2016-05-26 11:14:07 -07:00
Daniel Nishi
ba03d2ff21 Update the storage manager settings to match the mocks.
Bug: 28560570
Change-Id: I0f218da1d23b687e38c52b5a927f7b84645958c7
2016-05-23 13:27:30 -07:00
Daniel Nishi
0216e9dc2e Add an upsell dialog to activate the storage manager.
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
2016-05-18 09:25:38 -07:00
Daniel Nishi
116a55cdab Add the automatic storage manager settings.
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
2016-05-17 09:32:12 -07:00
Felipe Leme
23c69bb59f Merge "Fixed calls to update() when configuration changed." into nyc-dev
am: f4f2211b13

* commit 'f4f2211b1364422abec41e056af77c03247c3f4e':
  Fixed calls to update() when configuration changed.

Change-Id: Ia35d89560fe2dd51d1c0dc8da3d1209c2cb03622
2016-05-13 17:44:41 +00:00
Felipe Leme
6ebd561960 Fixed calls to update() when configuration changed.
update() is an expensive operation and should only be called
once under normal circumstances (it still needs to be called due to external changes). In particular, it should not be called again on orientation changes.

The first approach to solve the orientation change caused the volume title to not be shown when the screen changed on multi window environments; the fix for title issue caused the update to be called again on configuration changes.

This change properly fixes both issues by removing the onAttach() / onDetach() methods and using a clearer variable (mNeedsUpdate) to avoid future regressions.

BUG: 24508289
BUG: 27989238
Change-Id: I140f5a541cda293f1c476d3b80a5bc8918e18b08
2016-05-12 14:43:35 -07:00
Daniel Nishi
b84304d4e6 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
(cherry picked from commit a671272bf6)
2016-04-21 10:20:58 -07:00
Jason Monk
f3446f98d5 Fix storage title clearing in multi-window
By accurately tracking detached state.

Change-Id: If9d60000f7737c834afde680d15a2af21f7e3165
Fixes: 27989238
2016-04-20 13:05:45 -04:00
Suprabh Shukla
3f4ac54c77 Clearing cache for managed profile apps
Added code to loop over all the child profiles and delete application
cache files for them, when clearing cache from Settings->Storage

Bug: b/25338468
Change-Id: I87dba56218402be44b71a009e93b2e93f48a574c
2016-04-12 16:47:08 -07:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Ben Kwa
0c851297b4 Rename ACTION_BROWSE_DOCUMENT_ROOT -> ACTION_BROWSE
BUG=23137963

Change-Id: I32e995b4421de4c90faa4e80a095c7df2f7aee25
2015-11-18 09:41:38 -08:00
Felipe Leme
dc4dbbdb49 Set key when Explore preference is created, otherwise tapping it will cause a NPE.
BUG: 25597961

Change-Id: I1e2fc8caa961e1054472b46cbeb6aad407a1f91a
2015-11-09 15:52:32 -08:00
Felipe Leme
157ec2f09a Change workflow so update() is not called when the device changes orientation.
BUG: 24508289

Change-Id: I7929aac953741a19f5bc4ffbbb9929a9a2f6104e
2015-11-04 14:27:04 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Jeff Sharkey
edf038205e am a334d530: am b38493cc: am b0f9e9d4: am 82fee7bd: am b4158f0e: Merge "Only offer migration between private volumes." into mnc-dev
* commit 'a334d53025fbbf187f5aad5abf61091f9c994e01':
  Only offer migration between private volumes.
2015-08-14 21:12:58 +00:00
Jeff Sharkey
6f52ed3332 Only offer migration between private volumes.
Without this change, there is a confusing option to migrate a public
SD card volume to internal storage, which will always fail if the
user picks it, since it's not supported under the hood.

Bug: 22966671
Change-Id: Id7cad07eea6583aace398a6d64383bf7d884ae9e
2015-08-14 09:46:03 -07:00
Jeff Sharkey
c9a811619b am 31566703: am 600cfe2f: am a61c803e: am 7f3026c3: am bb9d6b90: Merge "Refresh after clearing, tweak warn threshold." into mnc-dev
* commit '3156670323c2c909a05215c464181db44abbe991':
  Refresh after clearing, tweak warn threshold.
2015-07-30 19:59:20 +00:00
Jeff Sharkey
f99b424f3b Refresh after clearing, tweak warn threshold.
Refresh UI after clearing cache.  Hide user header on single-user
devices to match UX spec.  Refine adopted storage warning threshold
based on experiments with various devices.

For example, a typical internal storage device runs the benchmark
in about 600ms.  Very fast SD cards take about 1700ms, moderate speed
SD cards take about 3800ms, and slow SD cards take about 6800ms.

Bug: 22345902, 22487370
Change-Id: I6066f3b78dbb32277ae94b79e325500724f83c7e
2015-07-30 11:51:47 -07:00
Jason Monk
02da7d3b11 am 64570b2b: am 06e549fa: am eb37daff: am b6cb215c: am cd075edf: Merge "Fix Help menu for PrivateVolumeSettings" into mnc-dev
* commit '64570b2b70afecad5936f6a39c09023ff6c1a625':
  Fix Help menu for PrivateVolumeSettings
2015-07-15 16:04:57 +00:00
Jason Monk
f05248f88f Fix Help menu for PrivateVolumeSettings
Call super.onCreateOptionsMenu so that the auto help stuff can
work properly.

Bug: 22202745
Change-Id: Iee6b4a81574c7e981290465a78641f3c5b06c143
2015-07-14 15:00:22 -04:00
Zoltan Szatmary-Ban
25b3876b19 am ba79dc4d: am 0998e03a: am e4e52064: am c968c407: am 098c296d: Merge "Do not throw exception when MeasurementDetails.mediaSize is empty" into mnc-dev
* commit 'ba79dc4d32e6fb909732b04b9cec562aa4a762da':
  Do not throw exception when MeasurementDetails.mediaSize is empty
2015-07-14 16:42:04 +00:00
Zoltan Szatmary-Ban
098c296df2 Merge "Do not throw exception when MeasurementDetails.mediaSize is empty" into mnc-dev 2015-07-13 13:09:54 +00:00
Zoltan Szatmary-Ban
706e7014d8 Do not throw exception when MeasurementDetails.mediaSize is empty
It is legitimate for StorageMeasurement.measureExactStorage to return without any user keys
added to the returned MeasurementDetails, when the following is true:

mVolume == null || !mVolume.isMountedReadable()

Bug: 22394495
Change-Id: Ie40bd468a487208d98dc56aae41fdad7098f41a5
2015-07-13 12:37:31 +01:00
Zoltan Szatmary-Ban
b211a5d2b9 am e14e92a2: am 4dc5b67c: am b8254212: am 325ba385: am 4bbe3d1f: Update all shown preferences in Settings > Storage
* commit 'e14e92a2ceac5827e35aa62ba6a82d3f87300d50':
  Update all shown preferences in Settings > Storage
2015-07-09 16:07:29 +00:00
Zoltan Szatmary-Ban
4bbe3d1fb6 Update all shown preferences in Settings > Storage
This is achieved by iterating through the pool of StorageItemPreferences up
to the index of the last shown one, instead of iterating through the
preferences of the screen which may miss preferences inside other top-level
preference groups.

Bug: 22353561
Change-Id: I2293a7949a5becfb506d6b7965f8db2f11845756
2015-07-09 15:37:26 +01:00
Zoltan Szatmary-Ban
df57fa52ab resolved conflicts for merge of 8eade69d to master
Change-Id: Id2a2269b506c2ffa06dcfd3a02b32eced5e7632b
2015-07-08 16:05:49 +01:00
Zoltan Szatmary-Ban
6a00f6cf0b Making Settings > Storage multiprofile aware
Also fixing the order of preferences there.

Bug: 22223456
Bug: 22117317
Change-Id: I9261fe46bfce518fd1ce3d0faef07cffe6869e34
2015-07-07 20:33:30 +01:00
Jeff Sharkey
fa7c4905d4 am fe7cea03: am 41e81016: am fe015ffe: am 355c13d2: am 66b5a58a: Merge "Fix init order so we have something to measure." into mnc-dev
* commit 'fe7cea03af1b5fca75a0e8931945c8e288a5d7ae':
  Fix init order so we have something to measure.
2015-07-07 00:31:45 +00:00
Jeff Sharkey
d17921337d am b126a4ea: am 084dd048: am fc963764: am bdb64bf1: am 7616b00b: Merge changes from topic \'mig\' into mnc-dev
* commit 'b126a4ea4abffecd9580b1c56cde22f58e7f742d':
  Fix some ordering, colors, and accessibility bugs.
  Handle missing migration source volume.
2015-07-07 00:31:43 +00:00
Jeff Sharkey
215fa65c10 Fix init order so we have something to measure.
Otherwise we start measuring without shared storage in place, meaning
we always find sizes of 0.

Bug: 22231501
Change-Id: I760064684e76e5ef5cce351aee1d81a971f4d4ea
2015-07-06 10:17:44 -07:00
Jeff Sharkey
48751c1a51 Fix some ordering, colors, and accessibility bugs.
When adding preferences to public/private details screens, always
add in-order when rebuilding.  Hacky fix for broken summary text and
eject image color tints.

Fix crash when device rotated during partitioning.  Set correct
accessibility titles in all wizard steps.

Bug: 22098044, 21376962
Change-Id: I68aff96cba497a91919cad8865722bc9cef7eaa7
2015-07-05 22:10:13 -07:00
Daichi Hirono
c22816362c Show bar graphs for internal storage items (Apps, images, video etc.).
BUG=21898434

Change-Id: I8285088c7bef82bbd63fa38d6a95180079acd195
2015-07-02 17:54:29 +09:00
Jeff Sharkey
665094c9d2 Actually gracefully finish this time around.
Also fix tinting on front-door icon.

Bug: 21403958
Change-Id: I74f0372a41b92235abe10391f36d9f6a1e6a40c5
2015-06-16 20:21:12 -07:00
Jeff Sharkey
e79ff145f3 Gracefully finish when missing volume.
Bug: 21403958
Change-Id: Icb78bb633842571c4df696c9db72a5b97ece0655
2015-06-16 16:46:03 -07:00
Jeff Sharkey
2597625fd9 More storage UI updates.
Storage volumes now have headers with larger fonts and progress bars
to show used versus free space.  Updated Memory to use new formatting
template, and Data Usage to use consistent display logic.

Allocate a unique color for each private volume, and yell when a
volume is running low on space.  Update private volume details to
launch into MediaStore-backed storage backends in a management mode,
and only show detailed items when hosting emulated storage.  Show
details dialog about "Other" and user storage items.

Shortcut into single private volume when it's the only device.  Add
real eject icon.

Bug: 21756698, 20275574, 21326612
Change-Id: If3ecd1d912d3e709c09d3e4da24f368e04dd3f9d
2015-06-15 21:44:21 -07:00
Jeff Sharkey
edb7b0d9a9 New storage dialogs.
Show a helpful dialog when a volume is unmounted or unmountable, or
when disk is unsupported.  Add both missing private volumes and
unsupported disks in the storage list.  Dialog to confirm when
forgetting private volume.

Finish volume detail activities when the volume becomes unmounted.

Show used space instead of free space to match string.  When init'ing
a volume on non-adoptable disk, just format as public.

Bug: 21737573, 21666225, 21737666, 21471429
Change-Id: Id60d5a398e2b7923ebebdc5cfaef33248d8d77bb
2015-06-14 21:07:30 -07:00
Nick Kralevich
7000d54338 New UI for controlling USB
Create a new UI for managing USB access control. This UI is implemented
as a transparent popup triggered by a persistent notification.

Delete the old UI for controlling this. It is no longer used.

Bug: 18905620
Change-Id: I54186961414447a9d37f68e946e1c167506170ae
2015-05-13 15:23:52 -07:00
Jeff Sharkey
e77f0687dd Returning to wizard, enable migration.
Bring primary storage migration back into the adoption flow, and
provide a path for long-lived notifications to re-launch into the
Settings app.  Also provide option to initiate migration if skipped
during wizard.  For now, estmiate migration size and time based on
a Class 10 card.

Follow other callback refactoring.

Bug: 19993667
Change-Id: Ia0c28eb114bc6c8066c17b3142ed74f962140c91
2015-04-29 17:24:12 -07:00
Jeff Sharkey
a16257dbd5 Format as public/private; follow refactoring.
Offer to format an empty disk as public/private.

Bug: 19993667
Change-Id: I69fafaed524f3ef5e65d04a9e3a94789fcfc3087
2015-04-28 21:54:54 -07:00
Tony Mantler
d325f5d53c Move StorageMeasurement to SettingsLib
Change-Id: I00335fe896ef1bae11c382592eea2a354269818a
2015-04-23 15:23:44 -07:00
Jeff Sharkey
90daa80c5b Use new VolumeInfo helper methods.
Makes it clearer if we're checking for readable/writable state,
and puts emulated/private conversion logic in single place.

Bug: 19993667
Change-Id: I953f5c184ca62afc631d855e64cd8a4972320148
2015-04-18 16:22:12 -07:00
Jason Monk
02a310d8c9 Filter app list by storage volume
(when coming from storage settings)

Bug: 19989309
Change-Id: I932b67d25b5c9305067969ba13acb1a9f78e6cdb
2015-04-16 11:45:34 -04:00
Jeff Sharkey
7bc9235aaa Avoid a few crashes around unmounting.
Also refresh UI when metadata changes.

Bug: 19993667
Change-Id: Ib0ea9be68a3db5c71d15fae6809f31df43fd9af0
2015-04-14 23:17:04 -07:00
Jeff Sharkey
4366b565e1 Storage accessors; persist nickname, flags.
Move to using new public accessors on DiskInfo and VolumeInfo.

Persist nickname changes, and remember when user has initialized a
public volume.  Also skip the migration part of storage wizard until
it's implemented.

Bug: 19993667
Change-Id: I642fb43afb95380fddd48a1dad438e87b06454da
2015-04-14 21:53:28 -07:00
Jeff Sharkey
2949a4ab4d Follow storage refactoring in system.
Also add entry point for SystemUI unmounting, and require permissions
when launching into those flows.

Bug: 19993667
Change-Id: I703d2e5f118848a2e2e96ce1d7f970e5705a288a
2015-04-14 16:46:28 -07:00
Jeff Sharkey
94635995e4 Checkpoint of new storage wizards.
Use frameworks/opt/setupwizard/library/ for consistent behavior and
styling on phones and tablets.  Implement every step of wizard flow
and connect them together, even though some steps are currently
non-functional.  All strings to match UX spec, with some adjustment.

Wizards inherit from helper base class.

New interstitials before unmounting or formatting private storage
to confirm user knows consequences.

Bug: 19993667
Change-Id: I2c774e1718d513805ee8aecfc96d066d4730450c
2015-04-13 21:45:39 -07:00