summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI/src
Commit message (Collapse)AuthorAgeFilesLines
* Block directory selection in openable modes.Jeff Sharkey2015-11-061-1/+16
| | | | | | | | When picking documents to return to apps requesting CATEGORY_OPENABLE we can't let the user select directories. Bug: 25455200 Change-Id: I8076883ee5b019eab4d2adb841952865f21e413e
* Add locking when mutating RecentTasks.Jeff Sharkey2015-10-191-2/+12
| | | | | | | | Otherwise there is a really rare race condition where we try tearing down the tasks while we're still setting them up. Bug: 25078914 Change-Id: Icf89241f9abec3fadc8606cfb4fbc029bbe91515
* Hold wake-lock during copy operations.Jeff Sharkey2015-10-021-1/+11
| | | | | | | | If the CPU goes to sleep during the copy, certain devices will collapse the USB OTG power domain, which can cause user data loss. Bug: 24574575 Change-Id: I8e26caac8784490d2dee324b38e6085cd55eb8bb
* Only send EXTRA_STACK for private intent.Jeff Sharkey2015-07-151-4/+5
| | | | | | | | Since it's a private Parcelable class, we can't send it to other third-party apps, since they won't know how to unpack it. Bug: 22255387 Change-Id: Ie2ea6cf72b733bd122eb3581a5df295cec608425
* If user ejects a storage from details, take user to...Makoto Onuki2015-07-012-0/+26
| | | | | | | | | | | | | | | | | | | | ... the storage list view 1. Change to ExternalStorageProvider When available volumes have changed, it now notifies on "content://com.android.externalstorage.documents" rather than on "content://com.android.externalstorage.documents/root/", because it'll also affect "content://com.android.externalstorage.documents/document/*/children". 2. Change to DocumentUI - DirectoryLoader now won't crash when a provider returns null. - DirectoryFragment now closes itself (i.e. emulate a back press) when a load failed. - It now correctly reloads contents when a volume is ejected thanks to 1. Bug 21472170 Change-Id: Icf4bbc2ebb9067313dbbb67083cd4115b0a75c58
* Remove default activity title to prevent talkback from...Makoto Onuki2015-06-231-0/+3
| | | | | | | | | | | reading the wrong title. We get a title from DocumentProvider with an async task, and by the time we get it, it's *usually* too late and talkback end up reading the default title. Bug 20041072 Change-Id: I7686fe4ae4c157ebfc07bd8b895c4cfdf99c057a
* Merge "Remove the action bar icon when there is no drawer enabled." into mnc-devTomasz Mikolajewski2015-06-181-10/+7
|\
| * Remove the action bar icon when there is no drawer enabled.Tomasz Mikolajewski2015-06-121-10/+7
| | | | | | | | | | | | | | | | | | Keep the hamburger menu though if the drawer is visible and unlocked. TEST=Tested manually on both tablet and phone form factors. BUG=18685509 Change-Id: Ie6f8d7064da99d2dc34315ccb92ab4db6ee321b6
* | Allow to customize title of the dialog.Tomasz Mikolajewski2015-06-171-7/+12
| | | | | | | | | | | | | | | | TEST=adb shell am start -a android.intent.action.OPEN_DOCUMENT -e android.intent.extra.TITLE 'Upload!' -t "text/plain" BUG=19150996 Change-Id: Ibded6cfaa2de3698c5eada154efbee2b323464d4
* | Finish when browsed root goes away.Jeff Sharkey2015-06-161-1/+16
| | | | | | | | | | | | | | | | If we're browsing a specific root, and that root went away, typically due to formatting. Bug: 21831184 Change-Id: Ie07607a81e32a7d82c88ad382658a471d47b905d
* | Merge "Selected count string needs plurals." into mnc-devJeff Sharkey2015-06-111-4/+3
|\ \
| * | Selected count string needs plurals.Jeff Sharkey2015-06-111-4/+3
| |/ | | | | | | | | Bug: 21717427 Change-Id: Ie0db8ac30244b022ca5838969fb085230bfc4499
* | Update visibility of the stack dropdown list after the search view is collapsed.Daichi Hirono2015-06-113-7/+106
|/ | | | | | | | | | | | Previously we hid the stack dropdown list just before the action bar is collapsed. Then the dropdown list gets back to be visible when the action bar is collapsed. The CL updates visibility of the stack dropdown list just after the action bar is collapsed. BUG=20945584 Change-Id: Iaf5055bce101f8134accd311829e50f441ddc98b
* Merge "Enable apps to exclude their own roots from the DocumentsUI roots ↵Ben Kwa2015-06-104-4/+49
|\ | | | | | | list." into mnc-dev
| * Enable apps to exclude their own roots from the DocumentsUI roots list.Ben Kwa2015-06-104-4/+49
| | | | | | | | | | | | | | | | | | | | - Add DocumentsContract.EXTRA_EXCLUDE_SELF (boolean extra) - Add code to DocumentsActivity to cache the providers of the calling app if EXTRA_EXCLUDE_SELF is set on incoming Intents. - Add code to RootsCache to exclude roots from the calling app. - Add code to allow only system apps to use EXTRA_PACKAGE_NAME. Change-Id: Ia7cc2a1a297676c7b26f6e583042a4607d8c9a4e
* | Ensure that the copy notification is always cancelable.Ben Kwa2015-05-271-5/+5
|/ | | | | | | | | | If the CopyService dies or is stopped for whatever reason, the cached "current" job ID will go to null. In that case, the cancel intent will be ignored, and the copy notification can never be dismissed. Adding a null check to the handleCancel method of CopyService fixes this. BUG=21365043 Change-Id: I0615328f6033a313fec79f8b63291c7f7373ea0f
* [mnc-dev] Hide list/grid menu items for copy dest action...in mnc-dev!Steve McKay2015-05-211-1/+3
| | | | | | BUG=21259006 Change-Id: Ic31dfa1a1cffa4340769c08db3e3cb3fb46e31d5 (cherry picked from commit e04e02d027b731448d68995a202c8867c4985fa3)
* DocumentUI: Plish the design of footer bottons.Daichi Hirono2015-05-182-31/+38
| | | | | | | | | * Remove the directory name from "pick" button. * Allign buttons at right. * Fix bug that the pick button turns to be hidden after screen rotation. BUG=20285152 Change-Id: I909d52f341bf67c5627431a354a9b0ccec152a05
* Delete StandaloneActivity from M (DO NOT MERGE)Steve McKay2015-05-113-324/+14
| | | | | | | The activity is already disabled by default. Fix an issue where copy support error handling was attempting to invoke StandaloneActivity. Change-Id: If15c312a183cae1b2a84517e7f7b3123c11bd619
* Clean up error handling in CopyService.Ben Kwa2015-05-051-7/+5
| | | | Change-Id: I87b9f2c2cfddc222fbee64578b0a1349508a244f
* Cherry pick beefed-up error handling in the CopyService from master. DO NOT ↵Ben Kwa2015-05-041-10/+21
| | | | | | | | | | | | | MERGE Send copy errors to the destination provider. Big overhaul of tests to make them simpler. Test that errors during copying are detected and partial copies are cleaned up. Test that copying empty directories works properly. Change-Id: I3fe0e73bdc92c2b6f522857ca5631f6d03d5a666 (cherry picked from commit dae8c378d6c680ae9efa8e1202d9bc92fb0dfb11)
* Ensure sort menu is shown as needed.Steve McKay2015-05-043-42/+38
| | | | | | This also hoists common code for options menu setup into BaseActivity. Change-Id: Ie87b8188a6c142b2312c92dc0d0bd550f0b1e59f
* Merge "Update strings for the copy error dialog to match the latest specs."Tomasz Mikolajewski2015-04-231-2/+0
|\
| * Update strings for the copy error dialog to match the latest specs.Tomasz Mikolajewski2015-04-231-2/+0
| | | | | | | | Change-Id: I9adeff3e7e9435237b4b3337e4c687eec39b0335
* | Implement retrying copying in case of an error in DocumentsUI.Tomasz Mikolajewski2015-04-234-32/+54
|/ | | | Change-Id: I9ed1eb624aa30fb7e65d4d424ebd988dfc06d030
* DocumentsUI: Stop to override fixed size of dialog in CreateDirectoryDialog.Daichi Hirono2015-04-232-10/+5
| | | | | | | | | | | Previously CreateDirectoryDialog overrides fixed size defined in the application theme. As a result, the dialog is shown as vertically long. The CL specifies explicitly specifies the default theme for dialog when creating the dialog to stop override the application theme. BUG=20239384 Change-Id: I7227bd91705c32f5196b666bbe94ff32b5cb4af8
* Update activities to clear search term when a root that doesn't support ↵Steve McKay2015-04-223-26/+42
| | | | | | | | search is selected by the user. BUG=20495230 Change-Id: Iee2e2bd80dea6d368cad0911117e3759bdfe37d9
* Merge "Reduce code duplication between DocumentsActivity and ↵Steve McKay2015-04-228-1242/+753
|\ | | | | | | StandaloneActivity."
| * Reduce code duplication between DocumentsActivity and StandaloneActivity.Steve McKay2015-04-228-1242/+753
| | | | | | | | | | | | | | Ensure StandaloneActivity has toolbar management consistent w/ DocumentsActivity. Introduce a separate SearchManager class since there seemed to be a sufficient body of logic and state to warrant the separation. Change-Id: I87d9da40095c6de575b124005ca34a8c0b0b4b35
* | Disable copying from Recents.Ben Kwa2015-04-221-1/+2
|/ | | | | | | | | | | Recents view contains a whole bunch of content aggregated from potentially many different sources. Dealing with all these in a single copy operation can be complex, so for simplicity, copying from recents view is disabled. BUG=20487641 Change-Id: I6052e62ee0446da7741f13abfed97044e147dd7d
* DocumentsUI: Save source file list into BaseActivity.State.Daichi Hirono2015-04-202-4/+8
| | | | | | | | This is needed so that the activity does not lost the list on screen rotation. BUG=20283251 Change-Id: I8f971bab0a0ce2066fd5fea29b98b355cb948ea6
* Merge "Enable the copy feature."Jeff Sharkey2015-04-191-5/+1
|\
| * Enable the copy feature.Ben Kwa2015-04-161-5/+1
| | | | | | | | Change-Id: Ie0636895f2b2fe6550eb68042295daf76bbbd7fe
* | Merge "Fix cancellation of copy jobs."Ben Kwa2015-04-161-1/+2
|\ \
| * | Fix cancellation of copy jobs.Ben Kwa2015-04-161-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | 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
* | DocumentsUI: Hide pick button of copy destination picker for read only ↵Daichi Hirono2015-04-151-2/+3
|/ | | | | | | | directory. BUG=20238336 Change-Id: Ia2a0ef2889a2153d99c0f305deda151a04483173
* Merge "DocumentsUI: Use system cancel string resources."Daichi Hirono2015-04-151-1/+1
|\
| * DocumentsUI: Use system cancel string resources.Daichi Hirono2015-04-151-1/+1
| | | | | | | | | | | | BUG=None Change-Id: I989e28ad4729176d66b1b333f242470129d139fa
* | DocumentsUI: Move intent related constants to BaseActivity.DocumentsIntent.Daichi Hirono2015-04-153-14/+16
|/ | | | | BUG=None Change-Id: I81d367d5f8d727a5fa76bc22b2fe871ae441dbcf
* Merge "DocumentsUI: Filter out downloads root if the source documents ↵Daichi Hirono2015-04-154-0/+22
|\ | | | | | | include directory."
| * DocumentsUI: Filter out downloads root if the source documents include ↵Daichi Hirono2015-04-154-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | directory. 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
* | Merge "Add an initial version of the copy failure dialog to DocumentsUI."Tomasz Mikolajewski2015-04-153-4/+133
|\ \
| * | Add an initial version of the copy failure dialog to DocumentsUI.Tomasz Mikolajewski2015-04-153-4/+133
| |/ | | | | | | Change-Id: Ibdfde661aa5b636570c017d3d00565c193d595a3
* | DocumentsUI: Polish buttons of copy destination dialog.Daichi Hirono2015-04-152-7/+38
|/ | | | | | | | | * Add cancel button to directory picker dialog. * Turns "select" label to "copy to" label for copy destination picker. BUG=20170953 Change-Id: I66214804aed75a6fccc716d1a01163c634e73d7f
* DocumentsUI roots can have settings.Jeff Sharkey2015-04-121-1/+12
| | | | | | | | | | 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
* DocumentsUI: Add new private intent action to select copy destination.Daichi Hirono2015-04-134-15/+48
| | | | | | | | | | | | | 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
* Show copy destination when clicking on the copy notification in Documents UI.Tomasz Mikolajewski2015-04-136-56/+59
| | | | Change-Id: I3d955595bc46903c134c0633a6d32663cc2d0c05
* Browse mode for DocumentsUI, removed volume state.Jeff Sharkey2015-04-124-25/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 copying.Ben Kwa2015-04-102-51/+210
| | | | | | | | | | | | | | - 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
* Prototype the destination picking.Ben Kwa2015-04-082-32/+75
| | | | | | | | | | - 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