summaryrefslogtreecommitdiff
path: root/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
AgeCommit message (Collapse)Author
2016-07-29Delete orig DocumentsUI.Steve McKay
Bug: 29224737 Change-Id: I6d6327918adba699d2ed3652bc2dbea27f872284
2016-07-13Follow up changes from ag/1190582.Ben Lin
Change-Id: I40121fc3d36e430c402da2835027283eb4b11071 (cherry picked from commit ce83f978d5bff5505a1d5f9bec894fe5f1091a4d)
2016-07-08Docsui-level work for implementing Eject on Roots list.Ben Lin
1. Added Eject Icon for Roots that support eject 2. Added Context Menu for RootsFragment (Settings and Eject) Bug: 29584653 Change-Id: I97f582de05763e3f0327bc0d2dc6d4e2222e047c (cherry picked from commit d96661f8b0f613b40f2bdfc178bbe06022b5f76c)
2016-06-30[multi-part] Eliminate 1k selection limitGarfield, Tan
* Rename class ClipDetails. * Add FileOperation class and merge it with JobFactory. Bug: 28194201 Change-Id: I46639b21c9e424644289a1bf34b85234a9becd2b (cherry picked from commit 7f17819f1320d12f1f35a8f5327e0c7e63dfed54)
2016-06-16Implementation of Right-click context menus for docs/files.Ben Lin
Bug: 24416336 Change-Id: I675baf4abf6308bc1f6c3b4171f7251b0f3fd6e4 (cherry picked from commit be70710de3e1507292381cd14a9e1c1343ff2524)
2016-06-08Isolate Menu/Action management into dedicated manager classes.Ben Lin
We are now also returning fragmentTuner at the activity level, so that directoryFragment does not have to do a .pick() logic depending on the activity type. Rather, the logic lies within the activity itself. Bug: 24416336 Change-Id: Idb200864f6c9468b9193781f6ac505b557ffbce9 (cherry picked from commit bc330a4bf53c3a766292097d1815b9abd469a945)
2016-05-17Open root list when hovering on the edge in drawer layout.Garfield, Tan
Bug: 28345294 Change-Id: Ia569003e21aea0641ccc1d2a5e042bdc93f32bb3 (cherry picked from commit 49eda9885e81a32f8a3d7cc7b9f9f15766b2621e)
2016-04-08Don't enable new folder in downloads...Steve McKay
During copy operation. Also, relay intent extras when opening copy destination picker. Bug: 28081616 Change-Id: I3109eaf993da93239ba25db066beb5787a924196
2016-04-06Massage code to better support Files overlay.Steve McKay
Also, allow "productivity_mode" config to be enabled via intent extra as a developement aide. Bug: 28006206 Change-Id: I7be8d96a0e924f9ce8023347e051d28d69a0eec9
2016-03-22Bring the change 'Open drawer when showing copy/move destination screen'Aga Wronska
back after fixing problem with tests. Revert "Revert "Open drawer when showing copy/move destination screen"" This reverts commit 82ae18c87784b5989c1529b97214d63e5d9d3742. Fixed: 27479369 Change-Id: I70f98cf543de889a9a728d8d7233f8e7b077f871
2016-03-22Merge "Change copy/move destination to Downloads when home directory is ↵Aga Wronska
hidden." into nyc-dev
2016-03-22Change copy/move destination to Downloads when home directory is hidden.Aga Wronska
Bug: 27791217 Change-Id: If196441a57053ada9875c6cc29d4c7f13fcb57e8
2016-03-22DocsUI: Disable debug logging by default.Ben Kwa
Per the platform team, we shouldn't enable debug logging automatically in debug builds because it increases log-spam. Just disable the flag and enable it manually when needed. Add some ifs to make sure all our debug logging is properly removed. BUG=27380154 Change-Id: I8338f226c07affdb65970c7cb14f1e6aae036934
2016-03-22Revert "Open drawer when showing copy/move destination screen"Daichi Hirono
This reverts commit 4d5f9f6a7f3b9aa8f7fd1a733ba739e5bfe3ed66. The CL breaks android.appsecurity.cts.DocumentsTest. BUG: 27746116, 27479369 Change-Id: Ib9426c54e8c9841f3def55a88e07bf4a2cd7dcac
2016-03-18Change the title of DocumentsUI from "Files" to "Downloads".Daichi Hirono
BUG=27683277 Change-Id: I429cae8804b8f318f58039fc63d081c2a864fad0
2016-03-11Centralize animation related resources.Steve McKay
Fix minor bug in animation (use height not width). Change-Id: I357224086b2732fe9ad49a145db3e82259a87891
2016-03-10Open drawer when showing copy/move destination screenAga Wronska
Bug: 27479369 Change-Id: I0bc7efe88ad47885ecf35fb447cfe5c1f38a10d7
2016-02-29Update preconditions to be asserts...Steve McKay
Which are now supported by Jack. Retain a few preconditions checks that enforce contract. Disable the one assert we had...because it failed in tests. Change-Id: I2f6cb01e1af1534be4428ce4a3ee625a163dd163
2016-02-24Don't restore stack when picking copy destination.Steve McKay
Move fancy drawer "fiddling" to FilesActivity. Rename the various "Restore" tasks to better reflect their roles. Change-Id: I7f5c3dee11112bf0a31e6219d09c572c5651629d
2016-02-22Merge "Move directory and roots support to own ui bots." into nyc-devSteve McKay
2016-02-22Move directory and roots support to own ui bots.Steve McKay
Also...sorry, snowball, don't automatically open folders that are created in Files app. Only do this in DocumentsActivity. Change-Id: I271655fd3566496eced4aaa7a44d5110233150a0
2016-02-22Directory fragment refactoring.Aga Wronska
First attempt to to refactor fragments handling, state and app lifecycle. The goal was to simplify code by using android built lifecycle mechanism, eliminate bugs caused by multiple creation of the fragment, see the performance impact and give some fundament for refactoring of fragments and activities in the app. Search view manager: * Remove curentSearch from state * Restore search from saved state (ex. after rotation) * Rename file to give the better overview of its purpose Directory fragment: * Store selection state in a bundle * Remove double creation of fragment * Use loaders to reload content when possible * Keep info about state inside the object * Refactor available types of fragment to be normal and recents * Make search type a mode possibly available in all types * Remove search being invoked from refresh method * Do search by reloading fragments content instead of recreation as an example Other: * Fix window title maybe Bug: 26968405, 27101786 Change-Id: I58f36cd0a3e3a6ec98996cd8aac16e10e425e1fe
2016-02-17Don't show recents as copy/move destination.Steve McKay
Revoke "SUPPORTS_CREATE" from the Recents faux-Root. Don't allow copy to roots that don't support children. Add friendly access methods to Root info for checking flags. Only show spacer between roots sections when both non-empty. Add docs explaining the "apps" section in roots. Improve logic in the "canCopy" method. Bug: 27232639 Change-Id: If78ee0ff73f0788de863345b560aecd41b23dfb9
2016-02-17Improvements to Copy/Move flow.Steve McKay
- Always open drawer for copy/move operations. - Set title to match operation. - Update button to say "move" for move operations. - Other minor fixes. Also fix "Home" tests broken by ag/867110 Bug: 26506479 Change-Id: I3ccb4ddc72be0a21b91744bcb610c1ca490ac30c
2016-02-16Provide siblings in a sorted orders in DocumentsUI.Tomasz Mikolajewski
Bug: 27192158 Change-Id: Idefd2ba3027cd4630fcd2aefade9e6b4952e7125
2016-02-09Automatically open roots pane if default dir is empty.Steve McKay
Move drawer fiddling out of DirectoryFragment into respective FragmentTuner instance. Bug: 27084308 Change-Id: Ia13fc2be1442e1a7164c2d67ea6ce4bcfda68bcc
2016-02-05Move create folder and sort to overflow menu, cleanup back behavior.Steve McKay
Improved drawer management in reponse to back button presses: - if drawer is open (and we didn't just open it), close it. - if at top of root (and we didn't close root) open it. - there's a timeout on this behavior such that pressing back a second time within a 1.5 second perior will NOT initiate the behaviors described above. Change-Id: I5990848cd3047d9dc985ec10e57ab3a0f99ce79c
2016-02-05Fix an NPE in RestoreStackTask.Ben Kwa
BUG=27007822 Change-Id: I166dc89bfe94f2a07a1fe3769cbce763b7472ec0
2016-02-04Simplify State initialization w/ better semantics + improved Task security.Steve McKay
Also, reveal the illusion that we're restoring state in Files and Downloads. Also, define a "PairedTask" class that guards calls to task methods with checks against isDestroyed. This also let us make all of the tasks static, so we get much narrower scope and tasks can even be moved to their own files. Change-Id: I6a9e8706e1ab1d1f43301e73dd9858a115a6baaf
2016-02-03Normalize toolbar management.Steve McKay
Since it was almost all redundant (especially the stack stuff). Ensure "Files" title present on drawer title in Files app. DocumentsToolBar > DocumentsToolbar to match toolkit naming. Bug: 26193264 Change-Id: I92c82c66d936aae3ce0f792581daa12898dfadee
2016-02-02Show view mode button in action bar on Downloads.Steve McKay
A grab bag also with: Report Roots while loading (in DEBUG). Null check DirectoryFragment before calling methods on it. Bug:26936660,26143397 Change-Id: Ief2c943eb24fb14349bbd9cc4a5fbd670f57d567
2016-02-02Decouple SD card from ADVANCED storage toggle.Steve McKay
A variety of related fixes: - don't force size enable when browsing from device mounted notifications. - don't show settings menu item as action (put in overflow). - add sd card icon (not quite yet used, need to suss that out). Bug:26880985,26883578,26771127 Change-Id: I36f153c42217f8092f157ded2a756c02525593ab
2016-01-27Remember view mode by root.Steve McKay
Now stored in local prefs, not recents DB. Don't consult preferences for recents from DocumentsActivity. Bug: 22671255 26689962 26411301 Change-Id: I492d85c450253bce984c929a6dd15d7c31ee6a0b
2016-01-19Refactor SearchManager:Aga Wronska
- Move SearchManager out of BaseActivity. - Refactor usage of onCurrentDirectoryChanged(int anim). - Cancel search when directory changes. - Enable testing for cancelling search when directory changes. - Avoid recreating action bar when only the content of the directory is changed. BUG=26495573 Change-Id: I1400090fcb529ad3905018d1640fdb7416542989
2016-01-08Fix bug where both list and grid buttons are visible.Steve McKay
Bug: 26456290 Change-Id: I41d97d7ce33a193b6a9591609deadf9690b00ba7
2016-01-07CopyService generalization.Steve McKay
Make the service operation agnostic, so we can also move delete operations to it. In a followup change we'll see about adding support for multiple concurrent operations. We'll need to evaluate how to do this in IntentService (which serializes requests....a major limitation). Change-Id: I03eca9c1ecaba519af42d88edffeb0dce78bd1da
2015-12-17Merge "Eliminate dialog mode from DocumentsUI."Steve McKay
2015-12-17Eliminate dialog mode from DocumentsUI.Steve McKay
DocumentsActivity to Use standard drawer layout at all display resolutions. Bug: 26208032 Change-Id: I3b93c81bf97045744074a299e92cdea4aae7628d
2015-12-16Re-enable sorting in the DirectoryFragment.Ben Kwa
- Move sorting from the back-end (using SortingCursorWrapper) to the the front-end (in DocumentsAdapter). This makes it such that re-sorting the directory contents doesn't necessitate a reload. - Update DirectoryLoaders to just return unsorted results, and rely on the UI to sort them. - Remove the (now-unused) SortingCursorWrapper. - Update Model tests to test sorting. BUG=26024369 Change-Id: I871cc0e496267d381ae546e0309125d04649415a
2015-12-07Wire support for archives to DocumentsUI.Tomasz Mikolajewski
Bug: 20176812 Change-Id: I8220afa2f53b07aa842bf6ac24fcc62afd4e2617
2015-11-20Add first-class support for virtual files in SAF.Tomasz Mikolajewski
Bug: 20820363 Change-Id: Ic509a6003a99997126f129a836fdd8c0e843108f
2015-11-18Open the destination dir when a copy notification is tapped.Ben Kwa
- Cleanup: rename the "open copy destination" action to "pick copy destination", which better reflects what it does. - Move DocumentsIntent from BaseActivity to Shared. - Rename ACTION_BROWSE_DOCUMENT_ROOT to ACTION_BROWSE for general browsing. - Use the new ACTION_BROWSE to open the copy destination when copy notifications are tapped. BUG=23137963 Change-Id: I10480b45a16ce716febac5453cb5015d26bb0062
2015-11-05Remove TRANSFER_MODE_NONE from CopyManager.Tomasz Mikolajewski
This field is not necessary, as an operation is always either copy or move. Change-Id: Ide68bb2bf5d237ed4c9abe8c443edd8e12dd82dd
2015-11-04Move DirectoryFragment and family to dirlist pkg.Steve McKay
Stuff was getting out of control in the main package. Change-Id: Ia06ba96f5bbe13388d51e6ad52a9dac76af97cc0
2015-10-29Update DocumentUI styles to match mocks.Ben Kwa
BUG=24870921 Change-Id: Ic91c9fbbe8c577c2276a4afc79753ba702c53733
2015-10-15Performe save when ENTER is pressed.Steve McKay
Push save enabling logic into SaveFragment, let it figure it out. Don't assume DirectoryFragment is present in BaseActivity. Permit DirectoryFragment#get to return null when not present. Bug: 24305559 Bug: 24955068 Change-Id: Ib50d674b16ba48dcefb6e5b73055120c3e7c6dba
2015-10-02Normalize and improve menu fiddling.Steve McKay
Also, don't show copy/paste menu items (though they can still be invoked via keyboard). Show copy to /move to instead. Change-Id: I6e7bdf35bf370ea30d4f12a5a200ad38ff0221f4
2015-10-01Merge "Provide previous stack when opening new window."Steve McKay
2015-09-30Switch DocumentsUI over from Toasts to Snackbars.Ben Kwa
Add a new top-level CoordinatorLayout to ensure proper operation of the snackbar. Switch all Toast code over to use Snackbar. BUG=24474629 Change-Id: Iafffb35be6115cbac9304fd44e77e73b6be40c17
2015-09-29Provide previous stack when opening new window.Steve McKay
EXTRA_STACK support was already in place (from CopyService). Add "isRootUri" to DocumentsContract. Bug: 24410611 Change-Id: Ia380030216323d1272ef247280582e4b55b83c42