1094 Commits

Author SHA1 Message Date
Steve McKay
4a1ca86f47 Don't show recents as copy/move destination.
Revoke "SUPPORTS_CREATE" from the Recents faux-Root.
Don't allow copy to roots that don't support children.
Add friendly access methods to Root info for checking flags.
Only show spacer between roots sections when both non-empty.
Add docs explaining the "apps" section in roots.
Improve logic in the "canCopy" method.

Bug: 27232639
Change-Id: If78ee0ff73f0788de863345b560aecd41b23dfb9
2016-02-17 18:52:03 -08:00
Tomasz Mikolajewski
32a34d3379 Limit number of ClipData items for a quick viewer to 1000.
Bug: 20822219
Change-Id: I774be914ddeea0335dc646000a1d5c997ea73fd4
2016-02-18 00:54:26 +00:00
Ben Kwa
6f4de5b6a1 Merge "Fix focus issues on RV." into nyc-dev 2016-02-18 00:19:21 +00:00
Steve McKay
9a0fc1f680 Merge "Improvements to Copy/Move flow." into nyc-dev 2016-02-17 23:40:58 +00:00
Steve McKay
a6bbeab1d3 Improvements to Copy/Move flow.
- Always open drawer for copy/move operations.
- Set title to match operation.
- Update button to say "move" for move operations.
- Other minor fixes.

Also fix "Home" tests broken by ag/867110

Bug: 26506479
Change-Id: I3ccb4ddc72be0a21b91744bcb610c1ca490ac30c
2016-02-17 15:39:58 -08:00
Felipe Leme
014a0d11c7 Merge "Removed Intent.OPEN_EXTERNAL_DIRECTORY." into nyc-dev 2016-02-17 22:43:20 +00:00
Felipe Leme
34a9d52719 Removed Intent.OPEN_EXTERNAL_DIRECTORY.
Such intent is now encapsulated by StorageVolume.createAccessIntent().

BUG: 26742218

Change-Id: I2e2bd71126ecd74981f77b0af7d069f51aaece74
2016-02-17 14:38:25 -08:00
Ben Kwa
86bf12397b Fix focus issues on RV.
Don't set focusable=false - that's the wrong thing to do, per Yigit.
For now, just temporarily make the RV unfocusable while performing the
focus search for kb navigation.

BUG=27221751

Change-Id: I37ed77eb2aecf522a85c8a7c181e89c0bf73765d
2016-02-17 14:12:11 -08:00
Steve McKay
a3b936aa55 Merge "Guard against NPE in equals checks." into nyc-dev 2016-02-17 20:41:28 +00:00
Steve McKay
30551a257c Guard against NPE in equals checks.
Update State test to cover different conditions separately.
Update DirectoryInfo test to best practices.
Update RootInfo to follow DirectoryInfo equals pattern.
Also, allow null cursors from Model...since they happen...I seen it mahself.

Bug: 27118725
Change-Id: Id0a0be053b91c887a745bfca5416e64f0edba995
2016-02-17 12:35:51 -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
Steve McKay
25a7ee08f6 Merge "Remove "HOME" directory. Use "Documents" instead." into nyc-dev 2016-02-17 17:46:24 +00:00
Geoff Mendal
fb7a4e73de Import translations. DO NOT MERGE
Change-Id: Ic8d25da29dbdb3132a51bef32045c166f48b8bc6
Auto-generated-cl: translation import
2016-02-17 07:11:49 -08:00
Tomasz Mikolajewski
7d37da7086 Merge "Provide siblings in a sorted orders in DocumentsUI." into nyc-dev 2016-02-17 07:04:17 +00:00
Steve McKay
ab3b8936dc Remove "HOME" directory. Use "Documents" instead.
Use "Folder" as home icon for now.

Bug:27148009
Change-Id: I9f57bba1c8e51ae7887861923f5baa8f69ec2e6e
2016-02-16 14:52:35 -08:00
Aga Wronska
f9b78bb69d Merge "Fix focus issues in directory fragment * Empty directory view gets focus when shown * Skip opening drawer when showing empty search results * Fix typo" into nyc-dev 2016-02-16 18:29:50 +00:00
Aga Wronska
d4b1753170 Fix focus issues in directory fragment
* Empty directory view gets focus when shown
    * Skip opening drawer when showing empty search results
    * Fix typo

Bug: 27109140
Change-Id: Ie62d48e1c3f78e5244d88067587b3e5986f99a03
2016-02-16 10:15:24 -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
Tomasz Mikolajewski
cc0a0a39f8 Merge "Display correct icons in grid view." into nyc-dev 2016-02-16 08:04:36 +00:00
Tomasz Mikolajewski
4e708cb205 Display correct icons in grid view.
Bug: 27183062
Change-Id: I4c0fafc7bc6f0e2dc3d1cbdf3debf6312bb85d82
2016-02-16 17:03:16 +09:00
Geoff Mendal
72e09aef9b Import translations. DO NOT MERGE
Change-Id: Icea0738fea2c10d4f4c55d4a5e1febd362dcbd3f
Auto-generated-cl: translation import
2016-02-15 07:16:11 -08:00
Aga Wronska
c4524a97c4 Merge "Fix Rename Document tests" into nyc-dev 2016-02-13 00:57:24 +00:00
Aga Wronska
5784996fdc Fix Rename Document tests
Bug:27109148
Change-Id: I489b2bd25f92ebc2b9b84d9cefe1f785a89c89ff
2016-02-12 16:53:52 -08:00
Tomasz Mikolajewski
48599c0668 Do not show directory change animation on screen rotation.
When more than one level deep directory is opened.

Bug: 27090439
Change-Id: I73e789a820af3b710f0981ac12f5ea43cc389cf6
(cherry picked from commit f908640fd07b4734b8ef235ed2849ea20c55acab)
2016-02-12 04:24:58 +00:00
Ben Kwa
c345079b74 Handle spacebar events.
Space/Shift-space scrolls the files list up/down.

BUG=25195555

This is a re-land of ag/864217.

Change-Id: I496d43d8a0c0833493ec2d5b36ecb7cbeb619853
2016-02-11 13:39:33 -08:00
Ben Kwa
d3107e8894 Merge "Revert "Handle spacebar events."" into nyc-dev 2016-02-11 21:20:08 +00:00
Ben Kwa
be660049bb Revert "Handle spacebar events."
This reverts commit ef8eb5c9dd45cc94219d6e889d026f53ecc5c7e9.

Change-Id: I6c473d09eae8289da1deb86a8f043aa88de4c6f0
2016-02-11 21:19:54 +00:00
Ben Kwa
d7211c85d6 Make left- and right- arrow jump rows in grid mode.
Like ChromeOS.  Pressing left at the beginning of a row of files in grid
mode, will move focus up to the end of the preceding row.  Analogous
behaviour for right-arrow at the end of a row.

BUG=27127282

Change-Id: I3b36c1da6559aaf01558807913502f8ab87a9e6e
(cherry picked from commit f55e5b714d4adc9f343ab7e691a6846ffa6cd7b1)
2016-02-11 21:11:45 +00:00
Ben Kwa
4a993b240d Merge "Allow multiple range selections using the shift key." into nyc-dev 2016-02-11 21:08:53 +00:00
Ben Kwa
844674f99f Merge "Handle shift-enter key events." into nyc-dev 2016-02-11 21:07:12 +00:00
Ben Kwa
83df50f997 Allow multiple range selections using the shift key.
- Introduce an API on MultiSelectManager for starting/ending range
  selections.

- Navigation with the shift key pressed extends the current range
  selection (or starts a new one, if one isn't in progress).

- Navigation without the shift key pressed will end the current range
  selection.

BUG=27124371

Change-Id: Ieddf3ee816812bf5210463536fe63179ef1809ad
(cherry picked from commit 09792ef1506f4cbd944e16651508be435d92c5be)
2016-02-11 21:01:04 +00:00
Ben Kwa
09eb77be9a Handle shift-enter key events.
Shift-enter toggles selection on the focused item.

BUG=25196158

Change-Id: I261c249cdf1856d134910a4767b0daf8963d5b68
(cherry picked from commit e0e36df29484bf6b0b34fb958701ed7ddd96a40a)
2016-02-11 20:56:09 +00:00
Ben Kwa
ef8eb5c9dd Handle spacebar events.
Space/Shift-space scrolls the files list up/down.

BUG=25195555

Change-Id: Ib6351831db77a930920610106cc1da2b710532c6
(cherry picked from commit 870fea3b03d94335b9c7234103bde8fbf813743f)
2016-02-11 20:55:29 +00: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 1c9f9222e56482682461013b703590c5c9471018)
2016-02-11 14:16:04 +00:00
Aga Wronska
405da7c59b Merge "Improve document rename experience - Initially select the name of the file without extension - Trigger renaming action when software keyboard Done button pressed - Trigger creating new directory when software kayboard Done button pressed" into nyc-dev 2016-02-10 18:19:50 +00:00
Geoff Mendal
4e60b1f041 Merge "Import translations. DO NOT MERGE" into nyc-dev 2016-02-10 15:40:51 +00:00
Geoff Mendal
dd69f76c7b Import translations. DO NOT MERGE
Change-Id: I24d659d05ccb735b984b23fc40fe4d69c768f5c0
Auto-generated-cl: translation import
2016-02-10 07:19:37 -08:00
Ben Kwa
fabd228168 Update the subdir icon to svg.
BUG=21705832

Change-Id: I400b5402c0efd34d79be3e8b05b2154dd8c48735
(cherry picked from commit 032c283ef32f72d038b8a989366b184d68ccfd0e)
2016-02-10 15:14:27 +00:00
Ben Kwa
b0bfe2df6f Move focus-related code out of DirectoryFragment.
BUG=25195767

Change-Id: Ibf2247a81e8903924037b5f01305593219a8c068
2016-02-10 07:07:09 -08:00
Steve McKay
7ed21c2f00 Don't die if dirKey hasn't been set in Selection.
Some times the raw selection in State can be saved....raw.

Change-Id: Ibf4efab31fffc99baa25ba415f8b53c110aa81f3
2016-02-09 19:05:05 -08:00
Steve McKay
e852d93e1d Preserve selection across device rotation.
Also, update Selection model to use a discrete provisional selection,
   rather than a superset "total" selection

Bug: 27075323
Change-Id: I855e6b66010b3cdd599cc0a9f0046a7efadca5fe
2016-02-09 18:52:45 -08: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
Tomasz Mikolajewski
65d9a51afa Fix flakiness of testFilesList_LiveUpdate.
Change-Id: I87618d5640e2e17de3188554d561abc5f3a3152a
(cherry picked from commit 1008c2d4878abde1890560ef48eec229a4253445)
2016-02-10 02:11:37 +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
Aga Wronska
3b5a29cb5d Merge "Go to root from child directory when root tapped. Bug: 27060001" into nyc-dev 2016-02-09 23:58:42 +00: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
Ben Kwa
1e2fa5e79f Implement PgUp/PgDn support. (cherry-pick DO NOT MERGE)
- Clean up our LayoutManager code.  We actually only need a single
  layout manager, since a GridLayoutManager is a LinearLayoutManager,
  and list layout is simply grid layout with one column.  Make it so.

- Use the layout manager to compute item offsets for one page's worth of
  items.  Use that to implement page up/page down.

BUG=25195770

Change-Id: I23ddd5fd38532682e7f099b44e188d8c3fec02be
(cherry picked from commit 4d4bf9a21a16bae3497f94dbb558a2ede9d989ee)
2016-02-09 18:06:11 +00:00
Tomasz Mikolajewski
eb33c0a53f Cleanup sliding animation between directories.
The shadow is restored + redundant fade removed.

Bug: 26986946
Change-Id: I31dde7d03f60be470e1c5e06dcdce828d3e4eaa0
(cherry picked from commit 3134ddf99d4215041ed749f3b4e682a1910d208e)
2016-02-09 09:20:53 +00:00
Tomasz Mikolajewski
3d911ea095 Fix animation for the empty cabinet, also make other animations less jarring.
Setting android:animateLayoutChanges=true was causing flickering and problems
with sliding the cabinet while a fragment transition was already in progress.

Bug: 27060052
Bug: 26952361
Change-Id: I17e5f8b57d63cd9a586fc70ae43e030c4f232e8d
(cherry picked from commit ed82fd784301c645cb665517edc3006888d6f237)
2016-02-09 09:16:53 +00:00