Commit Graph

120 Commits

Author SHA1 Message Date
Garfield, Tan
d9ddb3ba5b Suppress auto-closing drawer and add ripple effect on spring load roots.
Bug: 28865182
Change-Id: Ief7967e33b9a0d7e94a667172121d8007f78115b
(cherry picked from commit 17182ca46f7a8f3ae03bb8f5a16116246a5fbd91)
2016-06-06 19:01:51 +00:00
Garfield, Tan
a9d424ab97 Open root list when hovering on the edge in drawer layout.
Bug: 28345294

Change-Id: Ia569003e21aea0641ccc1d2a5e042bdc93f32bb3
(cherry picked from commit 49eda9885e81a32f8a3d7cc7b9f9f15766b2621e)
2016-05-17 21:55:13 +00:00
Steve McKay
935d7d6854 Merge "Don\'t show new-window item in Downloads per Gabe." into nyc-dev am: fec0d188c1 am: 6fdaf2f2cf
am: b8995b7abc

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

Change-Id: I54d288582f474ed1a0718a3f6327af7f1814be75
2016-05-13 17:42:44 +00:00
Steve McKay
f570c771f2 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
2016-05-10 16:25:58 -07:00
Garfield, Tan
1d975315b9 Add capability to spring load a root or directory.
Bug: 28242270
Change-Id: I5cbdb7734af8d78015a82fd7b38b1266576c9914
(cherry picked from commit b5e2714d63dc5e74cef69f590b41a161eeca7b80)
2016-05-10 20:39:49 +00:00
Steve McKay
5acf1ac2ab Fix regression, show internal storage option...
...for non "Downloads" scenarios like "Copy to".
Bug: 28552420

Change-Id: If317e3f575a40cac69628c1b6eecfc6be1dfcbce
2016-05-05 14:38:55 -07:00
Daichi Hirono
99900a0e58 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
2016-04-26 16:52:44 +09:00
Tomasz Mikolajewski
30616fcd21 Fallback to Recents when Downloads is not available.
Bug: 28182647
Change-Id: I0ece028f7980c7e55ca64d5aa34e98bdb4d08176
2016-04-15 14:06:09 +09:00
Aga Wronska
43df577ac4 Consolidate user actions metrics into one histogram.
Bug: 27301081
Change-Id: Ib2ac46dd268e492c576bc082dc349c4a6826897f
2016-04-08 14:16:40 -07:00
Aga Wronska
48c846368f Revert 'Make Files drawer appear behind system ui bars' because of action mode bug
Fixing: b/27854892
Bug: 27570567

Change-Id: Iefdf2f2a450d80c551027efb35121554503cca3c
2016-04-06 14:03:16 -07:00
Steve McKay
3855e9ce49 Merge "Massage code to better support Files overlay." into nyc-dev 2016-04-06 18:44:59 +00:00
Steve McKay
53f109b39e 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
2016-04-06 10:25:02 -07:00
Aga Wronska
d42a9bed93 Make Metrics.logKeyboardAction() method take @KeyboardAction type
instead of KeyEvent

Change-Id: Ib9a19532612b679141b6d611e448247d3b0bab23

Fixing: b/27942360
2016-04-04 14:07:27 -07:00
Aga Wronska
0614c16b5e Add metrics for keyboard shortcuts
Change-Id: I3a63efd856f25cc33d61b734970675b77645a26d
Fixed: 27942360
2016-04-01 13:34:46 -07:00
Aga Wronska
cf966ae5b5 Add metrics for menu actions
Change-Id: Ic20802730e6068cfe49c277c3378c15ee0ba09fe
Fixed: 27921699
2016-04-01 09:59:48 -07:00
Aga Wronska
cf59d32e59 Add comment for FLAG_TRANSLUCENT_STATUS added in CL 898928
Change-Id: I8f4ad4e00c6ce46e61afc087daa890eb90ed18a1
2016-03-31 17:55:44 -07:00
Aga Wronska
b8572b3d50 Merge "Fix dialogs layout after keyboard shows up" into nyc-dev 2016-03-31 23:54:11 +00:00
Aga Wronska
774cc932fc Add menu option to show/hide internal storage.
This reverts commit 7c4395804e.

Bug: 27683276
Change-Id: Id1a310b57ab7fa3c8c14b464786473f211eaf41f
2016-03-30 18:23:10 -07:00
Aga Wronska
198cbf65a4 Fix dialogs layout after keyboard shows up
Change-Id: I58e3984586e33855e95e5c2879e51f565759025b
Fixed: 27900202
2016-03-29 13:37:52 -07:00
Aga Wronska
b09985639f Add full bar mode for search view on small devices
Fixed: 27406434

Change-Id: I828ff72752cdb35dff453ea405209f169e550c1a
2016-03-28 09:14:47 -07:00
Aga Wronska
b85ec6d0ee Merge "Revert "Revert "Make status bar translucent. Make drawer appera below status bar."" with a fix for cts tests." into nyc-dev 2016-03-25 16:14:15 +00:00
Daichi Hirono
7352c55e78 Add new metric to DocumentsUI to record launch time.
BUG=27255964

Change-Id: I0bebdb95a0008ce087550849b4ca5fc5ead5c664
2016-03-25 19:04:39 +09:00
Aga Wronska
78efc9f3d2 Revert "Revert "Make status bar translucent. Make drawer appera below
status bar."" with a fix for cts tests.

This reverts commit 0574d169ba.

Change-Id: I33deeef839092956a67ec31bcdbfbbd540db8b68
2016-03-23 14:47:47 -07:00
Daichi Hirono
0574d169ba Revert "Make status bar translucent. Make drawer appera below status bar."
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
2016-03-23 17:29:06 +09:00
Aga Wronska
4e62716904 Change copy/move destination to Downloads when home directory is hidden.
Bug: 27791217
Change-Id: If196441a57053ada9875c6cc29d4c7f13fcb57e8
2016-03-22 14:18:43 -07:00
Aga Wronska
4639136c3b Make status bar translucent. Make drawer appera below status bar.
Change-Id: I6089a7b5d88514f5df9212839709d38daeb3be8b
Fixed: 27570567
2016-03-21 10:53:13 -07:00
Tomasz Mikolajewski
f9845b4ecf Merge "Add a performance test for launching DocumentsUI." into nyc-dev 2016-03-17 08:11:53 +00:00
Tomasz Mikolajewski
e46d7f93ad 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
2016-03-17 15:12:17 +09:00
Daichi Hirono
72843c13b6 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
2016-03-15 13:14:57 +09:00
Steve McKay
ce71082254 Centralize animation related resources.
Fix minor bug in animation (use height not width).

Change-Id: I357224086b2732fe9ad49a145db3e82259a87891
2016-03-11 13:50:03 -08:00
Steve McKay
f830017bd7 Show more menu items on larger devices.
Bug: 27036292, 27406771
Change-Id: I1ceee3c69fbda33a6c51c0ff4f28e52911c1ca7d
2016-03-08 15:15:48 -08:00
Steve McKay
b4672ef6df Merge "Always show intern storage." into nyc-dev 2016-03-02 18:49:28 +00:00
Steve McKay
7c4395804e Always show intern storage.
Only show debug root when devel mode is enabled.
Remove all traces of "advanced".

Bug: 27297398

Change-Id: Ie7e8be282531bd245351d56ababa8ca625c10fd2
2016-03-02 10:47:59 -08:00
Tomasz Mikolajewski
ae6d6b494c Add scaffolds for performance tests of DocumentsUI
Bug: 27370274
Change-Id: I14dea1b85cd84c8bb3c0eee27b2954108bfa4f8b
2016-03-02 13:01:11 +09:00
Steve McKay
a1f7680f53 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
2016-02-29 14:47:40 -08:00
Steve McKay
c95d87c983 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
2016-02-24 13:29:45 -08:00
Steve McKay
cddd034ca7 Merge "Move directory and roots support to own ui bots." into nyc-dev 2016-02-22 20:01:48 +00:00
Steve McKay
b9a20d10c9 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
2016-02-22 11:50:34 -08:00
Aga Wronska
893390bd58 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
2016-02-22 09:36:17 -08:00
Ben Kwa
b4cbd54ea9 Merge "Implement backspace support." into nyc-dev 2016-02-18 22:57:18 +00:00
Ben Kwa
359bbebb6d 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
2016-02-18 14:30:12 -08:00
Steve McKay
c265117881 Don't read raw root from State, use getCurrentRoot
Bug: 27213606
Change-Id: I9abf42672d914041ab710bd09886c0c4034b85b6
2016-02-17 11:22:50 -08:00
Tomasz Mikolajewski
3d988a969f Provide siblings in a sorted orders in DocumentsUI.
Bug: 27192158
Change-Id: Idefd2ba3027cd4630fcd2aefade9e6b4952e7125
2016-02-16 17:18:34 +09:00
Ben Kwa
2036dad877 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 1c9f9222e5)
2016-02-11 14:16:04 +00:00
Steve McKay
30ff5dd2c8 Merge "Automatically open roots pane if default dir is empty." into nyc-dev 2016-02-10 02:28:13 +00:00
Steve McKay
40d5d9d827 Merge "Don't apply fancy back logic when drawer is not present." into nyc-dev 2016-02-10 02:00:38 +00:00
Steve McKay
aa15dae22d Automatically open roots pane if default dir is empty.
Move drawer fiddling out of DirectoryFragment into respective
    FragmentTuner instance.

Bug: 27084308
Change-Id: Ia13fc2be1442e1a7164c2d67ea6ce4bcfda68bcc
2016-02-09 16:25:44 -08:00
Steve McKay
9146ac608c Don't apply fancy back logic when drawer is not present.
Add test coverage. Booya!

Bug: 27078649
Change-Id: Id2ce53009ee212b3af8d143091859d30e2bc76b1
2016-02-09 14:47:50 -08:00
Aga Wronska
e436f94f0e Go to root from child directory when root tapped.
Bug: 27060001

Change-Id: Iabe1f9f2c986904a4d827e74cf29b3de55e74f90
(cherry picked from commit 5652d175fe)
2016-02-08 23:38:07 +00:00
Steve McKay
f873769fba 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
2016-02-05 08:46:10 -08:00