Commit Graph

62 Commits

Author SHA1 Message Date
Fabrice Di Meglio
45f754e506 Add Indexable.SearchIndexProvider.getNonIndexableKeys(Context)
- getNonIndexableKeys(Context) allow a SearchIndexProvider to tell which data
he does not want to index by providing a list of the data keys
- use this new API for SoundSettings and removing KEY_EMERGENCY_TONE related
settings if the device is not CDMA
- add a BaseSearchIndexProvider for code simplification

Change-Id: I23633ace1d7e390ee05fac0a5458a33e04e72d8d
2014-04-11 11:16:33 -07:00
Fabrice Di Meglio
f66eb7a8c8 Add indexing for Storage preferences
- implement the contract for SEARCH_INDEX_DATA_PROVIDER

Change-Id: I131e9176c47ccd697d05961b09546ba0e51059f7
2014-04-02 17:18:56 -07:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Amith Yamasani
c778bc560d Use a public media content uri for viewing local media files
Bug: 11061566
Change-Id: I7e049f48d37a68a0a41b7a62383eea71f3938c44
2013-10-04 14:59:40 -07:00
Maggie Benthall
6ad2e323f7 When user has DISALLOW_USB_FILE_TRANSFER set, disable settings controls.
Under Settings > Storage, remove the "USB computer connection" menu item.
In case someone launches the UsbSettings screen instead, also disable those checkboxes.

Change-Id: I59ec8b16bed4670beeac8d359e5368e4a659061b
2013-03-29 18:59:33 -04:00
Jeff Sharkey
e6c5003278 Remove guava dependency to speed up build.
Change-Id: I4cee4b6324e72e94c1241e10f3cdc507d65512cd
2013-03-06 11:47:26 -08:00
Jeff Sharkey
0e9cf8a723 Storage item to represent cached data.
When touched, offers to clear all cached data.

Bug: 7216370
Change-Id: I86afe66b819fb7deeba909bef507925fc5a590f3
2012-09-23 17:49:31 -07:00
Jeff Sharkey
da13ec0cb4 Iteration on multi-user Storage UI.
Now that DefaultContainerService has visibility of external storage
for all users, we can measure internal storage in a single pass.
Internal storage measurement now iterates across all known users,
counting both apps and emulated storage usage.

Create MeasurementDetails object with documentation about what is
counted under various device configurations.  Generalize to measure
each Environment.DIRECTORY separately, so it can be combined as
needed.  General cleanup of how measurements are passed to UI.

Bug: 7003520
Change-Id: Ib89c185296a0c9debdc20beeaa98584d803a84e8
2012-09-13 01:13:48 -07:00
Jeff Sharkey
fc76a78c45 Include user identifier in external storage paths.
When building external storage paths, always include user in path
to enable cross-user paths and aid debugging.

Mostly changes so Storage doesn't crash; will take another UI
iteration pass soon.

Bug: 7131382
Change-Id: If7ec807f12a36eb8ed02a0fb94e8a0b3a6694f16
2012-09-11 22:49:27 -07:00
Jeff Sharkey
04df8b77a4 Iteration on multi-user storage UI.
Adds headers to distinguish between current and other users.  Also
correctly orders color chips.

Bug: 7003520
Change-Id: I871f1a38d41dad5a5f7d97d91d2ebaac5951066c
2012-09-07 13:23:55 -07:00
Jeff Sharkey
96c2f8c508 Progress towards split storage categories.
Cleans up StorageVolumePreferenceCategory creation, and uses new
isPrimary() API instead of passing around hacky "i == 0" derived
value.

Bug: 7003520
Change-Id: I9eb7164035b5368ee795e35b22e750aebbf3b159
2012-09-06 23:21:09 -07:00
Jean-Baptiste Queru
1183f487c8 Merge "MTP/PTP: disable erasing/unmount operation for SD card while MTP/PTP is active" 2012-08-23 09:31:36 -07:00
Chuanxiao Dong
66e7f0a393 Fix the issue the setting crashes after unmount SD card in landscape
When rotate the phone, mLastClickedMountToggle and mClickedMountPoint
would be destroied which made dialog access NULL pointer.

Change-Id: Ic96fce93828ca7a6f8749fad6a258eb47831e062
Author: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 26569
2012-08-10 10:49:45 +08:00
Li Gang
8218d3ba18 MTP/PTP: disable erasing/unmount operation for SD card while MTP/PTP is active
Check the USB connection status and MTP/PTP setting, if USB connected and MTP/PTP enabled,
disable the erasing and umount operation.
Judge SD card Mounting status and keep summary string.

Change-Id: Iff3e0f25b581bc462c88fff59eb93d765baaddd7
Author: Li Gang <gang.g.li@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 47043
2012-08-10 10:20:48 +08:00
Jeff Sharkey
caf15613c2 Enforce READ_EXTERNAL in Developer Options.
Move from Storage to Developer Options, and add interstitial dialog
with more details.

Bug: 6461446
Change-Id: I6d3d8fdc61a3e920ed58ab4d726949ac3c31feab
2012-05-14 20:53:11 -07:00
Amith Yamasani
3fd8051a89 Don't let monkeys launch storage management activities.
Guard against monkeys in two places where intents to other activities are
launched.

Bug: 5415988
Change-Id: Ia3c5514c02423f7b249f655296bb02e279789dfd
2012-04-23 13:46:10 -07:00
Jeff Sharkey
78a534af1b Handle READ_EXTERNAL enforced by default.
Bug: 6131916
Change-Id: Icbdaf6c7febfb8f93992a1f32732d104c8c1848c
2012-04-12 23:27:59 -07:00
Jeff Sharkey
11d3012c78 Enforcement control for READ_EXTERNAL permission.
Surface enforcement controls for READ_EXTERNAL_STORAGE permission
using new PackageManager API.

Bug: 6131916
Change-Id: I0ece4742666fda58e41410cb4b0b7175f280fa31
2012-03-19 17:23:01 -07:00
Ben Komalo
2a32192329 Force storage wipe if not removable and encrypted
Bug: 5017638
Change-Id: I43c98359eff7202437249675060ba964e1bd085c
2011-09-09 12:40:38 -07:00
Christopher Tate
c9026c9edb Always put 'USB COMPUTER CONNECTION' into the overflow menu
Bug 5011831

Change-Id: I93d24a16508cfcc9f81b8bd3ad43cfffe52db1d5
2011-08-02 16:24:35 -07:00
Gilles Debunne
b7609ff999 Storage correctly updates internal storage graph.
The estimated used size used to be displayed next to the actual applications' size.

Change-Id: I9a9bf1faf638f8495507930e531ca4c851558f26
2011-07-08 16:07:33 -07:00
Mike Lockwood
02900a12b1 Super rough implementation of new USB settings
There does not seem to be a way to implement radio buttons in a settings screen,
so I am using check boxes as a temporary hack.

Change-Id: I2d2c7931f689ff04608662b64aafc4862cfef48e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-06 10:56:13 -04:00
Amith Yamasani
2d9357f6d0 Fix a crash on certain devices in Storage settings.
Bug: 4980974
Change-Id: If4b89f9cb1813c30ced6d7093381a01a5aa00346
2011-06-30 11:08:41 -07:00
Dianne Hackborn
bd9ddab4f4 Fix up storage UI for old USB storage.
- In the storage overview, if storage is not emulated then we have a
new first section showing internal storage.
- In manage applications, we know show storage use on the SD card
separately from internal storage use.

Change-Id: I7eb993f59fdb5de5f5dcfe4a3bc2b95ae30d754a
2011-06-29 15:41:28 -07:00
Gilles Debunne
8f1bd8a752 Bug 4539424: confirmation dialog always shown
Change-Id: Id1e2a52a07255e2c98cbd0e8151a82d7a2612517
2011-06-06 15:48:08 -07:00
Gilles Debunne
99da1a22a3 Always show unmount confirmation dialog
Somehow related to bug 4534261

Change-Id: I2a64406ced4a2c231114d7bb949b84c59199fd82
2011-06-03 14:47:13 -07:00
Gilles Debunne
6d36fd3a03 Erase SD Card fixed in Settings/Storage.
Adding the StorageVolume to the format intent.

Change-Id: If1a50a2d5c5154e9f00116db536c62324c447e7c
2011-05-26 15:00:17 -07:00
Gilles Debunne
104ea2873d Storage stats on external SD card in Settings.
Storage categories are dynamically created from list of StorageVolumes instead
of a static XML.

Unknown files' sizes are part of Misc rather than Apps.

Categories with a size of 0 are removed.

TODO : remove the notion of a "nosdcard" product. Change strings accordingly.
See all TODO in code

Change-Id: I017ac20f5fa50ad9bdeba8e666754ec84acf3858
2011-05-25 12:12:22 -07:00
Vasu Nori
340e85d1d0 bug:3321005 make Settings --> Storage screen display little less ugly
I have implemented most of what the UX designer proposed. except these
1. Percentage Bar chart left padding should be 16dip
2. Percentage Bar chart and Total Space preferences should be combined into
   one singne ViewGroup or something. and "total Space" shoudl be aligned
   on the right border

Change-Id: I9b238eaa561c9837b47b9955e7d718d92543ca34
2011-03-02 17:26:53 -08:00
Kenny Root
76c5328935 Data race in initialization of misc files info
Bug: 3480796
Change-Id: I1ff2e7c167872f4e2f11c93981b2dd6ebd0ee897
2011-02-24 12:44:33 -08:00
Vasu Nori
21809740f2 display amount of storage on /sdcard by downloads, music etc
when music storage usage is clicked on, show music app
when downloads storage usage is clicked on, show download app
when pic/videos storage usage is clicked on, show gallery app

Change-Id: Ia1c341013e550acb537e6f8a4f4558030888cc45
2011-02-18 12:05:13 -08:00
Vasu Nori
a3314e2bdb bug:3402846 fix settings->storage
Change-Id: Icb9e33cb0336f87f43797330f56e9c8fcbe2dfd0
2011-01-28 17:14:38 -08:00
Hung-ying Tyan
0ee51e04fb Allow OnCancelListener and OnDismissListener in Settings app
for the framework-managed dialogs.

DialogFragment acts as both listeners so the application cannot set both
listeners in the embedded dialog. New hooks are added in SettingsDialogFragment
so that settings apps can do so for the framework-managed dialogs.

Bug: 3386670
Change-Id: I144e7c4ccf7f86c61f6079fa86d830c709335af1
2011-01-25 17:31:26 +08:00
Kenny Root
3785e390d2 Don't show separate option for erasing USB storage
On devices with emulated USB storage or SD card, factory reset will wipe
all data from that area. Given that, it doesn't make sense to show a
different option for wiping USB storage.

Bug: 3242568
Change-Id: I257bdde06141f14381c8c09ce6a42c18d7080efd
2011-01-18 15:14:32 -08:00
Vasu Nori
fdf7220a03 bug:3308791 appusage should include space used on /sdcard
when "application usage" is clicked on, drop the screen into
Settings --> Applications --> Manage Applications
(all tab, sorted by size)
Change-Id: I64e11ae9a92529b5fb2781941e532951ad3d04c1
2011-01-18 13:19:13 -08:00
Amith Yamasani
998da3332b Recheck the storage sizes when Storage settings is resumed.
Bug: 3312629

When the Storage fragment is displayed, invalidate the measurement
object so that it recomputes the used space on all partitions.
2011-01-05 09:09:23 -08:00
Kenny Root
e4330890d6 Refactor memory measurement
Move out all the memory measurement to a separate class that can cache
all of its data through orientation changes.

Tweak the display to make it draw large squares for the legend instead
of a 1x1 square. Add padding to the percentage bar chart.

Change-Id: I4cd5bc4ba31a422a55740e8f58e5e571cf9866a5
2010-12-17 09:32:45 -08:00
Mike Lockwood
bbef4f9a7d Revert: Add checkbox to enable PTP USB mode.
Change-Id: I7c00c3c3c5da66a31a68fe0767302d2cdda526a1
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-15 14:23:04 -08:00
Mike Lockwood
b8f9ab6792 Rename android.hardware.Usb to UsbManager
Change-Id: Id0c0659c29190609bf9ccf4acb56b9402157f41a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-09 22:35:37 -08:00
Kenny Root
511c8cf103 Add usage bar chart to storage preferences
Change-Id: Ic3c118ac9194e226e6384e01c9ea7e150b1d9521
2010-12-06 09:34:12 -08:00
Dan Morrill
45e3000666 Merge commit '593a7049f52d46a4e47162e2e3f2c5730e8ccfd8' into mergefix
Conflicts:
	res/values/strings.xml
	src/com/android/settings/deviceinfo/Memory.java

Change-Id: Id481ad234f2e74bdef66ea9485a548f11f0cab84
2010-10-18 15:23:16 -07:00
Dianne Hackborn
1337d0f70b Implement issue #3094621 and #3094609 - wipe sd card
3094621: add "wipe sd card" option to factory data reset
3094609: collapse unmount/format into one command

Implements requested UI changes.  Also some final tweaks to
Manage Applications.

Change-Id: I0219195dd0c74d8c003ef1c3f6e09714859d7f89
2010-10-16 16:27:25 -07:00
Mike Lockwood
3d713b162e Add checkbox to enable PTP USB mode.
Change-Id: Icb139cc3d1077565fb8dbe9917d87c7337f59797
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-31 14:38:44 -04:00
Amith Yamasani
d79934731c Refactor settings top level activities to use fragments.
Added a base class SettingsPreferenceFragment from which the settings activities should
be derived so that they can behave like fragments. It contains some commonly called
utility methods and dialog conversion to DialogFragment.

Some of the top-level activities can be launched directly without the left pane.
Settings.java acts as a proxy activity that contains just that settings fragment without
the left pane.

There are still a lot of second and third level activities that need to be fragmentized.
This is just the first pass to test the 2-pane layout.
2010-08-18 22:59:33 -07:00
Suchi Amalapurapu
3d503e356f When unmounting the sdcard, we are currently checking for apps that
have open file references on the sdcard. We also have to check for apps on sd
that are currently running. Use the new ActivityManager api to get a list of these apps before deciding to show the dialog.

Change-Id: Idb00fcbd0a3f314d75ee1662cb2b10a84569527a
2010-03-24 09:08:40 -07:00
Suchi Amalapurapu
6f58b1b426 The getStorageUsers only returns list of storage users accessing the sdcard.
We also have to check if applications on sdcard are currently running.

Change-Id: I4b6478bc834e956f963735f69829c5ba4c7fb8c2
2010-03-23 15:17:52 -07:00
Suchi Amalapurapu
29d587fa18 Add dialog when ejecting sdcard
Remove some dead code
2010-02-24 20:30:09 -08:00
San Mehat
efb26fd219 Settings: sdcard: Refactor unmount calls for new api
Signed-off-by: San Mehat <san@google.com>
2010-02-18 11:48:49 -08:00
San Mehat
a2175d1df2 Settings: Refresh sd settings screen after mount/unmount
Signed-off-by: San Mehat <san@google.com>
2010-02-08 16:26:16 -08:00
San Mehat
1e60c9603e Settings: Refactor for new API and remove some unused references / imports
Signed-off-by: San Mehat <san@google.com>
2010-02-08 16:26:16 -08:00