Commit Graph

62 Commits

Author SHA1 Message Date
Garfield Tan
dbd039a6de resolve merge conflicts of af840b5 to master
Change-Id: I8a31d08dae71d5cb71ae01c06ead4ebf32f89121
2016-09-29 18:08:25 -07:00
Garfield Tan
493bf348b9 Launch other info in storage in correct user id.
Bug: 31592290
Change-Id: I816668c7ff9d1b443d4b49e17bdcfa39ef335aee
2016-09-29 14:45:50 -07:00
TreeHugger Robot
295f5a03bc Merge "Add visibility metrics to dialogs." 2016-09-20 15:55:41 +00:00
Fan Zhang
1e516287bd Add visibility metrics to dialogs.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Change-Id: I199d2e1b2cb8588a562b46bb8128d8ece24952f0
2016-09-19 17:34:12 -07:00
Daniel Nishi
c0b33f70ed Use a config flag instead of a RO flag for showing Manage Storage.
Bug: 30455784
Test: make SettingsTests; run the instrumentation.
Change-Id: I860192c1c20fcaec2a5cbcdc085ff01dafa7351a
(cherry picked from commit 7f075a3c41)
2016-09-19 20:39:33 +00:00
Daniel Nishi
7f075a3c41 Use a config flag instead of a RO flag for showing Manage Storage.
Bug: 30455784
Test: make SettingsTests; run the instrumentation.
Change-Id: I860192c1c20fcaec2a5cbcdc085ff01dafa7351a
2016-09-16 15:56:47 -07:00
Felipe Leme
3b0a9cb54f Improved storage accounting: am: 7358b7802f am: 49260969b7
am: 1469dde1a0

Change-Id: I2cb0e03aab3c79bde080ea3b73a1ad31c72d5cfa
2016-09-13 21:35:33 +00:00
Felipe Leme
7358b7802f Improved storage accounting:
- Removed duplicated entry for DIRECTORY_MOVIES.
- Added DIRECTORY_DOWNLOADS to Other.
- Added unaccounted data to Other.
- Changed Other description so it mention non-visible items.

Often sub-directories of /data are populated with data that Settings
doesn't have control of (for example, on /data/ramdump), so they're more
suitable to be displayed in the "Other" section.

BUG: 31091863
Fixes: 30952263

Change-Id: Ibf54f9dd96456575109e2e281f3780da84f70d92
2016-09-13 10:49:34 -07:00
Felipe Leme
b152113898 Only display System section for current user. am: ce37ef51aa am: 0547440ad7
am: 3d9cb084e9

Change-Id: I5b210e644b2fcdeaa7611a373ab2dbed5db89cd2
2016-08-31 01:19:28 +00:00
Felipe Leme
ce37ef51aa Only display System section for current user.
Otherwise it will be displayed twice on work profiles.

Change-Id: Ic7d21a57f72b9f4a254d574adce90afd7cd27b90
Test: manual verification
Fixes: 31108318
2016-08-30 12:00:27 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
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