772 Commits

Author SHA1 Message Date
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
Geoff Mendal
b5e171529d Import translations. DO NOT MERGE
Change-Id: I93f82678f52420dcbaf1cd8850d76429a9c6679d
Auto-generated-cl: translation import
2015-10-07 05:25:12 -07:00
Ben Kwa
0ee0f9a02d Implement Home and End key navigation in DocumentsUI.
Add a handler to shift focus to the first and last files when the home
and end keys (respectively) are pressed.

BUG=24682598

Change-Id: I82db67d0d0f8292b1dad966defa68800496d59f2
2015-10-06 11:12:14 -07:00
Ben Kwa
f91869deac Merge "Use app compat theme for DocsActivity." 2015-10-06 01:13:25 +00:00
Steve McKay
32b96e1110 Use app compat theme for DocsActivity.
This make things super UGLAY, but unbreaks them.

Bug:24544391
Change-Id: Id91e7b41cab08f1158f4821fa75be9b3ad79a428
2015-10-05 17:42:05 -07:00
Steve McKay
0651688a33 Merge "Don't explicitly foreground tasks." 2015-10-05 22:07:28 +00:00
Ben Kwa
44c44f7b37 Merge "DocumentsUI: Enable focus on directory contents." 2015-10-05 22:00:30 +00:00
Steve McKay
c2dbc74942 Don't explicitly foreground tasks.
Get out of the way of documentLaunchMode, let ActivityManager do the work for us.
Quiet some noisy logging.

Bug: 24413182
Change-Id: Ia48244871296f5c6b83a838dcde6496acbd45793
2015-10-05 14:49:16 -07:00
Ben Kwa
641d53a7eb DocumentsUI: Enable focus on directory contents.
- Enable the focus bit on grid and list items.
- Add (ugly placeholder) styles so we can see the focused item.

BUG=24677520

Change-Id: I29fc09cd24c67d50f93937030606dbfc64962932
2015-10-05 14:33:09 -07:00
Geoff Mendal
21abf4c6f6 Import translations. DO NOT MERGE
Change-Id: I45ea38ee24c31b6144f99f8b7239200c1f870fbb
Auto-generated-cl: translation import
2015-10-05 05:19:25 -07:00
Steve McKay
5bbae10c4c Normalize and improve menu fiddling.
Also, don't show copy/paste menu items (though they can still be invoked via keyboard).
Show copy to /move to instead.

Change-Id: I6e7bdf35bf370ea30d4f12a5a200ad38ff0221f4
2015-10-02 09:48:27 -07:00
Jeff Sharkey
3c12a7c6d7 Hold wake-lock during copy operations.
If the CPU goes to sleep during the copy, certain devices will
collapse the USB OTG power domain, which can cause user data loss.

Bug: 24574575
Change-Id: I8e26caac8784490d2dee324b38e6085cd55eb8bb
2015-10-02 08:55:22 -07:00
Steve McKay
8359eaafa2 Merge "Provide previous stack when opening new window." 2015-10-01 17:48:41 +00:00
Ben Kwa
a4a28f1f7a Merge "Consolidate unit tests." 2015-09-30 22:19:56 +00:00
Ben Kwa
272c02041c Consolidate unit tests.
- Move all unit tests to be run under the android framework.
- Add a unit test for ag/776629
- Make DirectoryFragment.Model tests properly simulate finalization conditions.

Change-Id: Ie33d097154d464149fd8c0c24bf66ada677db4ad
2015-09-30 15:12:52 -07:00
Ben Kwa
cf34ce8e22 Merge "Switch DocumentsUI over from Toasts to Snackbars." 2015-09-30 21:50:34 +00:00
Ben Kwa
94b486d32c Switch DocumentsUI over from Toasts to Snackbars.
Add a new top-level CoordinatorLayout to ensure proper operation of the
snackbar.
Switch all Toast code over to use Snackbar.

BUG=24474629

Change-Id: Iafffb35be6115cbac9304fd44e77e73b6be40c17
2015-09-30 14:47:55 -07:00
Ben Kwa
68da5bf488 Merge "Disable productivity mode by default." 2015-09-30 17:03:30 +00:00
Steve McKay
323ee3ec09 Provide previous stack when opening new window.
EXTRA_STACK support was already in place (from CopyService).
Add "isRootUri" to DocumentsContract.

Bug: 24410611
Change-Id: Ia380030216323d1272ef247280582e4b55b83c42
2015-09-29 16:59:11 -07:00
Ben Kwa
7a52b6b70b Disable productivity mode by default.
Productivity mode is a flag that was designed to be enabled only in
andromeda builds.  It should not be enabled in the base-level package.

BUG=24474568

Change-Id: I048bae9d3cf8270503cf245ed1e6959dab68571c
2015-09-28 15:54:27 -07:00
Baligh Uddin
f48b491d4e Merge "Import translations. DO NOT MERGE" 2015-09-27 03:05:22 +00:00
Baligh Uddin
b51a47dc6e Import translations. DO NOT MERGE
Change-Id: Ideadb94b604cb761566eb1f0d46bc88a9e411380
Auto-generated-cl: translation import
2015-09-25 22:39:56 -07:00
Steve McKay
9f9d5b432d Add support for opening multiple windows.
Installs an intermediate activity that manages tasks.

Bug: 20562850
Change-Id: If2d0a125b0630c27af07666b0f6a712f58243e9f
2015-09-25 14:46:14 -07:00
Ben Kwa
6fd4f7f7c3 Merge "Activate selection mode when selecting via mouse." 2015-09-25 14:58:42 +00:00
Ben Kwa
bd7da4c44e Activate selection mode when selecting via mouse.
Modify the MultiSelectManager so that toggling selection on an item
notifies listeners of selection changes, if necessary.  This fixes a bug
where notifySelectionChanged wasn't getting called when the selection
changed.

BUG=23944862

Change-Id: I3aef41cc92c560dc15bdc0fe310c340bdb3005f6
2015-09-25 07:47:56 -07:00