- Add a unit test for CopyService.
- Make some changes to StubProvider to make it more configurable, for
testing.
Change-Id: I3d726099feaf6b7a3fdd40bf2449f4ee3e848d77
Add FLAG_CANCEL_CURRENT to the pending intent for cancellation, to
prevent reuse of previously created cancellation intents. Previously
created intents have non-matching job IDs, which causes the cancellation
intent to be ignored.
BUG=20221969
Change-Id: Ie0afcc6af53a550b44bc4b2f3d48942cdb092a65
This is the short term solution for the downloads root, which does not support
directory creation. For the long term solution, we need to add a flag to Root
model to check if the root support directory creation or not.
BUG=20186663
Change-Id: I15c4795892f38e3f968776f732a6f2160ae775fc
Roots use a flag to indicate they have settings, and DocumentsUI
offers to launch towards someone who handles a new Settings intent.
Slight rename of browse intent for clarity.
Bug: 19993667
Change-Id: I86302ec1cfac5e435d8bc5701bdb85fb9b0dcbae
The CL adds INTENT_ACTION_OPEN_COPY_DESTINATION, and implements the behavior to
respond the intent action.
The directory picker:
* filter out read only roots
* return document URI instead of document tree URI
for the intent action.
BUG=b:20146034
Change-Id: I96c565100c3cdaa57cc7abd8cf6d895d148941a7
The existing management mode is too specific, and requires that
storage backends add queryChildDocumentsForManage(), etc. Instead,
to offer more natural browsing support, add a new BROWSE_ROOT intent.
It behaves mostly like MANAGE_ROOT, except that it doesn't mutate
its Uris with setManageMode(), and it shortcuts straight to VIEW on
clicked documents.
It can be launched like this:
$ adb shell am start -a android.provider.action.BROWSE_ROOT
-d content://com.android.externalstorage.documents/root/8405-1DFB
-c android.intent.category.DEFAULT
Also rename a MetricsConstants to make it clearer, and don't
auto-mount all emulated volumes.
Fix bugs around parceling of DiskInfo/VolumeInfo. Method to resolve
the best description for a VolumeInfo, which might need to fall
back to DiskInfo.
Add back "removed" volume state so we send broadcast when a volume
is destroyed, matching the expected public API behavior.
Bug: 19993667
Change-Id: I13aff32c5e11dfc63da44aee9e93a27f4690a43f
- Enable directory picking for copying.
- Implement recursive copying inside the CopyService.
- Pretty up the notification (use an indeterminate notification while
calculating copy size)
- Do two recursive walks: one to determine the size of the copy job,
and then another to actually copy the files.
- Switch to using ContentProviderClient instances, for better error
detection and handling
- Disable copying from the Recents view.
Change-Id: Ieb38cca80edf84a487547b68f0d6b328fc4d7701
- Add an intent to open a destination picker, and refactor
DocumentsActivity accordingly.
- Modify CopyService to take a destination for the copy, and to use URIs
and PFDs instead of Files and Streams, for better error handling &
cleanup.
Change-Id: I69dc43823a703674dc29d2215e2df23b33ad7882