Commit Graph

25 Commits

Author SHA1 Message Date
Jeff Sharkey
2af67a9302 Update storage wizard to latest UX mocks.
Mostly shuffling around strings and layouts.  Slow device warning is
now a full-screen activity, and format warning is now a dialog.

Bug: 76097999
Test: atest com.android.settings.ui.StorageWizardTest
Change-Id: Ifd74e3b1389f0cc9590f6a6a2cd49671f3bbc746
2018-04-08 20:06:27 -06:00
Daniel Nishi
edafa44c7e Don't crash on opening ejecting USB.
This crash occurs because, even if you finish an Activity during
onCreate, the other lifecycle methods occur. In this case,
onActivityCreated assumes that onCreate ran properly.

By exiting early from onActivityCreated, we can ensure the activity
is finished properly.

Change-Id: Ia354341bf82d295c7dd042668fb11d588ddfebc0
Fixes: 37334861
Test: Instrumentation test
2017-04-18 12:19:36 -07:00
Jeff Sharkey
52aa9fb170 Always show at least 1% when some space used.
Don't let the progress value round down to 0, since that would
be misleading.

Test: builds
Bug: 24017703
Change-Id: I6a0268361645da16af67e12bf7f6823d027dd72c
2016-11-15 15:17:31 -07:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00: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
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Guang Zhu
5e83b0d9fa am 29936b07: am 5ea94a9c: am b91da24d: am 402c866c: am c1bef743: Prevent monkey from changing adoptable storage settings
* commit '29936b072f9d1623b16356b6837d38b7c865cb60':
  Prevent monkey from changing adoptable storage settings
2015-07-24 04:50:00 +00:00
Guang Zhu
c1bef7430e Prevent monkey from changing adoptable storage settings
Bug: 22423188
Change-Id: I36c798574c933b0339fad46af81b87a93ccea07b
2015-07-23 10:57:59 -07:00
Daichi Hirono
5e76cdc9dd Turn the eject menu into a button.
BUG=21897892

Change-Id: Icd0db7907b990447c99c4ae65816e85777df0f8e
2015-07-17 15:26:15 +09: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
Amith Yamasani
350274040e Only allow admin users to adopt sd card as internal storage.
Bug: 21883016
Change-Id: I11ca324ab74ce2a8bf13064b4c7735aea132c562
2015-06-30 14:23:54 -07: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
Jeff Sharkey
680329f10c Follow string refactoring.
Change-Id: Ib450724a20283a3bf356593e487b8ee6e9c8de5c
2015-06-10 17:27:44 -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
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
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
Jeff Sharkey
42833b2ff4 Checkpoint of new storage UI.
Top-level storage UI now shows list of all devices, both internal
and adopted/private volumes, and public/shared volumes.

When viewing a private volume, show traditional clustering of data
types, including summary of other users.  For adopted volumes, any
actions are tucked away in a menu, since they're not primary.  Misc
files browsing is now provided by DocumentsUI.

Teach StorageMeasurement about new private volumes, including
handling emulated volumes stacked above them.  When measuring, only
consider apps actually hosted on the current volume UUID.

When viewing a public volume, we default to launching into file
management mode, and offer a simple eject button at the top-level
view.  File management mode is offered by new DocumentsUI browse
intent, and a Settings link there redirects back to us for actual
operations like ejecting/formatting.  When unmounted, we launch
into our action view.

Actions like ejecting/formatting just show simple toasts for now.

Bug: 19993667
Change-Id: Ie990ef3c01fb3717aaf8c79bfc53aac7edefdcf7
2015-04-12 22:02:32 -07:00