232 Commits

Author SHA1 Message Date
Bill Yi
808bdf5bce Import translations. DO NOT MERGE
Change-Id: I0276e7c9fb791dcdaf604ed87abe58677abcc3af
Auto-generated-cl: translation import
2017-04-07 17:45:13 -07:00
Jeff Sharkey
c0a60682e2 Merge "We really want f_frsize and f_bavail." into oc-dev am: fd463121c6
am: f9f7d71cc5

Change-Id: Ifa28cb4515d6e9e74380fe70d73aec292d126ac9
2017-04-03 17:43:10 +00:00
Jeff Sharkey
f9f7d71cc5 Merge "We really want f_frsize and f_bavail." into oc-dev
am: fd463121c6

Change-Id: I55aebb3b452f4d41af7e5f54d0dff27e9bc6cca6
2017-04-03 17:27:48 +00:00
Jeff Sharkey
dafb17e7eb We really want f_frsize and f_bavail.
It's confusing, but f_bsize is not the value you're looking for; the
real block size is f_frsize.  Fix all those bugs.

Also, the vast majority of clients are interested in the usable
disk space, not including reserved space.

Test: builds, boots
Bug: 36840579
Change-Id: Ib1470389afd49c14cab62282ec1e978ebb2c4791
2017-04-02 23:33:38 -06:00
Bill Yi
8e79b3a9a0 Import translations. DO NOT MERGE
Change-Id: I789e7f6f9910fb2bfceec085555a42335853f1dd
Auto-generated-cl: translation import
2017-03-31 00:39:13 -07:00
Bill Yi
cebf64124c Import translations. DO NOT MERGE
Change-Id: I53e36942b22959b652d97804e339d85683c0a31b
Auto-generated-cl: translation import
2017-03-31 00:36:03 -07:00
TreeHugger Robot
0e74c95c0c Merge "Unhide FLAG_SUPPORT_EJECT and related methods." 2017-03-24 01:23:53 +00:00
Garfield Tan
8787703ae0 Unhide FLAG_SUPPORT_EJECT and related methods.
Test: Builds and CTS tests pass. Some manual tests as well.
Bug: 36483910
Change-Id: Idd9b1c9d9573222ee12127044ff11b9ab2487f0a
2017-03-23 16:41:24 -07:00
Bill Yi
97da16f1a7 Import translations. DO NOT MERGE
Change-Id: I78f94f36822ec6c8e01bd1ee3e49d75aa9fe65ac
Auto-generated-cl: translation import
2017-03-23 00:41:07 -07:00
Ben Lin
0df63e9080 Add android:label to ExternalStorageProvider.
Test: Builds.
Bug: 30138665
Change-Id: I6ac028f97c1451f9d78f7f5a0960f1a3f8bde5b7
2017-03-20 10:20:41 -07:00
Garfield Tan
b690b4de06 Address comments from API council.
Test: Code builds and tests pass. Also some manual tests around ESP.
Bug: 35813037
Bug: 35812990
Change-Id: Ia9d3a3964e9a83d0c1c08e5db4c2e231504aa99a
2017-03-02 12:48:13 -08:00
Garfield Tan
75379db42d Strip out some logics from ESP to FSP that DSP can use.
Also notify MediaStore when move happens.

Test: build & smoke tested.
Change-Id: I01576765c0b25089a81b77ce0904abea8b24d485
2017-02-24 18:30:03 -08:00
TreeHugger Robot
07323a9824 Merge "Add structured sort data to ContentResolver.query." 2017-01-12 22:21:53 +00:00
Roozbeh Pournader
153071c70a Merge "Rename language+country resources to just language" 2017-01-12 04:58:45 +00:00
Steve McKay
29c3f68cfa Add structured sort data to ContentResolver.query.
Update DocumentsProvider to override
    ContentProvider#query(Uri, String[], Bundle, CancellationSignal);
Added an otherwise unneeded import to pass doc check
    on DocumentsProvider.

Bug: 30927484
Change-Id: I295c21f53901d567455286f22439f21d22a8a25a
Test: Build and run. Test from DocsUi.
2017-01-11 15:01:50 -08:00
Roozbeh Pournader
b84a505b62 Rename language+country resources to just language
Bug: 26496609
Test: none
Change-Id: I40b99a8728f1f324f4c1f8066a61c3d5f92b1ac6
2017-01-10 23:51:26 -08:00
Garfield Tan
dc9593e791 Check visible paths as well when generate docId from file system path.
getDocumentUri(String, List<UriPermission>) needs it because MediaStore
can only provide path under visible paths for external SD cards.

Test: Manual test w/ SD card. Relative CTS tests pass. Happy to add
automated tests for SD card cases if somebody shows me how.

Bug: 33819522
Change-Id: I15cdd60a2d2c94275dd661f20b5b0deb0d80d258
2017-01-09 18:11:34 -08:00
Bill Yi
0c0c21ca76 Revert "Import translations. DO NOT MERGE"
This reverts commit ca0b5fd5a661627cfe814d3ff4e268486eee7058.

Change-Id: Iec420cb2e5482911062acdf973d12e8a3f2a5432
2016-12-05 18:57:22 +00:00
Bill Yi
ca0b5fd5a6 Import translations. DO NOT MERGE
Change-Id: I10c0bb28036af20f55efa7a71b0fb6db363fef12
Auto-generated-cl: translation import
2016-12-02 20:39:30 -08:00
Garfield Tan
92b96ba8fc Add internal support to convert a file system path to document URI.
Test: Manual tested with a new sample app in development/samples.

Bug: 30261615
Change-Id: I498a22b248fbc55b33d3efb4aa3183207cfb7bab
2016-11-10 15:51:39 -08:00
Garfield Tan
3f6b68a697 Iteration on findDocumentPath() API.
Rename findPath() to findDocumentPath() per comment in ag/1588156.

Bug: 30948740
Change-Id: I84ef4d9c0ed1f854e0e33f3552a1805b944c2791
2016-11-01 22:07:45 +00:00
Jeff Sharkey
3b699d7841 Public volumes belong to a single user.
When a public (vfat) device is inserted, it's strongly associated
with the current foreground user, and no other users should be able
to access it, since otherwise that would be a cross-user data leak.

To use the device under a different user, switch users and then
eject/remount the device.

Test: verified user isolation of USB drive
Bug: 32523490
Change-Id: I590c791996f1fea8d78f625dc942d149f1f41614
2016-10-31 14:34:24 -06:00
Garfield Tan
06940e1246 Iteration on findPath API.
* Extend this API to take tree URI
* Add toString(), equals() and hashCode() to Path
* Address Jeff's comments in ag/1513538
* Add unit tests for findPath

Bug: 30948740
Change-Id: Iaf852d0e40fae37623e9bb9ffa1c6fbe334c1b21
(cherry picked from commit d4ab7ade7171a4382ef4f61f2a5f078a17800e83)
2016-10-14 19:18:46 +00:00
Garfield Tan
aba97f3c37 Add findPath API to SAF.
Implement it in ExternalStorageProvider.

Bug: 30948740
Change-Id: I1b7717a794ae3892cd1be5ed90ca155adf9a64f4
(cherry picked from commit 51efc73f3f341393cf93f71604be791205021b69)
2016-10-06 17:34:19 +00:00
Garfield Tan
ab52ea0194 Revert "DO NOT MERGE ANYWHERE: Add findPath API to SAF."
This reverts commit 2f6d0d6db3af4451ae209a07c7dd7ee089cc5653.

Change-Id: I0b8581c6d5edb2a47ddfb75afaaa52c43964087b
2016-10-06 17:26:05 +00:00
Garfield Tan
2f6d0d6db3 DO NOT MERGE ANYWHERE: Add findPath API to SAF.
Implement it in ExternalStorageProvider.

Bug: 30948740
Change-Id: I03241cdfa561ef2fc0a0b829c9a59ad845e8f844
(cherry picked from commit 51efc73f3f341393cf93f71604be791205021b69)
2016-10-05 23:28:34 +00:00
Tomasz Mikolajewski
219fa882d1 Remove support for archives from External and Bugreport providers.
Change-Id: Ia281fe05a0a6a5dd6ff1b66d7197312cf4391793
Test: Compiles.
Bug: 31783726
2016-09-28 11:32:59 +09:00
Jeff Sharkey
aa44476f64 Rename should behave like create: avoid conflict.
When we create a file that already exists, we try attaching a suffix
like "(1)" to the filename to avoid the conflict.  The newly added
rename method should do the same, since developers may not have
access to delete the conflicting file.

Test: boots, rename via UI, new unit tests
Bug: 31545404
Change-Id: Ie397eebb0fbf98cf079eee3bbbb6c6b7ca627d91
2016-09-21 16:59:24 -06:00
Ben Lin
715ded37a6 Lowercasing search query in ExternalStorageProvider#querySearchDocs. am: b56e9213ce am: 661948b8f0
am: e786712eb6

Change-Id: If3e93245d2c25c68b09a042e1b1b9a8e79a42575
2016-08-19 23:10:17 +00:00
Ben Lin
e786712eb6 Lowercasing search query in ExternalStorageProvider#querySearchDocs. am: b56e9213ce
am: 661948b8f0

Change-Id: Ia5887e196852187c0fc628beb1ba1b5353850694
2016-08-19 23:01:20 +00:00
Ben Lin
b56e9213ce Lowercasing search query in ExternalStorageProvider#querySearchDocs.
Bug: 30620314
Change-Id: I4203eda72c94fde11d3973274138ad88edb51e5f
2016-08-03 10:50:31 -07:00
Jeff Sharkey
8dd615fd07 Merge \"Merge \\"Build both filename views before deleting.\\" into nyc-mr1-dev am: fff6a11438\" into nyc-mr1-dev-plus-aosp
am: 40a4bf7dc1

Change-Id: Iabb5ffbc0ef161bb67d373fd13385e05d88b4179
2016-07-15 23:37:29 +00:00
Jeff Sharkey
ab062fc81f Merge \"Build both filename views before deleting.\" into nyc-mr1-dev
am: fff6a11438

Change-Id: Ie97bade1f8396c3c08f622f2533d42d115568e08
2016-07-15 23:16:35 +00:00
Jeff Sharkey
c50875e42e Build both filename views before deleting.
Otherwise we'll throw when trying to create the second (visible)
filename because we just deleted it.

Bug: 30087518
Change-Id: I940a8f81c264fc17d477fadf46fd48eae29f2f6f
2016-07-15 15:34:44 -06:00
Jeff Sharkey
0df84b24e1 Merge \\"Use visible paths when cleaning up MediaStore.\\" into nyc-mr1-dev am: 8ee0a67ba7
am: a637f17150

Change-Id: I0433fd57cb7da13d163eab1fde944cccec9c67bf
2016-07-08 19:21:30 +00:00
Jeff Sharkey
a637f17150 Merge \"Use visible paths when cleaning up MediaStore.\" into nyc-mr1-dev
am: 8ee0a67ba7

Change-Id: I387c13b1208ebdf05d03b4d172d538015dc3c6a5
2016-07-08 19:11:48 +00:00
Jeff Sharkey
813f9e8323 Use visible paths when cleaning up MediaStore.
The media scanner always records visible paths, so we need to use
visible paths when cleaning up deleted records.

Bug: 28581384
Change-Id: I8a2c65001216e4a96b2375579363a771de782bcc
2016-07-08 11:18:06 -06:00
Ben Lin
e7822fb767 Provider-level changes for implementing direct eject of a root in Files app.
Several changes at different levels:
1. Introduction of ejectRoot(String) for DocumentsProvider
2. Introduction of ejectRoot(ContentResolver, Uri, String) for
DocumentsContract
4. Additional permission for MOUNT_UNMOUNT for ExternalStorageProvider
5. Implementation of ejectRoot(String) for External StorageProvider

Bug: 29584653
Change-Id: I28557af63259548784cf24d5b051eb06ad5193ca
(cherry picked from commit 2ccc18357d6741dde56edc4d5a2608f15f4b9078)
2016-06-29 23:06:51 +00:00
Aga Wronska
92b77f13f1 Merge "Add config flag to show/hide internal storage. Hide internal storage by default." into nyc-dev am: 5f7d673
am: c9f5b17

* commit 'c9f5b17df45fe9ee3952c4d0e6d067fc0aa43a82':
  Add config flag to show/hide internal storage. Hide internal storage by default.
2016-03-22 17:11:42 +00:00
Aga Wronska
c9f5b17df4 Merge "Add config flag to show/hide internal storage. Hide internal storage by default." into nyc-dev
am: 5f7d673

* commit '5f7d673f3b69019288adcf11325f71aeb2b8af49':
  Add config flag to show/hide internal storage. Hide internal storage by default.
2016-03-22 17:09:10 +00:00
Aga Wronska
1719b3555d Add config flag to show/hide internal storage.
Hide internal storage by default.

Revert "Always show intern storage."

This reverts commit 7c4395804e450533afb553ab992c47f737da8a9b.

Bug: 27683276

Change-Id: I04ea8b9a307babcea003f9bec200d41265a42c7f
2016-03-21 17:33:27 -07:00
Geoff Mendal
9f74064a89 Import translations. DO NOT MERGE
Change-Id: Ib91d8ab0bfe8fea69318fd8761ea78851440afc0
Auto-generated-cl: translation import
2016-03-19 13:42:48 +05:30
Geoff Mendal
67f317e3ab Import translations. DO NOT MERGE
Change-Id: Ic896483aa7c447c570c1fd5578aacea0bf19ada3
Auto-generated-cl: translation import
2016-03-18 20:05:40 -07:00
Steve McKay
b245d109b2 Merge "Show proper icons for SD and USB attached storage." into nyc-dev am: eef85e0c02
am: f3322fccfa

* commit 'f3322fccfa21ce251055b1051788a5b411c28f26':
  Show proper icons for SD and USB attached storage.
2016-03-03 20:38:07 +00:00
Steve McKay
f3322fccfa Merge "Show proper icons for SD and USB attached storage." into nyc-dev
am: eef85e0c02

* commit 'eef85e0c02a28b610b4611071749baf48ba67e2f':
  Show proper icons for SD and USB attached storage.
2016-03-03 19:43:27 +00:00
Steve McKay
ba23e54d26 Show proper icons for SD and USB attached storage.
Use USB icon for MTP devices.

Bug: 26883880
Change-Id: I8ce85ffc915a012dca79a5de1cc7c74361776792
2016-03-03 10:58:36 -08:00
Steve McKay
aab0194119 Merge "Use device model and name for internal storage." into nyc-dev am: d53f0df7df
am: 8020fecc40

* commit '8020fecc40b7bed8cd28d45985c9d45d725cedf9':
  Use device model and name for internal storage.
2016-03-03 01:50:14 +00:00
Steve McKay
8020fecc40 Merge "Use device model and name for internal storage." into nyc-dev
am: d53f0df7df

* commit 'd53f0df7dfb1eee22f7953870ed9d24688596712':
  Use device model and name for internal storage.
2016-03-03 01:19:13 +00:00
Steve McKay
ecec7cb062 Use device model and name for internal storage.
Bug: 27157923
Change-Id: I1d723e33fa871565fbd187509ffb05f691f030ac
2016-03-02 14:57:12 -08:00
Steve McKay
24dd9ad0c0 Merge "Always show intern storage." into nyc-dev am: b4672ef6df
am: 1788dfd223

* commit '1788dfd223c7c62005b8c1e98cd25737f685a912':
  Always show intern storage.
2016-03-02 20:32:39 +00:00