am: b8995b7abc
* commit 'b8995b7abc9cbaa1dcb363c68535a63f4e8768a3':
Don't show new-window item in Downloads per Gabe.
Change-Id: I54d288582f474ed1a0718a3f6327af7f1814be75
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
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
Also, allow "productivity_mode" config to be enabled via intent extra
as a developement aide.
Bug: 28006206
Change-Id: I7be8d96a0e924f9ce8023347e051d28d69a0eec9
This reverts commit 4639136c3b.
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
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
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
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
Move fancy drawer "fiddling" to FilesActivity.
Rename the various "Restore" tasks to better reflect their roles.
Change-Id: I7f5c3dee11112bf0a31e6219d09c572c5651629d
Also...sorry, snowball, don't automatically open folders
that are created in Files app. Only do this in DocumentsActivity.
Change-Id: I271655fd3566496eced4aaa7a44d5110233150a0
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
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
- 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 1c9f9222e5)
Move drawer fiddling out of DirectoryFragment into respective
FragmentTuner instance.
Bug: 27084308
Change-Id: Ia13fc2be1442e1a7164c2d67ea6ce4bcfda68bcc
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