History log of /packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0ce04b7a3f2c76452f855d082cd57d5e4cab9d69 05-Jun-2017 Steve McKay <smckay@google.com> Support for dynamic shortcuts.

Bug: 32875404
Test: Build and test.
Change-Id: Iab9558532eab1cf15e094de7294b3b169b731be5
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
f7746f6453436901e650ce424923730fd3cb2bb4 30-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove activity leak." into arc-apps
1071cea62d42a0ca1500a58c597ae6985a07748d 27-May-2017 Garfield Tan <xutan@google.com> Remove activity leak.

mState can be used across activities on configuration changes. This is
because even though we put it into Bundle, the bundle never leaves the
process so when we take State object, it's still the old one.

Test: No more activity leak after fixing. Auto tests pass.
Bug: 62147171
Change-Id: Ie805a85a56dc5b009dd0903e094fc5b8976f6b75
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
5f2a9babb845129fd9595f6265cda84b30c795c5 26-May-2017 Garfield Tan <xutan@google.com> Apply correct restoring logic.

We need to continue on the work left from last time, rather than blindly
believe everything is restored by Android.

Test: Manual test & auto test.
Bug: 38321082
Change-Id: Ic9f80ab16a203a1526c7d23d86512b841c750366
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
1d1a16333d447c24c0bfe3c457d1ca9493ad2186 25-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow debug mode to be enabled on touch devices." into arc-apps
a8bf2c0832e5a7a0bdd1ebf9b70b004964f62c96 24-May-2017 Ben Lin <linben@google.com> Honoring root's view mode when opening new window.

We previously used to honor the view mode configuration when we
change/select the root. However, opening in new window goes through a
different code path, and skips the openRoot code. This fixes it by
always loading the root's view mode at every directory opening.

Bug: 38230161
Change-Id: I551bc7000abe555f95364eaaeac43df578c5bf1b
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
1d49d9c29aaa9bfadb3606890c35e2f790865c9b 24-May-2017 Steve McKay <smckay@google.com> Allow debug mode to be enabled on touch devices.

Test: Run.
Change-Id: Ia686ff9c00f080fa592a6ab3f6179ebd54a0d145
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
800300826ebb50f5a26393bc966c27fa26e9a16f 02-May-2017 Ben Lin <linben@google.com> Proper refresh when Authentication finishes with Activity.RESULT_OK.

Test: Updated DemoProvider, tested manually and added new unit tests.
Bug: 37876119
Change-Id: I0a8f08ff06e536bf83fb4fcf5e91d765dfe5ccbb
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
534e78c2f0a1a5e937f576451ddc82f25d59438a 27-Apr-2017 Ben Lin <linben@google.com> Merge "Clear separation of RootList Context Menu items and DirList items." into arc-apps
ff7f3aeec1b4fc7e0b8ddb0e8b6b6e105140f68e 26-Apr-2017 Ben Lin <linben@google.com> Clear separation of RootList Context Menu items and DirList items.

Change-Id: I7f83b21a499de67f628b1fe0cf1582fe70f86c4d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
766cf14d0f5ebeaa7e8d571e733222adb6fa32bf 26-Apr-2017 Garfield Tan <xutan@google.com> Kill action mode before changing root.

Test: Manual tests & auto tests.
Bug: 37531513
Change-Id: I9c067f4c12530146715cd27b1c526b502357e537
(cherry picked from commit 80b52b3c7a16ccf0b57f78b09858afaf3f686559)
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
da2c0f0b075ad9f770182e706c2ec158989568a7 11-Apr-2017 Garfield Tan <xutan@google.com> Allow user control move/copy during drag and drop.

* Refactor some shared drag and drop logic into one single place.
* Add a workaround for updating badges across windows.
* Add unit tests for DragAndDropManager

Bug: 29581353
Change-Id: I2fcf950194457501e35e1bbc2e00ab68d7962666
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
eb1d11b5d85c40ce845625aea1ecbf7e265d75f9 02-Apr-2017 Jon Mann <jonmann@google.com> Added some debugging tools.

Test: verified
Change-Id: Ie043c5ff8209c9aa78480d16a4c710377a0c1bbb
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
9bd4099ee27f8302a06fc66980079f29127318f8 24-Mar-2017 Jon Mann <jonmann@google.com> Refactor RootsCache+RootsAccess to ProvdersCache+ProvdersAccess

Test: verified success
Bug: 34219584
Change-Id: I16d5e7d70240626efc9020bd11b13c778fc2d95e
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
c8a3f1ee5a6481b9a931914b1ac860ad02853167 16-Mar-2017 Ben Lin <linben@google.com> Merge "Moving back button behavior to SharedInputHandler, and now handling ESC keys." into arc-apps
0902f07dec9cfb0bd5d7c9c6222b433b91bf2051 14-Mar-2017 Ben Lin <linben@google.com> Moving back button behavior to SharedInputHandler, and now handling ESC keys.

Bug: 35674183
Change-Id: Ia6a5eb78f89ed1346aec81455dd6a721861bc6fa
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d2fc4cdeb3c9a8e7b49a8dd6985e7bb7aaaa0f20 15-Mar-2017 Garfield Tan <xutan@google.com> Fix a DocsUI crash...

when user toggles multiwindow mode with an empty search widget. Also a
bit cleaning around Toolbar.

Bug: 34881838
Change-Id: Ib093ed5bf5e9f9a95d815119620ecddd84d428f7
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
b09f60124e75336b77910c8f18d865f91f8345da 15-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a confirmation dialog before overwriting a file in picker." into arc-apps
23ac60cd2b1beb59b6cd760b91c7e1b1f7e8fe49 14-Mar-2017 Garfield Tan <xutan@google.com> Add a confirmation dialog before overwriting a file in picker.

And some related refactoring in picker.

Test: Manually tested and auto tests pass.
Bug: 34339143
Change-Id: I0e87a20819756858f4c4eab70e9191cb525f84d9
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
a05773a8959eb8da526caa43fe032d5fac493b14 22-Feb-2017 Colin Cross <ccross@android.com> Work around javac method reference bug

Reapply Id68f48d3896fc239a8e77ffad209547184a8290e which was accidentally
reverted by I227753ff1a1734ef4d8ea58fc999cc1410bcbbeb.

Test: m -j ANDROID_FORCE_JACK_ENABLED=disabled
Change-Id: I30bb213478dd120f1cfb54fe4cbb1866ee732d8d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
08a92ee6d8e0d889d2ef6a6210dd0e2922e02151 11-Mar-2017 Ben Lin <linben@google.com> Merge "Fix a bug where dropping on Root never works." into arc-apps
30b0dc1896abc67a970b61ebfd420275a31c1e18 08-Mar-2017 Ben Lin <linben@google.com> Fix a bug where dropping on Root never works.

DragEvent gets recycled, so by passing a DragEvent reference directly to
ActionHandler#dropOn, by the time the callback occurs, DragEvent is
updated to ACTION_DRAG_ENDED. ACTION_DRAG_ENDED events have no ClipData
and no localState, so the file operation never will occur.

Also added tests that involved ... refactoring lots of things.

Change-Id: I87daf1a4ec4e536701e03fd6dc53fc55829e5e51
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
aad7883a1fae05d0951f8c09ecbef3616e8c1be4 09-Mar-2017 Steve McKay <smckay@google.com> Features tweaks:

Make gesture_scaling into a feature.
Make command_processor into a feature.
Alphabetize features.
Rename DebugCommandProcessor to CommandInterceptor.
For now, let static code force-enable a feature.

Bug: 35923154
Test: Build and try.
Change-Id: I48fd3294c3ef744f945f1541cc599d37c7b4a6a3
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
6737577c70cb873fde70a53f25be6e15b630c037 07-Mar-2017 Steve McKay <smckay@google.com> Treat device storage as a single preference.

Make all running instances recognize changes to pref and update
ui live...eliminates stale UI for this pref.
Also (of not to suche@) we're now starting and stopping the
monitor in the onCreate and onDestroy methods. Can
you advise if there was a reason we were previously
doing so in pause and resume?
Update TestPredicate to have a waitForCall method (backed by a Future).

Bug: 35993931
Test: Build and test.
Change-Id: I59437f163e5cf928bb8131374c098a6579f9eb81
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e967033315ed64bca8c89d601d187fd12754f1fb 07-Mar-2017 Garfield Tan <xutan@google.com> Lift loader to activity level.

Also fix a bug that leaves DocumentsUI in a weird state if it fails to
obtain root document.

Change-Id: Ibb67bfd0114f45f41c0000078ca56767b5a4542b
Tests: Manual tests and auto tests.
Bug: 35934082
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
78ade2b9111c69a3cb169024646577f38136bbf7 28-Feb-2017 Garfield Tan <xutan@google.com> Consolidate the initializaion of acceptMimes.

Not restrict mime type in FilesActivity.

Credits to Sony folks who reported the original issue.

Test: Manual and auto tests.
Bug: 35415722
Change-Id: Ib506cde439e0e90bee7ac427f8cc9db263f73e61
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
954c5e0d7812bb58be03ae289ad490f48660924e 28-Feb-2017 Jon Mann <jonmann@google.com> Merge "Start to move access to model in to Injector and ActionHandlers, refactor select all and file rename." into arc-apps
30d8c7988e15336d995e4b5033ba533a8333446f 22-Feb-2017 Jon Mann <jonmann@google.com> Start to move access to model in to Injector and ActionHandlers, refactor select all and file rename.

Test: verified existing tests still work
Bug: 35406563
Change-Id: Ie0a6b7fd17a357cd9cce4338c123ca2e5795af22
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d04aec78e15dd36b3aab835c401ae6f2153be0d1 25-Feb-2017 Ben Lin <linben@google.com> Allowing ability to create directory in Downloads.

Test: Smoked test.
Bug: 35157759
Change-Id: I27248f2f7bfaa0be6e5e6bf39da18b71d66ee9e7
(cherry picked from commit 8791cc4236d949fafa5e457da5981970c894cc2a)
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
b52eb8b5908af540a422a93630a3d1c193d910cc 14-Feb-2017 Jon Mann <jonmann@google.com> Merge "Add 'Select All' option to menu." into arc-apps
9e047855cfd82fbac8ef07a93be27ab55cd8b4e8 13-Feb-2017 Tomasz Mikolajewski <mtomasz@google.com> Disable searching in archives.

It doesn't work anyway.

Test: Confirmed manually that the search icon is not shown.
Bug: 35053993
Change-Id: I53a3ed8784d7bf9662c2b1a4fe2d0c3240cf263b
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
49be24c91d71d8f6fe6cb8eb6837b46468abffb5 14-Feb-2017 Jon Mann <jonmann@google.com> Add 'Select All' option to menu.

Test: component was already unit tested
Bug: 33000104
Change-Id: Ic5b29633b0a391407f29e4d35a0de236d2f2c567
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
7b6831b2bf21c433882c98048b229a9d9ee4a64f 22-Dec-2016 Chen Su <suche@google.com> Preferences backup & restore.

Bug: 33234117
Test: Unit Tests (PrefsBackupHelperTest)
Change-Id: If5509e21d116f258875b43b6a6576715a92d4a67
(cherry picked from commit 246136808cf63e9b5459a72dbf5243ed1da245b5)
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
40c85052e1ae43fdcbda0fe7ecfe8c3316bec2bf 02-Feb-2017 Garfield Tan <xutan@google.com> Remove State#restored.

The stack itself is the best indicator of if it has been initialized or
not. With a small refactor we can encapsulate the stack modification in
initialization phase to ActionHandlers only.

Hopefully it won't cause other issues in other corner cases.

Credits to Sony Mobile devs on their bug report.

Bug: 34593795
Change-Id: I4c8e5f9816ede8bb335151626c2aedd2bed521cc
(cherry picked from commit 23618f30215a4bfecaa10795e2ba413702c12bbf)
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
3b7a99d4fc971917bcb28295c841fb7453eacaf0 28-Jan-2017 Ben Lin <linben@google.com> Proper shutdown of ActionMode when selecting roots.

When going to other roots, we refresh the whole directory, which will
also refresh ActionMode. The assertion will fail if there was a previous
selection, and if we didn't do proper shut down beforehand.

Bug: 34771762
Bug: 34712136

Test: New FilesActivityUiTest#testNavigate_whileHasSelection
Change-Id: I3cfe094ccaa5d4f343f91e469791e7d1ebfe792f
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d8d0ad2bb6b52095b77c537bdd4b79e642361b94 11-Jan-2017 Ben Lin <linben@google.com> Proper ActionMode clean up when spring opening directories.

Since ActionMode has an assert that it should be null when being reset,
there was a crash for the case of spring opening directories due to
actionMode.finish() not properly called before opening the directory.
This now ensures actionMode.finish() is called beforehand.

Test: Wrote ActionHandlerTest#testSpringOpenDirectory.

Bug: 32749167
Change-Id: Ifa39e9fcf02f4f848ea5cf4f26b01280d32a47c0
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e8b547f1a7acdd10fd1e2f5816cebae49ecfd90b 19-Dec-2016 Steve McKay <smckay@google.com> Move preferences related code to sub-package.

Change-Id: Idbdcaca4577def4d4a1e44dfb8894adde44a6cbc
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
6a0a5688a3c250f18c895ab80af5e6093e7d38d1 30-Nov-2016 Steve McKay <smckay@google.com> Don't cache empty roots lists (usually).

Add support for logging cache via "dbg:dumpCache".
Bug: 33021109

Change-Id: I252698a5c9295f7792d92249a084cbfa4d20bb7f
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
92ae43d5d22331aad83e1a4302a7e1975f66354e 08-Nov-2016 Steve McKay <smckay@google.com> Move Injector impl into separate class.

Change-Id: I070114479755571e93b9256e0cbf35780b962033
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
047182631669608af946480c2545a10acb2ef1bf 08-Nov-2016 Steve McKay <smckay@google.com> Shared input handling and injection.

Change-Id: I41ae072e55ecc60b708274b5c67bed3a486bf080
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
75b7b9039cf0efcb188e916c6f510328bfe099a8 02-Nov-2016 Ben Lin <linben@google.com> Let focused item also act as a starting anchor for range selection.

Bug: 31991343
Change-Id: Id59cc99a61550cd4a13feb508f13889a8598a3c9
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
0f17d09dcd4e8e40eb28cd4e549e42e45019ef98 22-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Using Activity#setTitle to have TalkBack announce root traversal." into nyc-andromeda-dev
37408d06cf31cde66312e677a14ba5520a0d1b2c 21-Oct-2016 Ben Lin <linben@google.com> Using Activity#setTitle to have TalkBack announce root traversal.

Bug: 32260739
Bug: 28275570
Change-Id: Ib726183e0884451bfcfcc68060c409aae7e766c1
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
20b84e01f3014c19feb9656405c9eb85fd7d8341 22-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Followups to ag/1553792/" into nyc-andromeda-dev
01996bc21961b64ef355325a9ad5c6445c734521 21-Oct-2016 Steve McKay <smckay@google.com> Followups to ag/1553792/

Change-Id: I82f740df648f7fc3657c58fda972d3fdadc01622
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
3f0d09fb853bb15cca6b2db72bf62acbaee5d030 21-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add Cut/Copy/Delete operation to currently focused item." into nyc-andromeda-dev
d947f0192142c7db40d7dfaa8d0c6caaa1cf7c36 18-Oct-2016 Ben Lin <linben@google.com> Add Cut/Copy/Delete operation to currently focused item.

Also removed ability to focus on items in the directory list while
there's an on-going selection to avoid having a weird state of both
focus and selection. Shift extension still works, just that once user
puts focus on RootsFragment, they won't be able to focus back into
DirectoryFragment.

Bug: 32141890
Change-Id: I14c06f8616b63d04f0b5f489032f7006f91416a8
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
5dce2b88bdd494c489826840371974b457cc397f 21-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add gesture scaling support for grid mode." into nyc-andromeda-dev
b03a59c43e526b0814b2c8e700257d34a0aef226 20-Oct-2016 Steve McKay <smckay@google.com> Add gesture scaling support for grid mode.

Add DebugFlag class as main holder of runtime debug settings.
Put Gesture scaling behind debug flag.
Change debug command prefix to "debug:".

Change-Id: I671f1b7957a3786fe69d4d805d60a4ee937c6f39
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
89e0e343c2d00d7862f1b891fbbe63e6adc5d445 20-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Address comments in ag/1514806." into nyc-andromeda-dev
2a837422d25b44f2847bc82e7c90b4e8fcde1518 19-Oct-2016 Garfield Tan <xutan@google.com> Address comments in ag/1514806.

* Isolate LinkedList and stack/root manipulation in DocumentStack
* Consolidate ProviderAccess into DocumentAccess
* Pass Uri as the the param to LoadDocStackTask
* Tidy up initLocation() in picker.Actionhandler
* Add a test case for initLocation with data in picking intents

Bug: 32156176
Change-Id: I3ca07342fc594e47fc003df146dcf982f152f56d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
3a2682362481d1af4ec437775610a1f11e9faa24 19-Oct-2016 Steve McKay <smckay@google.com> Add DEBUG build support for runtime flags/commands...

Using the search view as input mechanism.
When a command intercepts search input, we immediately cancel search mode.

Change-Id: Ida43ee2a49d504c9f0a0040e67224aa26b5b9964
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
6525a19f46eca7fbec21a71f833436823de03da3 18-Oct-2016 Steve McKay <smckay@google.com> Make device storage option controlled by option.

Was always visible in productivity mode.
Simplify logic for fiddling display of menu item.
Introduce ScopedPreferences object to simplify saving prefs by activity.

Change-Id: I9f900583f6e6265e95b008a9877d68edacfa4e56
Bug: 32242016
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
b22a0d2d901675205aa40a031f900866e6b653b9 19-Oct-2016 Ben Lin <linben@google.com> Merge "Updating DropShadow as drag and drop hovers over views." into nyc-andromeda-dev
1686883a8d049b399e34954a4feaa98490277ae8 26-Sep-2016 Garfield Tan <xutan@google.com> Features around findPath API.

* Add folders into search result
* Allow callers passing data to launch pickers at specfic location
* Rewire loadDocument() to LoadDocStackTask
* Remove VIEW intent for FilesActivity and related OpenUriForViewTask
* Add a ProviderAccess to enable testing in LoadDocStackTask
* Fix a wrong assertion in files/ActionHandlerTest

Change-Id: Iacc2b99dc68cbb4a40a4c445c69473973123c5bf
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
1c45629929c31cf7903cf955a48f170a8cdee255 08-Oct-2016 Ben Lin <linben@google.com> Updating DropShadow as drag and drop hovers over views.

Also moved DragShadowBuilder to Activity level (needs constant reference
to it).

Bug: 31182423
Change-Id: Id3a09cff863d529f92e15e23c6cf53a2ca9da20d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
63bf8135243605949a3bb140167ef91f5c6ae2ae 11-Oct-2016 Garfield Tan <xutan@google.com> Move openContainerDocument() into ActionHandlers.

Change-Id: I48fb6e38993d2aff80b9d218d001c92ba2235e78
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
bd9f05aa36bf19d8b34d0d73a59e9bd65d3d26eb 10-Oct-2016 Steve McKay <smckay@google.com> Move full delete logic into ActionHandler.

Was spread across DirectoryFragment and UserInputHandlers.
Drop "android" test package in favor of the generic "testing".
Add an interface for ActionModeController (ActionModeAddons), so can be tested.
Moved ActionModeHandler out of dirlist ../up d dir.

Change-Id: Id915519656f163d3c413fe5d440d866c3ce4e2ca
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
5b0a2c187a9e446b683687817d22cbe443585223 07-Oct-2016 Steve McKay <smckay@google.com> Inject SelectionManager instead of passing on reset.

Move more delete functionality into ActionHandler.
Make ActionModeController Activity scoped.
Name most "Config" objects (relating to scope) to ContentScope.
Clear focus info when resetting FocusManager.

Bug: 31658228

Change-Id: I6dbdb07ded83c75b82aec5773a60ef0febb6f02c
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
4f78ba643270b9d84da1952d8e408220b25ec6fd 05-Oct-2016 Steve McKay <smckay@google.com> Move selection to selection pkg, make activity scoped.

Move all other selection related classes to selection pkg.

Change-Id: I57a3964fada55b0f4d073f05a7833455235221b9
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
208945c4e262868d3ebe0f55f1b895cd5a201cbb 04-Oct-2016 Garfield Tan <xutan@google.com> Refactor FragmentTuner to ActivityConfig.

* Move model listener that opens drawer to ActionHandler.
* Move showChooserForDoc() to ActionHandler.
* Statically initialize ActionHandler.
* Isolate OnDragListener to FilesActivity only.

Bug: 28315278
Change-Id: I760c8411922fca827fd08c115bd2590ab671c380
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
44667b85158249910428cbf232c5c1535bb842ac 04-Oct-2016 Steve McKay <smckay@google.com> Merge "Move document-opening logic into ActionHandlers." into nyc-andromeda-dev
e58f649de34d909594cb44482a6184711934fabe 04-Oct-2016 Steve McKay <smckay@google.com> Merge "Test location init with doc URI." into nyc-andromeda-dev
eed2f4ec78227b5e173ff667a5517637a91b9a30 04-Oct-2016 Steve McKay <smckay@google.com> Move document-opening logic into ActionHandlers.

Add tests for:
viewing
previewing
managing (apks and partial files)
opening containers
showing chooser

Fix issue where partial files weren't being managed correctly.

Change-Id: I1d62bcd0fd5262d6354f0ddc2327d3f0d22c1f3b
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
def4868b1e9ef8a5718c6bc2e165026cbe52b5da 03-Oct-2016 Steve McKay <smckay@google.com> Test location init with doc URI.

Make a more complete test environment.
Move GetRootDocumentTask to roots package.

Change-Id: Icb8f4c42c38c17aa97ec428ef9d46d76d2286fa7
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
fe199cb1ae0a443c65111ee80daa05b9fafc48a6 03-Oct-2016 Garfield Tan <xutan@google.com> Enable sorting in search result.

Also remove unused API in sort model.

Change-Id: I62a43dd576efc458a3444270fdebaa94d69e87f4
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
2010ff7828f2d68de0be24c975f5c48ec3151f96 30-Sep-2016 Garfield Tan <xutan@google.com> Move sorting back to loading thread.

Bug: 31062455
Change-Id: If248f7556d8d70b626546cecabf3377e531fd5b2
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
a86732316c8fe1694f4c1702cdd6c8e0faff4e18 29-Sep-2016 Ben Lin <linben@google.com> Integrating Android Keyboard Helper to surface commands to users.

Bug: 27527210
Change-Id: I97e6e42fe54e4195875581dcc04188f5552efd22
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
988d8a354b00dce7e24deee187c08a4591956ac9 27-Sep-2016 Steve McKay <smckay@google.com> Move launch logic into ActionHandlers.

Add test.
Add RootsAccess interface to RootsCache (to faciliate testing).
Create a new TestEnv class that:
* bootstaps basic data and dependencies
* installs test executor so async tasks can be executed predictably.
* instruments main thread to ensure AsyncTasks return results
before we continue to make asserts.
Add new Lookup interface to provide improved semantics over j.u.f.Function.
Inject access to Provider specific Executors by way of Lookup.

Change-Id: I0fc71897a4cc40d26c5fa3ae3bb88bad7dbdcf5c
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
c8889af6757ecb348fb8fd6dadf84d67d3478cbf 23-Sep-2016 Steve McKay <smckay@google.com> Move delete support into base ActionHandler.

Introduce an "Addons" interface that describes all of the
extra stuff we expose in our concrete Activities allowing
us to write test doubles for our Activities.
Add new "ui" package for UI specific stuff like:
Introduce DialogController, isolating dialog business in
a separate class (that can be easily replaced with a double)
Move delete confirmation and snackbar-error reporting
into this class.
Introduce a Messages class for building messages, but isolated
from implementation details.
Add test for delete logic in ActionHandler (now that the
code is unit-testable.)
Introduce new ClipStore interface to improve testability
of code that depends on clip storage...but in this
CL we don't yet cover any of that.

Decouple all ActionHandler impls from their
Change-Id: Ic1449e501c855cdb72bf7666f4b67b9a9e9c1b49
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
739f94ba0dc9be264d9596dac551fd63082d2fdd 22-Sep-2016 Steve McKay <smckay@google.com> ActionHandler stage 2.

Extract interface, dropping any Activity typed param.
Introduce AbstractActionHandler, depends *only* on concrete Activity.
Make only subclasses know about ManageActivity and PickActivity.
Distribute functionality accordingly.
Pull openInNewWindow into ActivityHandler...
update different cases to all send a stac....
and update launching code to handle a stack with just a root.
Add an almost pointless test for openInNewWindow (but the test harness is in place).

Change-Id: I729ee0c06d3de0c05c0bea118533dd1c1f274783
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e1f8c8826d9bc990d46bd49471f9dd9d688fcc50 22-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move open,view,preview support into ActionHandler." into nyc-andromeda-dev
6d20d190bc576bea1da48f79d868a5f383d3458b 22-Sep-2016 Steve McKay <smckay@google.com> Move open,view,preview support into ActionHandler.

....out of FragmentTuner.

Change-Id: If5565cd4b3c034ea247f0c168a4c0bde2703ed27
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
52eb50fba4aab01a1de99321c59c0ac7851c2841 22-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove onBeforePop() logic so back no longer opens/closes drawer." into nyc-andromeda-dev
ec2433695a7b36cf0c3ad15431c14ed730f5b76f 22-Sep-2016 Ben Lin <linben@google.com> Remove onBeforePop() logic so back no longer opens/closes drawer.

Bug: 30814333
Change-Id: Ia03896eb3fb41981ed25fedcdf859400b4f5b7e8
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
21c5444613d7df6e540017d081b860962e8fe0c5 21-Sep-2016 Ben Lin <linben@google.com> Calls NavManager.update() when we starts/closes search.

NavManager.update() automatically handles the case in which if search
bar is expanded, title is null'd out.

Piggy-backing SearchManagerListener and added additional interface to
make sure #update gets called, along with sortmodel update.

Bug: 30372436
Change-Id: I9a5ae1601648d7c0680dfaff181bf3c8156e3114
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
7d75f7bbd1693a33abb8de6b472ec1950e33eb8b 21-Sep-2016 Garfield Tan <xutan@google.com> Refactor RootsFragment to use the same pattern of injection.

Also pull out RootsAdapter and Items from RootsFragment.

Change-Id: I2d81630333a1f7d0fc9bc7e0137ba922ee5a6bbb
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
17b761eb2f837d3ac079c07fc33877d6049c3cba 21-Sep-2016 Steve McKay <smckay@google.com> Add support for quick viewing files with spacebar.

Make FocusManager an activity owned object.
Include WRITE permission when building quick view intent.
Only send APKs to Downloads managed flow....
Don't do anything w/ partial files.

Change-Id: I03f2d61f852cf11fd928fc592e47aca933eb72d2
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e5d6ca2c7a32c826607d826bdc18f90ca8e8b7da 20-Sep-2016 Steve McKay <smckay@google.com> Inject DirectoryDetails into MenuManager Const.

Rather than passing to *every* method.

Change-Id: I5890891fa8c98b7db542775655b67c270e699886
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
990f76ea83a249cd8fc3c797e40626b94cd7945c 16-Sep-2016 Steve McKay <smckay@google.com> Lifetime of FragmentTuners scoped to activity.

Add support for resetting with new state from directory fragment.
Update Model to use an EventListener.
Eliminate documentPick handling from base activity and directory fragment...
Plum document picking directly from UserInputHandler to FragmentTuner instances.
Add new EventHandler internface (returns void, more semantic meaning that Consumer<T>).
Replace ModelUpdateListener interface with EventHandler.
Make DocumentAdapters return EventHandler<Model.Update> instead of
implementing ModelUpdateListener.
Move Activity specific FragmentTuner impls along side respective activities.

Change-Id: Ia6a5ab00ede685f7418773ed865d8c51e4125330
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d9caa6ab53aa784acaf241c0ded3c4ae2d342bf8 16-Sep-2016 Steve McKay <smckay@google.com> Move State to base and root stuff to roots.

And move Shared to base.
And lots more to base.

Change-Id: I8b01264a329473c13c59f0cd25a320ba73dbd82d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d080506e3aa8547605cd4783eb660775d7d2b8ee 15-Sep-2016 Steve McKay <smckay@google.com> Move more classes to more specific locations.

Moved .model classes to .base.
Deleted some unused classes.
Moved functional tests into a new .funcitonal package.
Followup to 1450250.

Change-Id: Ic087fe4a014d9179fab3dc6f833aaf73373f9452
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
16e0c1fcf2be1ac7daafa6cb2c1c97d751ca3e66 15-Sep-2016 Steve McKay <smckay@google.com> Move Activity classes to own packages.

FilesActivity > manager/ManageActivity
DocumentsActivity > picker/PickActivity

Change-Id: If2efb07fbebbd6ef84aa744af17c8cbeac05d770
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
743bc1befcf88af802a686c35a4c4afc961f616e 27-Aug-2016 Steve McKay <smckay@google.com> Show correct sort header after root switch.

Bug: 31119758
Change-Id: I4f99140d67196c363f0276bce2d57e93dad0187f
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
9de0da60f46dbdf6939f371a619d4d2018949d36 26-Aug-2016 Steve McKay <smckay@google.com> Move sort headers out of directory layout.

This allowed some simplification of the sort component lifecycle.
Also move progress bar.
Also, don't reset model when we get a loader-reset when last results
reported "loading". Fixes a bug where progress bar was being hidden too early.
Finally do a little pixel tweaking on sort headers and breadcrumb.

Change-Id: I49a2c70443edacfe911f692054e289bf1d5f6ecb
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
81afd7f587176e7d63f00d533b1258dfec84bf5c 23-Aug-2016 Ben Lin <linben@google.com> Add focus to directory after creating them via CreateDirFragment.

Since after createDiretoryFragment finishes, it's not synchronous that
the directory's view gets added, we need to wait for a layout pass so
recyclerView correctly updates itself with the new directory view. Once
then, we will request focus on the directory.

Bug: 27474438
Change-Id: Ib6087d63020265a837626b0dbcb511a9cd919285
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
fcf45169dd15df000a952af07985a28285f8f7c6 20-Aug-2016 Steve McKay <smckay@google.com> Always show file size.

Change-Id: I5ef42a01613c712a15c81157075accee096a7351
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
61f564beacafc5edebbb4b05d098203816ff7f64 16-Aug-2016 Garfield, Tan <xutan@google.com> [multi-part] Enable bidirectional sorting

* Add sort widget for grid mode
* Remove sort menu items
* Add a divider between header and contents
* Fix an auto-scrolling bug in drag and drop exposed by adding a header
* Add unit test for sort dimension

Change-Id: Id4f1195778d288ec0b0a95f7a0d16efb5604ba40
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
11d23483bf28768c04c25e4056df648fa8301aef 05-Aug-2016 Garfield, Tan <xutan@google.com> [multi-part] Enable bidrectional sorting

* Wire new sort model to existing sorting logic
* Add sort by menu item to sort controller
* Enable sorting in Recents
* Add tests for SortModel

Bug: 22823056
Change-Id: I864e79e711bf18f3018abd9db90bcf267f0ed390
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
171e6f53d114c3fe5ee69bc4e2bafb53daa4bda5 29-Jul-2016 Garfield, Tan <xutan@google.com> [multi-part] Enable bidirectional sorting in DocumentsUI

* Add a header to list mode
* Add a model for sort state
* Wire them together

Bug: 22823056
Change-Id: I6acd184b69e1564fccc92538d2b47792c6c9f45a
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
db6ec4918e3e6c932965d982b527a03c4ea94a05 14-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow root item accepts drag and drop." into nyc-andromeda-dev
a5588b65d55bc1b8b5ba943f8b660db26a7eac5c 13-Jul-2016 Garfield, Tan <xutan@google.com> Allow root item accepts drag and drop.

Bug: 28315281
Change-Id: Ie37536258f04c1b0d3ff5a315f4a5fa33e0ba182
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
821727a0fd0fa608a3046db8dad6ea588e16828f 08-Jul-2016 Ben Lin <linben@google.com> Follow up changes from ag/1190582.

Change-Id: I40121fc3d36e430c402da2835027283eb4b11071
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
5668b866d52a4f8907474922dc9b1ba1b4db85a3 29-Jun-2016 Ben Lin <linben@google.com> Docsui-level work for implementing Eject on Roots list.

1. Added Eject Icon for Roots that support eject
2. Added Context Menu for RootsFragment (Settings and Eject)

Bug: 29584653
Change-Id: I97f582de05763e3f0327bc0d2dc6d4e2222e047c
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
85ec0d676297724f211213c7cb188839f1d3601b 25-Jun-2016 Steve McKay <smckay@google.com> Load layout specific breadcrumb view.

Because two diffrn't view types can't share an resource id....
else we get ClassCastExceptions bubbling out of Spinner when
tryihng to restore from RecyclerView state.

Also:
Move Bots to own file and make BaseBot inner to that.
Extract searchbot from UiBot.
Fix broken search icon logic in phone layout.
Separate somewhat complicated breadcrumb bot functioanlity in a separate bot.
Simplify Search test.
Check for drawer vs. fixed layout instead of "tablet" mode...which didn't
work when rotating tablets.
Update a dialog entry to use Espresso.
Update breadcrumb stuff to use Espresso.
Move *default state* checking to a different test so we can
enjoy the default location support from ActivityTest.

Change-Id: I0a60ba93a1cbbb990ec3b36d4f9fd5dc8b86ff00
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
47e58bbc2d040f6a4588c2b4330316801227f439 20-Jun-2016 Ben Lin <linben@google.com> Merge "Moving Menu-related logic from BaseActivity to MenuManager." into nyc-andromeda-dev
c49c50ae4601764623a8f491489639685d084f3a 20-Jun-2016 Steve McKay <smckay@google.com> Merge \\"Make advanced storage option sticky...\\" into nyc-dev am: 361ccf5eef
am: 06b338fbf0

Change-Id: Ia30d96726753d6dab4bf69a91a56e21ae7ca1897
25679910d49d20d926f44a5baf73e9dfa7f274d3 17-Jun-2016 Ben Lin <linben@google.com> Moving Menu-related logic from BaseActivity to MenuManager.

Bug: 29423149
Change-Id: I228e1525cb82d310b16ef0aec8acb4534b7b601d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
91226eeb7de9e404b28975162ffb7e349720190e 20-Jun-2016 Steve McKay <smckay@google.com> Make advanced storage option sticky...

...when used from one of the picker modes.

Bug: 29454465
Change-Id: I5f7db04a51023b59121289afd300a13ea071146d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
b8c54e773b1d4087a543f22bf02ea6421de09f5c 10-Jun-2016 Ben Lin <linben@google.com> Implementing breadcrumb for tablet devices for navigation in the bar.

Bug: 29214736
Change-Id: I37de2c39a55c33d7111496e896a0c85e1c7fa553
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
ebf2a172b69cfa9105cb5807e7b76f58425be76c 03-Jun-2016 Ben Lin <linben@google.com> Implementation of Right-click context menus for docs/files.

Bug: 24416336
Change-Id: I675baf4abf6308bc1f6c3b4171f7251b0f3fd6e4
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
82772c8824abee15bccc43159047d0ecbc058539 08-Jun-2016 Ben Lin <linben@google.com> Merge "Isolate Menu/Action management into dedicated manager classes." into nyc-andromeda-dev
7c35b036cb0de801a093df62da92c4a94399c26c 31-May-2016 Ben Lin <linben@google.com> Isolate Menu/Action management into dedicated manager classes.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
638d5baf4e8a27b9f9507a5ca0f424d0660a693a 06-Jun-2016 Garfield Tan <xutan@google.com> Merge "Suppress auto-closing drawer and add ripple effect on spring load roots." into nyc-andromeda-dev
2bab2f8e839a95cb9c2ed2b6ab248beaf58b6ddf 03-Jun-2016 Steve McKay <smckay@google.com> Preserve selection in memory during rotation.

Using onRetainNonConfigurationInstance
Eliminate 1k limit on selections.
Bug: 28194201

Change-Id: Ic18e441dad418c2b829abd01f8ad61fc1e4d3391
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
57facaf76bc8d23b539518a342e1a126b51b64ce 28-May-2016 Garfield, Tan <xutan@google.com> Suppress auto-closing drawer and add ripple effect on spring load roots.

Bug: 28865182
Change-Id: Ief7967e33b9a0d7e94a667172121d8007f78115b
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
6207d6f694aa2bb3265c1489d6f8e1eccd56e21e 17-May-2016 Garfield Tan <xutan@google.com> Merge "Open root list when hovering on the edge in drawer layout." into nyc-andromeda-dev
7d66a862d5f4c96e339f8f6dbfc0406ed16ee9b6 11-May-2016 Garfield, Tan <xutan@google.com> Open root list when hovering on the edge in drawer layout.

Bug: 28345294

Change-Id: Ia569003e21aea0641ccc1d2a5e042bdc93f32bb3
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
dfda0f78ef62d8628f1de93f086ce1be3721b140 13-May-2016 Steve McKay <smckay@google.com> Merge "Don\'t show new-window item in Downloads per Gabe." into nyc-dev am: fec0d188c1
am: 270539c6d0

* commit '270539c6d01eb82bf4113c43dcf0a6862eb780c6':
Don't show new-window item in Downloads per Gabe.

Change-Id: I751235d2cb867b857006d9746e7aee77b766f0c1
24917427f41f9e41925c4a56d0c71d85e30643df 11-May-2016 Steve McKay <smckay@google.com> Don't show new-window item in Downloads per Gabe.

Also, fix regression...don't show "internal storage" option in Downloads.
All other modes, fix inconsistencies in presentation of
internal-storage/new-windows commands by eliminating launch mode inference.
Update VolumeInfo and MTP provider to send correct launch mode extra.

Bug: 28691735,28695347
Change-Id: Ic480925f4c8f1beee4da104a2259c1ce5f28a6a1
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
804133e4ca98ffa168cd547793054b594cf6d9cc 21-Apr-2016 Garfield, Tan <xutan@google.com> Add capability to spring load a root or directory.

Bug: 28242270
Change-Id: I5cbdb7734af8d78015a82fd7b38b1266576c9914
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
0a2c49a1cfa0ca730b388d1dfe8b6c49e57a2014 04-May-2016 Steve McKay <smckay@google.com> Fix regression, show internal storage option...

...for non "Downloads" scenarios like "Copy to".
Bug: 28552420

Change-Id: If317e3f575a40cac69628c1b6eecfc6be1dfcbce
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
6ff85c3e61ae12bd93edc909825e000574b3c650 19-Apr-2016 Daichi Hirono <hirono@google.com> Terminate DocumentsUI opened for the specific root.

If USB is opened in DocumentsUI from storage settings and format it from
context menu, a user expects it goes back to storage settings after
formatting the storage. However, previous we show Downloads as a result
of redirect from the previous USB storage.

The CL changes the logic for callback so that it finishes the activity
if DocumentsUI is opened for the specific root and the root was removed
while a user stays at the root.

Fixes: 28246076
Change-Id: I5548152fc27fd13bd9b75b3083bcfbdd9f93509e
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
c6a7faf015771dc8ff3e7cf1d85370a852b48bb9 15-Apr-2016 Tomasz Mikolajewski <mtomasz@google.com> Fallback to Recents when Downloads is not available.

Bug: 28182647
Change-Id: I0ece028f7980c7e55ca64d5aa34e98bdb4d08176
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
94e53e4228f176a62187e2b2dd5c781773f8e453 07-Apr-2016 Aga Wronska <agawronska@google.com> Consolidate user actions metrics into one histogram.

Bug: 27301081
Change-Id: Ib2ac46dd268e492c576bc082dc349c4a6826897f
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e20925f5b43ab8f1f8dc4c1e07d7ef966cf4115c 06-Apr-2016 Aga Wronska <agawronska@google.com> Revert 'Make Files drawer appear behind system ui bars' because of action mode bug

Fixing: b/27854892
Bug: 27570567

Change-Id: Iefdf2f2a450d80c551027efb35121554503cca3c
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
6eeb2223da7a3b522988bd12f7977786d0bd6458 06-Apr-2016 Steve McKay <smckay@google.com> Merge "Massage code to better support Files overlay." into nyc-dev
17f7e5891cbe86fc6cacae045a4edd3e41f8d5ee 05-Apr-2016 Steve McKay <smckay@google.com> Massage code to better support Files overlay.

Also, allow "productivity_mode" config to be enabled via intent extra
as a developement aide.

Bug: 28006206
Change-Id: I7be8d96a0e924f9ce8023347e051d28d69a0eec9
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
ea4f5c9ee4bb31d2c890eca2bbdd73c660e339fe 04-Apr-2016 Aga Wronska <agawronska@google.com> Make Metrics.logKeyboardAction() method take @KeyboardAction type
instead of KeyEvent

Change-Id: Ib9a19532612b679141b6d611e448247d3b0bab23

Fixing: b/27942360
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
fa1832e469b544015e141d7be44e4d5b38708bb5 01-Apr-2016 Aga Wronska <agawronska@google.com> Add metrics for keyboard shortcuts

Change-Id: I3a63efd856f25cc33d61b734970675b77645a26d
Fixed: 27942360
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
4972d71090b4e98951102ddd37fad95052525786 30-Mar-2016 Aga Wronska <agawronska@google.com> Add metrics for menu actions

Change-Id: Ic20802730e6068cfe49c277c3378c15ee0ba09fe
Fixed: 27921699
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
60825c1c896723b4ddeb04aec9ef0f754326b4db 01-Apr-2016 Aga Wronska <agawronska@google.com> Add comment for FLAG_TRANSLUCENT_STATUS added in CL 898928

Change-Id: I8f4ad4e00c6ce46e61afc087daa890eb90ed18a1
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
9937ed0e0eaafb9c5c65736454d4e1f95c1a4d82 01-Apr-2016 Aga Wronska <agawronska@google.com> Merge "Fix dialogs layout after keyboard shows up" into nyc-dev
ceb990eae3c5eed7c662d544f3d7cfc29f137c9b 31-Mar-2016 Aga Wronska <agawronska@google.com> Add menu option to show/hide internal storage.

This reverts commit 7c4395804e450533afb553ab992c47f737da8a9b.

Bug: 27683276
Change-Id: Id1a310b57ab7fa3c8c14b464786473f211eaf41f
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
7b16880d5a24213cb8620d5bf5b542c6c5529bde 29-Mar-2016 Aga Wronska <agawronska@google.com> Fix dialogs layout after keyboard shows up

Change-Id: I58e3984586e33855e95e5c2879e51f565759025b
Fixed: 27900202
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
8e21daa13150c6ff63ba7d70a8df2970a186b9ba 25-Mar-2016 Aga Wronska <agawronska@google.com> Add full bar mode for search view on small devices

Fixed: 27406434

Change-Id: I828ff72752cdb35dff453ea405209f169e550c1a
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
79b7c6a7f3945ae1f7236fadcde7c39605a1d6e0 25-Mar-2016 Aga Wronska <agawronska@google.com> Merge "Revert "Revert "Make status bar translucent. Make drawer appera below status bar."" with a fix for cts tests." into nyc-dev
320a08fd5d2a0a8adbf3e0ac3ddabe9554b4ab18 25-Mar-2016 Daichi Hirono <hirono@google.com> Add new metric to DocumentsUI to record launch time.

BUG=27255964

Change-Id: I0bebdb95a0008ce087550849b4ca5fc5ead5c664
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
c91529809ce32e5421cbb28e6f6de2006082358c 23-Mar-2016 Aga Wronska <agawronska@google.com> Revert "Revert "Make status bar translucent. Make drawer appera below
status bar."" with a fix for cts tests.

This reverts commit 0574d169ba1e649d8bd54d28ba74b9707e675e37.

Change-Id: I33deeef839092956a67ec31bcdbfbbd540db8b68
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
08c9787024dc3e3d152a0e548b33c5d70c48eae3 23-Mar-2016 Daichi Hirono <hirono@google.com> Revert "Make status bar translucent. Make drawer appera below status bar."

This reverts commit 4639136c3b4bc22064323a193f06d6585e1a171a.
The commit breaks the following CTS tests.

* android.appsecurity.cts.DocumentsTest#testCreateExisting FAIL
* android.appsecurity.cts.DocumentsTest#testCreateNew FAIL

BUG=27805363,27570567

Change-Id: Ic9f1d98714a78afe548eb5ae9afa118ddc83cccc
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
64ae1f4e0236cf9ff06e19887c491bf08ee8adce 22-Mar-2016 Aga Wronska <agawronska@google.com> Change copy/move destination to Downloads when home directory is hidden.

Bug: 27791217
Change-Id: If196441a57053ada9875c6cc29d4c7f13fcb57e8
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d1bc6b36c2c63d179169e8b6c882b152e90fa9c7 21-Mar-2016 Aga Wronska <agawronska@google.com> Make status bar translucent. Make drawer appera below status bar.

Change-Id: I6089a7b5d88514f5df9212839709d38daeb3be8b
Fixed: 27570567
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
68e52fe634eb9fa42f45307894fad5732882d57c 17-Mar-2016 Tomasz Mikolajewski <mtomasz@google.com> Merge "Add a performance test for launching DocumentsUI." into nyc-dev
b8373c22f1bacf194c35a45dde337cad2e904587 15-Mar-2016 Tomasz Mikolajewski <mtomasz@google.com> Add a performance test for launching DocumentsUI.

The test launches the DocumentsUI as picker, then waits until the
main thread idles, which guarantees that roots are loaded and UI
rendered.

It confirms, that the recent system cache improves cold start
performance by around 24% on my configuration (from 1685ms to 1357ms).

Bug: 27370274
Change-Id: I738202ea434a7bfe7080fc0994f636ef0e7847cd
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
22601f98630061ef45f9bec59714fbde4211f1b5 14-Mar-2016 Daichi Hirono <hirono@google.com> Move to downloads root instead of home root.

Previously we assume the home root exists always, but while migrating
internal storage, the home root is temporary removed from Android. Since
we open donwnloads root by default now, the CL lets Files app move to
the downloads directory instead of home root when the current directory
is removed.

BUG=27570929

Change-Id: I89efb1ae32ba8ae7269b3242035d5b67114fcb54
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
fb4fd2f154e5153b6bb22bb46af7327c6735ed79 11-Mar-2016 Steve McKay <smckay@google.com> Centralize animation related resources.

Fix minor bug in animation (use height not width).

Change-Id: I357224086b2732fe9ad49a145db3e82259a87891
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
f2eb8d96c2d058b9375fdb8da8cd0dfe362d6384 08-Mar-2016 Steve McKay <smckay@google.com> Show more menu items on larger devices.

Bug: 27036292, 27406771
Change-Id: I1ceee3c69fbda33a6c51c0ff4f28e52911c1ca7d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
42e1177396b519df4e042462935469e0a8741724 02-Mar-2016 Steve McKay <smckay@google.com> Merge "Always show intern storage." into nyc-dev
8b21699df2abd669a337f71b99271a1bb33fe79c 02-Mar-2016 Steve McKay <smckay@google.com> Always show intern storage.

Only show debug root when devel mode is enabled.
Remove all traces of "advanced".

Bug: 27297398

Change-Id: Ie7e8be282531bd245351d56ababa8ca625c10fd2
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e29e3416fddc34f72234a7ece191289ad3ba3a21 23-Feb-2016 Tomasz Mikolajewski <mtomasz@google.com> Add scaffolds for performance tests of DocumentsUI

Bug: 27370274
Change-Id: I14dea1b85cd84c8bb3c0eee27b2954108bfa4f8b
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
0af8afd3309538dec784ed0c9c35b252a8213123 25-Feb-2016 Steve McKay <smckay@google.com> Update preconditions to be asserts...

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
fd8425ae34b73879ca14d244e63381c9400b48d7 23-Feb-2016 Steve McKay <smckay@google.com> Don't restore stack when picking copy destination.

Move fancy drawer "fiddling" to FilesActivity.
Rename the various "Restore" tasks to better reflect their roles.

Change-Id: I7f5c3dee11112bf0a31e6219d09c572c5651629d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
55c69999cdb1bc3e61ba773ac0374638a050deda 22-Feb-2016 Steve McKay <smckay@google.com> Merge "Move directory and roots support to own ui bots." into nyc-dev
5e1acc9f71ca4c2a07ba64ec9c050b20303993e2 19-Feb-2016 Steve McKay <smckay@google.com> Move directory and roots support to own ui bots.

Also...sorry, snowball, don't automatically open folders
that are created in Files app. Only do this in DocumentsActivity.

Change-Id: I271655fd3566496eced4aaa7a44d5110233150a0
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
af5ace5d5e3a273b151e012206efd029c2872b59 17-Feb-2016 Aga Wronska <agawronska@google.com> Directory fragment refactoring.
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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
cdf87a58084f2557b7df403cc449d7804a4e2f5b 18-Feb-2016 Ben Kwa <kenobi@google.com> Merge "Implement backspace support." into nyc-dev
65f393a2b56853ec5c1f342bf1f09404db829e7f 17-Feb-2016 Ben Kwa <kenobi@google.com> Implement backspace support.

Pressing backspace pops the user up a directory level if they aren't at
the root directory of the current root.

BUG=27123794

Change-Id: I8f0a88a1194bf8f082d0b057a288a0c3da3068f6
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
30aabb8d694fa9897a6a17344beaee16fe08e28f 17-Feb-2016 Steve McKay <smckay@google.com> Don't read raw root from State, use getCurrentRoot

Bug: 27213606
Change-Id: I9abf42672d914041ab710bd09886c0c4034b85b6
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d71bd61114e7bd71bac0100187faf75b2284092b 15-Feb-2016 Tomasz Mikolajewski <mtomasz@google.com> Provide siblings in a sorted orders in DocumentsUI.

Bug: 27192158
Change-Id: Idefd2ba3027cd4630fcd2aefade9e6b4952e7125
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
74e5d4173a1cd060b16c663108a1eeabeae25540 10-Feb-2016 Ben Kwa <kenobi@google.com> Introduce ChromeOS-style keyboard navigation.

- Turn the DirectoryFragment (DF) and the RootsFragment (RF) into
top-level views, and allow switching between them via the tab key.

- Disallow arrow-key navigation from switching the user between the
DF and RF.

- When nothing is explicitly focused, make navigation keys focus the
DF. This makes it so that if a user opens DocumentsUI and just starts
pressing arrow keys, they'll navigate in the directory listing.

- When restoring focus on the DF and RF, remember the last thing that
was focused, and restore focus on that thing.

BUG=25195767
BUG=25121367

Change-Id: I00e20cbdbe9edfe269fb356440a93ef5d67c5298
(cherry picked from commit 1c9f9222e56482682461013b703590c5c9471018)
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
3d8508c9103019a2c3ae80dc505aeac4ce8fc4dc 10-Feb-2016 Steve McKay <smckay@google.com> Merge "Automatically open roots pane if default dir is empty." into nyc-dev
0a5a10cff57cdc628d124c653967cfc72e3c9e1b 10-Feb-2016 Steve McKay <smckay@google.com> Merge "Don't apply fancy back logic when drawer is not present." into nyc-dev
cb9eb42e6150ce7479d54fce75c4b593224540d5 10-Feb-2016 Steve McKay <smckay@google.com> Automatically open roots pane if default dir is empty.

Move drawer fiddling out of DirectoryFragment into respective
FragmentTuner instance.

Bug: 27084308
Change-Id: Ia13fc2be1442e1a7164c2d67ea6ce4bcfda68bcc
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
aef3848f73c93a9d29b8ea86a4532b3a135dca4c 09-Feb-2016 Steve McKay <smckay@google.com> Don't apply fancy back logic when drawer is not present.

Add test coverage. Booya!

Bug: 27078649
Change-Id: Id2ce53009ee212b3af8d143091859d30e2bc76b1
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
fa42172b685cb364d4beddfee2ba16a2e948e7e5 08-Feb-2016 Aga Wronska <agawronska@google.com> Go to root from child directory when root tapped.
Bug: 27060001

Change-Id: Iabe1f9f2c986904a4d827e74cf29b3de55e74f90
(cherry picked from commit 5652d175fedc87c796de3cfd354a9de961450690)
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
95c79f54f3bee91deeb18bb75e74a69b221105c0 05-Feb-2016 Steve McKay <smckay@google.com> Move create folder and sort to overflow menu, cleanup back behavior.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
1f67a301db217c7f36248beda82b4d108103b460 05-Feb-2016 Steve McKay <smckay@google.com> Merge "Simplify State initialization w/ better semantics + improved Task security."
c7dc0cfe6f990a8589f37ef593378a691d379c94 04-Feb-2016 Steve McKay <smckay@google.com> Simplify State initialization w/ better semantics + improved Task security.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
b1f7cd55d412998fb937fccd4fe24fe580d59c99 03-Feb-2016 Tomasz Mikolajewski <mtomasz@google.com> Remove DirectoryContainerView class from DocumentsUI.

Removed and it works as before, I guess it was some workaround for a bug
in the past.

Change-Id: I859c995940ad04ac028aea1727a81358ca7fda1b
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
300e764ae313acb4e1b24a1cbd7c5923cc22a79e 04-Feb-2016 Steve McKay <smckay@google.com> Merge "Normalize toolbar management."
18d01e8d21376475cc9882dfcdce4a3d75f66690 03-Feb-2016 Steve McKay <smckay@google.com> Normalize toolbar management.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
bb21ac1a13faea86c462aad71bc85c129dde6128 03-Feb-2016 Aga Wronska <agawronska@google.com> Merge "Stop current root reloading when it is clicked again"
fd26e8d1d6476b9efeb6e39a97bbfb3c3b4f290a 03-Feb-2016 Aga Wronska <agawronska@google.com> Stop current root reloading when it is clicked again

Bug: 25079217
Change-Id: I5d32be06d9eda4e5aced965030cce863e8a1965d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
c09b329d4a07d96e2889b6962d0b68ecdf0fe9c4 03-Feb-2016 Tomasz Mikolajewski <mtomasz@google.com> Rename confusing animation naming.

The naming was ANIM_UP, ANIM_DOWN, but the animations were from right and
left. Since right and left are flipped for RTL, this CL renames them
with direction agnostic ANIM_ENTER and ANIM_LEAVE.

Change-Id: I8de1603b1baaef3d4ba8fbd593f5e53143698dff
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
2b5170b03889a5a1b50625701e1d49240a89343f 03-Feb-2016 Tomasz Mikolajewski <mtomasz@google.com> Fix directory/root opening animations when launching DocumentsUI.

We should only show an opening animation, when back button would get us
back.

Change-Id: I9b3f43592a87c1c13944d382b7201b5727fd08ee
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
5a1e87973856f0605cb4781405e35cc8e533cbf0 27-Jan-2016 Tomasz Mikolajewski <mtomasz@google.com> Open zip files nicely from the Download app with Files app.

Bug: 26321218
Change-Id: I8a7a7e914d290ea1b6f424ee5fbd38a4b09c362d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d4800817c434cb77ab03a2fd061da897a05cb933 02-Feb-2016 Steve McKay <smckay@google.com> Show view mode button in action bar on Downloads.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
36787540589e768fce222629a75e951904383250 30-Jan-2016 Steve McKay <smckay@google.com> Decouple SD card from ADVANCED storage toggle.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
428b3e7d04cc4a3e55c5b0571da2f380fee82d9d 30-Jan-2016 Aga Wronska <agawronska@google.com> Merge "Hide action bar search icon in directories that do not support search operation."
654e25c7018d68f6c10dc4c272ed71bfabfbbfe0 29-Jan-2016 Aga Wronska <agawronska@google.com> Hide action bar search icon in directories that do not support search operation.

Bug:26593318
Change-Id: Ibb8945e6eba508aaaa55b1f666ac434f30b2aaaa
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
da20086aa1ee62fb80efda665f027955d3afe884 29-Jan-2016 Steve McKay <smckay@google.com> Merge "Clear selection after copy and when back is pressed."
86c057601e6f81de3bd33865833edea4a203c476 29-Jan-2016 Steve McKay <smckay@google.com> Clear selection after copy and when back is pressed.

Change-Id: I5240c825016b9e21bc147591b72bb969eb765597
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
8dac4a03d4821279da0818abbdc6cc50589c41fa 28-Jan-2016 Steve McKay <smckay@google.com> Files always visible, same for new window menu.

Remove "productivity_device" bit.

Change-Id: I28ee3e210fc5f8c367d45a74edab0e04667ddd5e
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
7776aa5f01b3aa9f7b401ba4f78735a4e028dda4 26-Jan-2016 Steve McKay <smckay@google.com> Remember view mode by root.

Now stored in local prefs, not recents DB.
Don't consult preferences for recents from DocumentsActivity.

Bug: 22671255 26689962 26411301
Change-Id: I492d85c450253bce984c929a6dd15d7c31ee6a0b
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
1c0a389fe3b290906f9d3e4e579ed8c4d5d641a3 26-Jan-2016 Ben Kwa <kenobi@google.com> Add MetricsLogger calls to DocumentsUI.

- Create new categories in MetricsLogger for DocumentsUI events.
- Add logging code to DocumentsUI for launch events and viewing roots.

BUG=26737132

Change-Id: Ib703878a39dd03b57e68a4d5a1d6cf8fe2936c5a
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
3c23718ad126b4cc4f0a80dd29f0d4e411ccc1d3 21-Jan-2016 Aga Wronska <agawronska@google.com> Add support for renaming documents

- Add rename dialog
- Add rename menu option
- Enable rename menu option only when renaming supported
- Rename files and directories
- Present error message if renaming fails

Bug: 20493815
Change-Id: Ic7386d14e3876655fb19245b9a90b4c67a4febb4
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
8788dadd1b13193b577812df4f9f16a642ebfbb7 16-Jan-2016 Aga Wronska <agawronska@google.com> Refactor SearchManager:

- 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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
b25a7fef6e55b8931164b07031277315ac89afb4 14-Jan-2016 Daichi Hirono <hirono@google.com> Merge "Check isDestroyed after finishing async HandleRootsChangedTask."
38afb8fc071075ba582e10b2bd2bef9d3f9b3d29 13-Jan-2016 Daichi Hirono <hirono@google.com> Check isDestroyed after finishing async HandleRootsChangedTask.

HandleRootsChangedTask will be finished after the Activity is destroyed,
though we no longer to be able to change the directory at that time.

BUG=26454277

Change-Id: Ia414134c80d900ef2e6c382fdd9209a154d940af
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e28c3c888d10d4219317775cd8e48a9dfb2bc4d1 13-Jan-2016 Daichi Hirono <hirono@google.com> Stop listening root change events when the activity is destroyed.

BUG=26454244

Change-Id: I4be98f21843d6d501dd9c6fc343e905e107fc1c1
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
ef116cbbb7e60506536893d6d91e7216a82fd47f 12-Jan-2016 Aga Wronska <agawronska@google.com> Merge "Keep Search View visible after search completed Improve Search View behavior Add Search View background color"
1f7f2397405396d265928358eb962f6d877651f1 09-Jan-2016 Aga Wronska <agawronska@google.com> Keep Search View visible after search completed
Improve Search View behavior
Add Search View background color

Bug:26143355
Change-Id: Ifdc4bfff56fc6244c571dfbeff4179e1515d53b7
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
2806beb33a847ddba368fd143f503611ce8fd37c 07-Jan-2016 Daichi Hirono <hirono@google.com> Encapsulate stackTouched logic into State class.

BUG=26437613

Change-Id: I84a667cb3561d395daac4e63d9eaca589c8f1fea
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
6e543371b82e4576aec59865c747841e80dfb083 07-Jan-2016 Daichi Hirono <hirono@google.com> Merge "Leave from the current root when the root is removed."
3067d0d06a201bbb870b8d699df9a15a326b07ac 25-Dec-2015 Daichi Hirono <hirono@google.com> Leave from the current root when the root is removed.

This is needed to handle removable roots.

1. Add a listener to RootCache.
2. BaseActivity handles roots change and leaves from the current
directory if the current root is removed.

BUG=26316940
Change-Id: I41921fe17782fa1a2d9e58f55ea84326b8f1d3c0
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
713f6284135dc418bef4a5690754db42b23fc851 21-Dec-2015 Aga Wronska <agawronska@google.com> Pressing back button clears search

Bug:26143308
Change-Id: Iaa02d39a6ee1fd1a0c7d4d07453a481af97c7664
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
b8a5e08119c75b65ccecea8b6a59f2c87ea8ff32 07-Dec-2015 Ben Kwa <kenobi@google.com> Re-enable sorting in the DirectoryFragment.

- 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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
734936aaddd080946a92e80bc65dc3d11a93f2d1 25-Nov-2015 Tomasz Mikolajewski <mtomasz@google.com> Wire support for archives to DocumentsUI.

Bug: 20176812
Change-Id: I8220afa2f53b07aa842bf6ac24fcc62afd4e2617
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
6035b3cc3b6b298ff8065b2ed55da651e6950802 04-Dec-2015 Steve McKay <smckay@google.com> Fix broken copy after recent copy related chagnes.

Also, add a label to Downloads app, and enabled drag and drop by default.
Cleanued up menu handling in BaseActivity (use switch statement).

Bug: 26033335
Change-Id: I3cef89a4a9f9e30b4e926411e94cf06bc2dc0f8d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
31e104f83db7dae9e8620ef1d3151f9a580e6dcb 02-Dec-2015 Steve McKay <smckay@google.com> Add DownloadsActivity functional test.

Bug: 25809806
Change-Id: I43ceaf3a99715a57e3d349bee60f2edf7f6666bd
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
ae96780a8909476dca709b88dbae5ec9a2f0632c 25-Sep-2015 Ben Kwa <kenobi@google.com> Open the destination dir when a copy notification is tapped.

- 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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
f68210e9a1e36e65e56e0c95cfe990f0145ea63f 04-Nov-2015 Steve McKay <smckay@google.com> Move DirectoryFragment and family to dirlist pkg.

Stuff was getting out of control in the main package.

Change-Id: Ia06ba96f5bbe13388d51e6ad52a9dac76af97cc0
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
a017bc1d7291dbb8add51ace9ed8e143ad18a872 07-Oct-2015 Ben Kwa <kenobi@google.com> Add shift-selection to DocumentsUI.

- Move the key listener from BaseActivity into DirectoryFragment, where it
belongs.
- Add code to detect the shift key during keyboard navigation, and
extend the selection in that case.

BUG=20859059

Change-Id: Ia7d3c7d4343f0185873deeaf1a35028a716b6e19
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
0fe95042025a9bcf73b0d7a6c3f027092bab825c 15-Oct-2015 Steve McKay <smckay@google.com> Performe save when ENTER is pressed.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e1fffca49ec58c44c312d22fd3529d00181ddf19 06-Oct-2015 Ben Kwa <kenobi@google.com> Implement Home and End key navigation in DocumentsUI.

Add a handler to shift focus to the first and last files when the home
and end keys (respectively) are pressed.

BUG=24682598

Change-Id: I82db67d0d0f8292b1dad966defa68800496d59f2
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
e980927578d51373a53a3aa9531bc73fb773fff8 01-Oct-2015 Steve McKay <smckay@google.com> Normalize and improve menu fiddling.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
4d0255f79cc92a5675d14b20f9cdf06ecb8d7109 26-Sep-2015 Steve McKay <smckay@google.com> Provide previous stack when opening new window.

EXTRA_STACK support was already in place (from CopyService).
Add "isRootUri" to DocumentsContract.

Bug: 24410611
Change-Id: Ia380030216323d1272ef247280582e4b55b83c42
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
f2c8b0dfe61deeedbed70931e0997a0b2f4eff45 24-Sep-2015 Steve McKay <smckay@google.com> Add support for opening multiple windows.

Installs an intermediate activity that manages tasks.

Bug: 20562850
Change-Id: If2d0a125b0630c27af07666b0f6a712f58243e9f
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
f8a5e08bfb793e0b1ec7e3ac455a6158ff968afc 24-Sep-2015 Steve McKay <smckay@google.com> Move State to a separate file.

Update remaining local DEBUG definitions to use Shared.DEBUG.

Change-Id: I3ed4d4b184836da161adff14bd3d9ca01b435847
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
459bc2b19ae24e3ad09b2945f21c8397177d5720 17-Sep-2015 Steve McKay <smckay@google.com> Merge BROWSE and BROWSE_ALL actions.

Open Files app when exploring from settings.
Force visibility of file size in this mode.
Don't hide empty media providers.

Bug: 24136618, 24140864
Change-Id: I6f238586725f9b6255812e3082bb8d8655219a7d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
fad3d4aae13483c2361a3d551f6b0f0b49bb48af 23-Sep-2015 Steve McKay <smckay@google.com> Update RecentsCreateView to use RecyclerView.

Move common DirectoryContainerView handling to BaseActivity.

Change-Id: I2c34b23b7050b68999f16e6d7f651c94ea8e47b6
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
0574b18a7a95b29fab3cdb9ced6e5b46e24030fe 08-Sep-2015 Ben Kwa <kenobi@google.com> Refactor DocsUI to break out a new ManageRootActivity.

- Split all ACTION_MANAGE-related functionality off from
DocumentsActivity, into a new activity.
- Create new full-screen layouts for said activity.
- Fix some styling issues in {Documents,Files}Activity.

Change-Id: I0384715ad3c7d70a3a3daf510f1a09e8c5732348
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
7f395011c4478fd273351be8d9de95baa3a29704 24-Aug-2015 Steve McKay <smckay@google.com> Use resource aliases in-lieu of ViewStubs.

This eliminates the double resource inflation necsesitated by the use of ViewStubs.

Change-Id: I9749356bed24f48b8304897dc6d8dc47cc11736c
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
0fbfc653868966da7fd6109b247974e0d87a2297 21-Aug-2015 Steve McKay <smckay@google.com> Show a drawer when in portrait mode.

This makes more space available for content.
Rename all the "Standalone" stuff to just "Files".
Move layout inflation into base class.
Move backbutton > drawer interaction into BaseActivity.

Change-Id: Ie778b323c6e80122389f029be148dd9e0c4bfb6e
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
fefcd700d6b4cf1c4402af74c50fb0e762472901 20-Aug-2015 Steve McKay <smckay@google.com> Use type inference where possible.

Normalize use of Annotations like VisibleForTesting, Nullable and so on.
Also, fix a small issue where we were not doubling the marging on cells when calculating columns for grid view.

Change-Id: Ia02f683c2682fa8d0963d13f253a359911d27965
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
351a749751bc501c9d7c0f03ee5b542f0e7a7d7c 04-Aug-2015 Steve McKay <smckay@google.com> Populate quick view intent w/ file uris.

Change-Id: Ie4f15b11be1939f8b71752505caa9d74ab9f9680
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
8c9146a380a546565e452e5067845b8c33f173e8 30-Jul-2015 Tomasz Mikolajewski <mtomasz@google.com> Remove some duplicated code in DocumentsUI.

Change-Id: I065baeb73d0b3e01abecb8f7957b93379ac2426f
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
f4b8bb58f70b212371431822e30bbc690b350aac 17-Jun-2015 Jeff Sharkey <jsharkey@android.com> Finish when browsed root goes away.

If we're browsing a specific root, and that root went away, typically
due to formatting.

Skipped auto-merging this CL to master last night as it was causing
a merge conflict. Cherry-picking it to master today (with the conflict
resolved).

Bug: 21831184
Change-Id: Ie07607a81e32a7d82c88ad382658a471d47b905d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
20ce5eff650cff5ccca554b4b188c9f65cd9f969 11-Jun-2015 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 70be78a8 to master

Change-Id: I0743be4b22602ad0255998d22cff345c36a60ecb
e577ef07f49fb4a72d9c661eea3bc0f66acd95cb 11-Jun-2015 Daichi Hirono <hirono@google.com> Update visibility of the stack dropdown list after the search view is collapsed.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
435efbd2f5e181edfe50a38dd4a643fb37de7c34 11-Jun-2015 Ben Kwa <kenobi@google.com> resolved conflicts for merge of 3aff4fc6 to master

Change-Id: Id816d859f929de3bd0328ef3a67e2bef9fadf28b
0bcdec3400df914b0359d82456009a9e70eb029d 30-May-2015 Ben Kwa <kenobi@google.com> Enable apps to exclude their own roots from the DocumentsUI roots list.

- 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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
1f199483b77166242c4648270eed601748eef1ef 21-May-2015 Steve McKay <smckay@google.com> Add copy/paste menus to StandaloneMode.

Execute encoding/decoding of clipboard data in background...
was seeing a lot of red flashes for large file selections.
Move the majority of the Clipboard management code into a
shared DocumentClipper class.

Hide the copy-to and move-to menus in same.

BUG=20915675
Change-Id: Iff59e846afe6f1e90e6be816f5860d8b7efe3ae1
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
ceeb3f7d93d1667243c2ad4b743e5c78add29261 20-May-2015 Steve McKay <smckay@google.com> Improve keyboard control of "create folder" action.

Bind CTRL+Shift+N shortcut to the create folder command.
Improve dialog support (execute on enter).

BUG=21271637

Change-Id: I9474c63cb2568b98b6d829c9552828b9b68da8de
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
c2ca7987953ad982bcd13136f02dac79e8e2b78d 15-May-2015 Ben Kwa <kenobi@google.com> Merge "Add a move feature to DocumentsUI."
cb4461f872a92a5b2420e8655d12654aac1349ff 05-May-2015 Ben Kwa <kenobi@google.com> Add a move feature to DocumentsUI.

Add a menu item (protected behind a system property) for moving files.
Add an extra to the copy intent for transfer mode (copy/move).
Add code to CopyService to delete files after copy when in move mode.
Add tests.

BUG=20559838

Change-Id: I983f57a528327d1e7a12982b599094aad2c856ed
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
64ac2519dc455a99cd1ac496cbf5cd76287dcce5 12-May-2015 Steve McKay <smckay@google.com> Fix local-storage menu item visibility issue.

Update DocumentsActivity to hide the local-storage (aka "advanced") menu item when visibility of that item is forced-on via extra flag in the intent.
Update StandalongActivity to explicitly NOT honor local-only and force-advanced intent flags.
Fix import ordering (and get my IDE settings in shape).

Change-Id: I5323c85448d029e77732404d6dc8cfdb51ebcfc8
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
7bd32e1de3e5c55c79ee45c77924e61d75cdd952 01-May-2015 Steve McKay <smckay@google.com> Ensure sort menu is shown as needed.

This also hoists common code for options menu setup into BaseActivity.

Change-Id: Ie87b8188a6c142b2312c92dc0d0bd550f0b1e59f
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
0269fb64c86581e6dd1943e8616ee8f73da06646 23-Apr-2015 Steve McKay <smckay@google.com> Update activities to clear search term when a root that doesn't support search is selected by the user.

BUG=20495230

Change-Id: Iee2e2bd80dea6d368cad0911117e3759bdfe37d9
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
b68dd223b2623c22793f5dcd0f658de0aa92f80d 21-Apr-2015 Steve McKay <smckay@google.com> Reduce code duplication between DocumentsActivity and StandaloneActivity.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
f500ef286c796ad85c60d9737294f4aba2233a5b 17-Apr-2015 Daichi Hirono <hirono@google.com> DocumentsUI: Save source file list into BaseActivity.State.

This is needed so that the activity does not lost the list on screen rotation.

BUG=20283251

Change-Id: I8f971bab0a0ce2066fd5fea29b98b355cb948ea6
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
22574ed9fd6954bba42e206f8cd3bbb07169ebda 15-Apr-2015 Daichi Hirono <hirono@google.com> DocumentsUI: Move intent related constants to BaseActivity.DocumentsIntent.

BUG=None
Change-Id: I81d367d5f8d727a5fa76bc22b2fe871ae441dbcf
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
f2a822d1b63215dff38e042fe52469755544cf4c 14-Apr-2015 Daichi Hirono <hirono@google.com> DocumentsUI: Filter out downloads root if the source documents include 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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
caadd41756cf53d71a735c8cf4ec16e7224de146 10-Apr-2015 Daichi Hirono <hirono@google.com> DocumentsUI: Add new private intent action to select copy destination.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
311a7d8ef646fac19e5524da778108836df9a2dc 12-Apr-2015 Jeff Sharkey <jsharkey@android.com> Browse mode for DocumentsUI, removed volume state.

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
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java
d0a2a2c4e061da0de1b0008b841cacd9fc4416ed 25-Mar-2015 Steve McKay <smckay@google.com> Implement a standalone file manager activity.

Change-Id: Iaf86ef416b979cea4ab3890d3a26f09741392c3d
/packages/apps/DocumentsUI/src/com/android/documentsui/BaseActivity.java