796 Commits

Author SHA1 Message Date
Steve McKay
f862155e34 Move DirectoryFragment and family to dirlist pkg.
Stuff was getting out of control in the main package.

Change-Id: Ia06ba96f5bbe13388d51e6ad52a9dac76af97cc0
2015-11-04 15:04:57 -08:00
Geoff Mendal
fdefd0496e Import translations. DO NOT MERGE
Change-Id: I06b7fdd459fbb74d91376bc93ae8d035145d2234
Auto-generated-cl: translation import
2015-11-04 05:23:43 -08:00
Steve McKay
541b168c03 Merge "Show only selection count in ActionBar." 2015-11-03 22:52:09 +00:00
Steve McKay
dc127a0919 Merge "Don't show advanced menu in downloads ui." 2015-11-03 22:50:05 +00:00
Steve McKay
9c62fd8dd6 Don't show advanced menu in downloads ui.
Also, don't show search, and file size....and maybe others.

Bug: 25383741
Change-Id: I4bc867254b89011786fdf087b371974ee80d09da
2015-11-03 14:45:30 -08:00
Steve McKay
639938f3dc Merge "Handle SpacerItem on click correctly." 2015-11-03 22:42:20 +00:00
Steve McKay
35820cfe96 Handle SpacerItem on click correctly.
Bug: 13319202
Change-Id: I22f556f512f55cc09eead462a4eb8cea99dc5e64
2015-11-03 14:01:34 -08:00
Steve McKay
fafb81b74c Merge "Use StubProvider for functional tests." 2015-11-03 21:34:14 +00:00
Steve McKay
0c3c695469 Use StubProvider for functional tests.
Add a "UiBot" class for driving the UI from tests.
Add a "DocumentsProviderHelper" class for convenient test doc setup.
Update FilesActivityUiTest to use "TargetContext" which is
    necessary in order to perform ContentProvider
    operations.
Fix a bug where CopyTest relied on implicit order of roots.
Don't include guava in tests...since it breaks functional tests (incompatible class def).
Add test coverage for:
- basic roots list.
- basic files list.
- Live updates to files list.
- basic delete operations.

Bug: 24988170
Change-Id: I2ec01a5e1a474314cb33efb6e92df0f61dfcc1da
NOTE: This is currently broken at the point I try to init files in the stub roots.
2015-11-03 13:18:00 -08:00
Ben Kwa
68dfdb6525 Merge "Fix focus issues on animated items." 2015-11-03 20:00:40 +00:00
Ben Kwa
e48e4ca564 Fix focus issues on animated items.
Implement a custom ItemAnimator to enable focus to persist across change
animations in the DirectoryFragment's RecyclerView.

Note that this is a temporary stop-gap - a better fix would be to have
the RecyclerView restore focus to the appropriate item after a change
animation.

BUG=24802917

Change-Id: I4e4e6f758a2ea87e6235533860863c822d71a27a
2015-11-03 11:59:24 -08:00
Ben Kwa
c11f46f416 Merge "Update DocumentUI styles to match mocks." 2015-10-30 15:13:15 +00:00
Ben Kwa
a7e9eb04e2 Update DocumentUI styles to match mocks.
BUG=24870921

Change-Id: Ic91c9fbbe8c577c2276a4afc79753ba702c53733
2015-10-29 15:43:23 -07:00
Steve McKay
9f425a8ad0 Merge "Move FragmentTuners to new dirlist dir." 2015-10-29 20:03:20 +00:00
Steve McKay
5aacf1fdbd Show only selection count in ActionBar.
According to mocks.
Also, remove padding on RecyclerView.

Bug: 24542381
Change-Id: I8abfa96020fb457641605dc184079de92f8b265b
2015-10-27 16:54:16 -07:00
Steve McKay
d3f6f14c30 Move FragmentTuners to new dirlist dir.
Create a new "Manage" tuner for Downloads.
Aiming to reduce the single-file complexity of DirectoryFragment.

Change-Id: I22b04f776fbd1fdc02ca54083cb1e144eda60799
2015-10-27 16:01:48 -07:00
Daichi Hirono
decb832094 Merge "Show MTP roots at the bottom of root list." 2015-10-27 22:46:51 +00:00
Daichi Hirono
abf397458d Show MTP roots at the bottom of root list.
MTP is removable device, so we should show it at the buttom of volume
list.

BUG=24813611

Change-Id: I0b78405ec169d576de4c709bbe21b5bb9b856b87
2015-10-27 09:12:04 +09:00
Steve McKay
bbbb644a2e Delete TestDocumentsProvider.
We can use StubProvider.

Change-Id: I8a38acd86e2ce57ff50f05710cb7f7f4c1fec63d
2015-10-26 16:09:06 -07:00
Steve McKay
44063d7559 Merge "Address followup comments from 793838." 2015-10-26 20:51:09 +00:00
Steve McKay
1eafb666c2 Address followup comments from 793838.
Change-Id: Ie77112ea38796f970a8f688c1c94aeb05f46ab78
2015-10-26 13:27:59 -07:00
Ben Kwa
9f06a2f10d Merge "Fix a DocsUI crash due to a misnamed xml reference." 2015-10-26 19:12:50 +00:00
Steve McKay
01792570ba Add functional tests for FilesActivity.
Adds a bare bones test provider with dummy data.
This is basically just the bones of a test at this point.
Has just one simple test...switch list/grid modes.
Will add more tests (like manipulating the dummy data) in future CLs.

Bug: 24988170
Change-Id: Icc25718a416bc804874835c74a6d7862a52c9861
2015-10-26 12:10:40 -07:00
Ben Kwa
d7915d2ab2 Fix a DocsUI crash due to a misnamed xml reference.
BUG=25266394

Change-Id: I06bd3283e52467af3ebb43396d4166b3c25620a9
2015-10-26 11:54:41 -07:00
Steve McKay
e4e667e022 Revert "Treat UNKNOWN tooltype events as Mouse events."
https://buganizer.corp.google.com/u/0/issues/24904588 has been fixed.

This reverts commit 260c6980cef923792c352dc8143be5cb93a3af55.

Change-Id: I341513c06a7bfda364b0efd675e785ce766d5819
2015-10-22 13:59:09 -07:00
Steve McKay
edd0575b46 Don't try to delete files twice.
Also, apply delete in reverse order to placate RecyclerView.
TODO: Refactor this whole stack...needs some love.

Bug: 25091323, 24749296
Change-Id: I84e21c16423048bd50cd988eb1e2a36dc62b9d16
2015-10-22 09:44:48 -07:00
Ben Kwa
55b720c4d1 Merge "Implement enter key support for DocumentsUI." 2015-10-21 15:16:28 +00:00
Geoff Mendal
d9892a1ee3 Import translations. DO NOT MERGE
Change-Id: I1672581f5b8bd242f7c6a3daa9d09b772cce072c
Auto-generated-cl: translation import
2015-10-21 05:35:53 -07:00
Jeff Sharkey
87073654df resolve merge conflicts of 27ddeff723 to master.
Change-Id: I6dad081fc6dfafb78d5bd73d84e184bae7f6fd1b
2015-10-20 16:17:21 -07:00
Ben Kwa
bd96456d11 Implement enter key support for DocumentsUI.
- Add a click handler that basically handles all cases (including the
  enter key) of Items being clicked.
- Open the focused file in non-select mode, toggle selection if in
  selection mode.
- Remove now-redundant onSingleTapUp handlers.
- Redo focus indicator, since it's now possible to toggle selection on
  the focused file.
- Don't dismiss selection on arrow-key navigation.

BUG=24705453
BUG=25114155

Change-Id: Iba74188514ecf2bc6b56573087e3c3ccc83f85d2
2015-10-20 14:53:12 -07:00
Jeff Sharkey
355e53ecf0 Merge "Add locking when mutating RecentTasks." into mnc-dr-dev am: 1a4efb77dd
am: 3e9a3f3b71

* commit '3e9a3f3b71851c86bedbfc369787a4ce0ea5f2d8':
  Add locking when mutating RecentTasks.
2015-10-20 17:53:14 +00:00
Jeff Sharkey
3e9a3f3b71 Merge "Add locking when mutating RecentTasks." into mnc-dr-dev
am: 1a4efb77dd

* commit '1a4efb77dd3c503634f1f6495d931d1a570f51f5':
  Add locking when mutating RecentTasks.
2015-10-20 17:33:57 +00:00
Jeff Sharkey
a11234794a Add locking when mutating RecentTasks.
Otherwise there is a really rare race condition where we try tearing
down the tasks while we're still setting them up.

Bug: 25078914
Change-Id: Icf89241f9abec3fadc8606cfb4fbc029bbe91515
2015-10-19 17:46:08 -07:00
Steve McKay
669ebe7f63 Decouple gesture detection.
DirectoryFragment now uses an independent gesture detector.
Move early event-handling logic out of listener into the handler class.

Change-Id: Ie8a01b1507c8a8aa74355ead38feb7b802029540
2015-10-19 21:59:56 +00:00
Steve McKay
8f8b5d58de Merge "Enable explicit package for quick view intent." 2015-10-19 16:30:09 +00:00
Steve McKay
3b2ad11fca Enable explicit package for quick view intent.
Define the package in config...suitable for setup via overlay.
Undefined by default makes the feature disabled on phones...n stuff.
Fall back to single-file QUICK_VIEW.
Work around 24963914 (for now).

Bug: 24963914
Change-Id: Ia9c5a606d294ae053fd5e60d015f0aa0010eba4f
2015-10-16 16:33:38 -07:00
Ben Kwa
8250db41cb 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
2015-10-16 15:41:59 -07:00
Steve McKay
5ff818e985 Merge "Performe save when ENTER is pressed." 2015-10-15 18:48:19 +00:00
Steve McKay
0c2a0a811f 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
2015-10-15 10:35:55 -07:00
Ben Kwa
097fb1317a Merge "Fix the position of the "Recents" root in DocumentsUI." 2015-10-13 19:54:23 +00:00
Ben Kwa
b2865d2339 Fix the position of the "Recents" root in DocumentsUI.
BUG=24329078

Change-Id: Ia71b80b2075b34076c4f7802bcc45a13e95775e6
2015-10-13 12:17:13 -07:00
Ben Kwa
15a1fc375e Merge "Reorganize DocumentsUI roots fragment to match mocks." 2015-10-13 14:42:52 +00:00
Ben Kwa
0c64308240 Reorganize DocumentsUI roots fragment to match mocks.
BUG=24329078

Change-Id: I80fe7b939772d929236aa9e0e6fa44cdb606a038
2015-10-13 07:41:06 -07:00
Steve McKay
260c6980ce Treat UNKNOWN tooltype events as Mouse events.
Temporary fix for CTS.
Eventually we'll need to update UiAutomator to support specific input tooltypes.

Bug: 24544391
Change-Id: Ief339d0d35c4305811928e9605b535c7ef230f7b
2015-10-12 16:24:07 -07:00
Steve McKay
e1b924921a Merge "Rename "recyclerView" to "list" fixing some of CTS." 2015-10-10 15:54:20 +00:00
Steve McKay
d20f87dad8 Rename "recyclerView" to "list" fixing some of CTS.
Bug: 24544391
Change-Id: I2ca74e2a007ec733092d4cb3f84b40c64392c766
2015-10-10 15:53:26 +00:00
Jeff Sharkey
38f4313707 am 386d7900: am e0210648: am a0ef1048: am d473a144: Merge "Hold wake-lock during copy operations." into mnc-dr-dev
* commit '386d7900467ca52d48daf70d07498f10ae48aa80':
  Hold wake-lock during copy operations.
2015-10-08 17:29:50 +00:00
Jeff Sharkey
e0210648d8 am a0ef1048: am d473a144: Merge "Hold wake-lock during copy operations." into mnc-dr-dev
* commit 'a0ef104882b1a0edd79badb2f327cc8722f76bb2':
  Hold wake-lock during copy operations.
2015-10-08 17:09:29 +00:00
Jeff Sharkey
a0ef104882 am d473a144: Merge "Hold wake-lock during copy operations." into mnc-dr-dev
* commit 'd473a1446e520616c4079594bbcf3c6fbe88ed4f':
  Hold wake-lock during copy operations.
2015-10-08 17:02:38 +00:00
Ben Kwa
c91300490c Merge "Implement Home and End key navigation in DocumentsUI." 2015-10-07 21:18:43 +00:00