934 Commits

Author SHA1 Message Date
Steve McKay
9ed88a4da7 Show empty file cabinet for no search results.
And for empty directory.

Magic-submit? Yes please!

Change-Id: If9e1f8ab48eebd9c275ad043da728e28b850ab73
2016-01-22 11:59:16 -08:00
Steve McKay
17fefe5b1a Merge "Move delete support into FileOperationService." 2016-01-21 21:38:41 +00:00
Ben Kwa
760199ea72 Merge "Rework selection handling for items in the DirectoryFragment." 2016-01-21 21:28:46 +00:00
Ben Kwa
0436a75721 Rework selection handling for items in the DirectoryFragment.
- Remove the gesture detector from the MultiSelectManager, and
  consolidate gesture detection and event dispatch logic in
  DirectoryFragment.GestureListener.

- Route single-tap events through the DocumentHolder, so that it can
  apply view-specific logic, like making a tap on the item's icon
  select rather than activate.

- Consolidate event handling logic in the ItemEventListener.

- Add new unit tests for DocumentHandler.

BUG=24326546

Change-Id: Id15cdd11b13e4c063c1baff95aa8ee09c190d6c3
2016-01-21 12:18:01 -08:00
Steve McKay
3564543e1e Move delete support into FileOperationService.
Refactor Jobs to work with files from multiple providers.
Don't shut down threadpool until service#onDestroy is called.

Bug: 26696797, 26462789, 26567205, 25162803, 26714663
Change-Id: Id43e8e3dc2294cd07dcd6a3477b19efb298c260f
2016-01-21 12:16:04 -08:00
Tomasz Mikolajewski
98bc797dac Merge "Do not launch a quick viewer unless it's whitelisted." 2016-01-21 05:13:33 +00:00
Tomasz Mikolajewski
c2b1237ca5 Do not launch a quick viewer unless it's whitelisted.
Bug: 26697917
Change-Id: Ibe2c7c462380c219d6ce5b5c69af6dac0df62d41
2016-01-21 12:38:03 +09:00
Tomasz Mikolajewski
6704808b4b Fix copying virtual files.
Change-Id: I35556f3be7c268a939285926e1e92487a0a6199d
2016-01-21 10:13:59 +09:00
Steve McKay
cdcf99bc08 Merge "Support for concurrent file operations." 2016-01-20 20:05:02 +00:00
Steve McKay
ecbf3c504c Support for concurrent file operations.
Swith to using a regular service.
Perform file ops on thread pool.
Separate Job tests from service test.
Check in service test that wake lock is released and service shut down.
Increase copy buffer size to 32k (suggested by mtomasz).
Rework Copy testing to use an out-of-process provider (which has caused a content validation problem).
Move copy testing logic into base test and share it with Move testing.

Change-Id: I2f97d6c9f23c205b0f39ca6ba93bec119d63c80b
2016-01-20 11:45:47 -08:00
Aga Wronska
f6a31d319f 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
2016-01-19 13:29:09 -08:00
Aga Wronska
9e74b3b88d Merge "Add Search View UI tests" 2016-01-15 18:30:53 +00:00
Aga Wronska
619f3be0fa Add Search View UI tests
Change-Id: I67726e7764ec147c5987cbf737f763c3146f5766
2016-01-15 09:49:36 -08:00
Ben Kwa
e2610c4148 Merge "Swap in the correct home icon." 2016-01-14 17:19:36 +00:00
Ben Kwa
33a610dea7 Swap in the correct home icon.
BUG=25793423

Change-Id: I55ef5fbc6d6c1497ef4b761f3af236ba5e7e6bbe
2016-01-14 08:21:05 -08:00
Daichi Hirono
9297a0fb2a Merge "Check isDestroyed after finishing async HandleRootsChangedTask." 2016-01-14 03:59:12 +00:00
Daichi Hirono
a796746198 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
2016-01-14 12:45:49 +09:00
Steve McKay
f3b34603de Merge "Stop listening root change events when the activity is destroyed." 2016-01-13 18:21:08 +00:00
Daichi Hirono
da19ee00a3 Stop listening root change events when the activity is destroyed.
BUG=26454244

Change-Id: I4be98f21843d6d501dd9c6fc343e905e107fc1c1
2016-01-13 13:19:02 +09:00
Ben Kwa
b0fed2b72e Merge "Embiggen the progress bar." 2016-01-12 21:56:39 +00:00
Ben Kwa
a66cebde23 Embiggen the progress bar.
BUG=26159818

Change-Id: I12a33be503dd29d03cb85b814b287879c016275d
2016-01-12 13:36:44 -08:00
Steve McKay
76be620a6f Grid view padding + explicit background.
Also move section break holder into the wrapper class.

Change-Id: I949e81af180f11514aff558615cfeda44cb96a3c
2016-01-12 11:41:26 -08:00
Steve McKay
da161f0b17 Merge "Fix bug where both list and grid buttons are visible." 2016-01-11 23:33:00 +00:00
Aga Wronska
d3b8e52009 Merge "Keep Search View visible after search completed Improve Search View behavior Add Search View background color" 2016-01-11 23:05:43 +00:00
Aga Wronska
97831485e7 Keep Search View visible after search completed
Improve Search View behavior
Add Search View background color

Bug:26143355
Change-Id: Ifdc4bfff56fc6244c571dfbeff4179e1515d53b7
2016-01-11 14:58:18 -08:00
Ben Kwa
22f5fce70b Merge "Move the "home" root below the divider." 2016-01-11 17:38:30 +00:00
Ben Kwa
e95c321fd9 Move the "home" root below the divider.
BUG=26143357

Change-Id: Ia48aa141f265aa3b1b6a07ec966dc9da6d283de3
2016-01-08 17:24:59 -08:00
Ben Kwa
d20d01061c Merge "Increase the stability of sorting in the Model." 2016-01-09 01:05:06 +00:00
Ben Kwa
e2564f9f19 Increase the stability of sorting in the Model.
This is necessary to prevent UI thrash (items continually shuffling
around) when the underlying Provider doesn't return its contents in a
stable order from one load event to another (DownloadStorageProvider is
an example).

BUG=26417297

Change-Id: Ie99e56b610f5d01d5318be07c0379b506c828735
2016-01-08 16:59:20 -08:00
Steve McKay
7c7e684b78 Fix bug where both list and grid buttons are visible.
Bug: 26456290
Change-Id: I41d97d7ce33a193b6a9591609deadf9690b00ba7
2016-01-08 14:59:56 -08:00
Ben Kwa
53aaec12bc Merge "Hide the divider in list mode." 2016-01-08 22:57:28 +00:00
Ben Kwa
90bf9f5f28 Hide the divider in list mode.
BUG=26399570

Change-Id: I5013bf9ae80c003419f3f22dcf2a7e6787c19711
2016-01-08 13:31:11 -08:00
Ben Kwa
433df5c865 Merge "Fix home key behaviour when there are no subdirs in cwd." 2016-01-08 20:58:24 +00:00
Ben Kwa
2ad8214916 Merge "Fix shift-selection." 2016-01-08 20:57:40 +00:00
Ben Kwa
2613802d4b Fix shift-selection.
The shift-selection code was failing to correctly anchor the selection
prior to shifting focus.  This meant that the first shift-navigation
event (i.e. starting from non-selection mode) would not select the right
set of stuff.

BUG=26459949

Change-Id: I62ed959fb549198c503cfd2131d2499f9a61f7e5
2016-01-08 12:56:10 -08:00
Ben Kwa
f5ce1035d4 Fix home key behaviour when there are no subdirs in cwd.
The divider is extraneous when a directory contains only subdirs, or
only files.  The "only dirs" case works (the divider is omitted) but in
the case where a directory contains only files, a divider gets inserted
at position 0, which messes up navigation.  This change adds code to
avoid adding a divider when a directory contains only files.

BUG=26406821

Change-Id: I7333911baf94e34bf428a3dd18b55694a73e3a62
2016-01-08 11:36:55 -08:00
Ben Kwa
2e8bafc38b Merge "Add checkmark icons for selection." 2016-01-08 17:06:29 +00:00
Daichi Hirono
3360de1ea8 Merge "Fix document stack." 2016-01-08 05:34:59 +00:00
Daichi Hirono
7f34b20a70 Fix document stack.
We need to add document to stack by using 'push' method instead of 'add'
method.

BUG=26437613

Change-Id: I3e4ac6b0d03cacbe2d6cdd93443ce1c96c8c47d9
2016-01-08 14:33:11 +09:00
Ben Kwa
ddc3d21ef9 Add checkmark icons for selection.
- Add a new checkmark icon.
- Modify the grid and list items to include the check icon in the
  appropriate location.
- Add code to various DocumentHolder subclasses to cross-fade between
  icons when things are selected/deselected.
- Create new dimensions quantities to represent new icon sizes.
- Clean up xml files.

BUG=24326546

Change-Id: Ib3f04c8274d35ac3b95ed13730df340e8b7c36c6
2016-01-07 19:05:32 -08:00
Steve McKay
8c83d3304a Merge "CopyService generalization." 2016-01-08 02:40:34 +00:00
Daichi Hirono
3b36c5a10b Encapsulate stackTouched logic into State class.
BUG=26437613

Change-Id: I84a667cb3561d395daac4e63d9eaca589c8f1fea
2016-01-08 11:26:46 +09:00
Steve McKay
14e827a958 CopyService generalization.
Make the service operation agnostic, so we can also move delete operations to it.
In a followup change we'll see about adding support for multiple concurrent
    operations. We'll need to evaluate how to do this in IntentService (which
    serializes requests....a major limitation).

Change-Id: I03eca9c1ecaba519af42d88edffeb0dce78bd1da
2016-01-07 16:29:36 -08:00
Tomasz Mikolajewski
4b6ac4a359 Merge "Revert "Revert "Remove the flag and make openTypedDocument throw FileNotFoundException.""" 2016-01-07 07:19:56 +00:00
Tomasz Mikolajewski
75395651c2 Revert "Revert "Remove the flag and make openTypedDocument throw FileNotFoundException.""
This reverts commit 2b931719783cda11c3bbac9928c603d0a0a06d43.

Change-Id: Ic61b874012daeada02b73643f5c58f9ec840b3e5
2016-01-07 07:19:22 +00:00
Tomasz Mikolajewski
97dd67cc34 Merge "Revert "Remove the flag and make openTypedDocument throw FileNotFoundException."" 2016-01-07 04:47:42 +00:00
Tomasz Mikolajewski
2b93171978 Revert "Remove the flag and make openTypedDocument throw FileNotFoundException."
This reverts commit 95149ab6a5442a05f05f448854b6ab386c87f717.

Change-Id: I218aa8059ef674400dac8531a86cd326748c26d5
2016-01-07 04:47:03 +00:00
Tomasz Mikolajewski
5a22e1a19d Merge "Remove the flag and make openTypedDocument throw FileNotFoundException." 2016-01-07 03:52:01 +00:00
Tomasz Mikolajewski
95149ab6a5 Remove the flag and make openTypedDocument throw FileNotFoundException.
To be compatible with ContentProvider, DocumentsProvider should not
require checking for a flag before calling openTypedAssetFile.

This CL removes the flag, and makes the default implementation throw
FileNotFoundException instead.

Bug: 26222645
Change-Id: I3492f05804e39583ebb8584109c7017b3082846e
2016-01-07 03:49:14 +00:00
Daichi Hirono
1830c2aa55 Merge "Leave from the current root when the root is removed." 2016-01-07 01:18:34 +00:00