1144 Commits

Author SHA1 Message Date
Steve McKay
327c31383f Mark Recents as supporting CREATE.
Allows Recents as copy/move destination.
Allows Recents (create fragment) for CREATE actions.

Change-Id: I46c4792470d2361c62b26e4a66521d56ce3da474
2016-02-26 15:31:15 -08:00
Aga Wronska
95f44e8f8e Merge "Clear selection mode when changing root" into nyc-dev 2016-02-26 21:32:27 +00:00
Aga Wronska
d559743a0d Clear selection mode when changing root
Bug: 27364691, 27142316
Change-Id: I961f3eef67b51a2de999d34edbacd21e4b51c2a4
2016-02-26 13:26:35 -08:00
Aga Wronska
f6fde7e044 Merge "Don't translate our trusted quick view package val." into nyc-dev 2016-02-26 19:30:00 +00:00
Steve McKay
0a544d5aeb Don't translate our trusted quick view package val.
Change-Id: I74574e38705940b72be8afc8e3ec163fb6ccdef4
2016-02-26 11:27:09 -08:00
Steve McKay
7a3b811122 Delete confirmation and notification improvements.
Bug: 27344527, 27347647, 27136182
Change-Id: Ia33f05b449a0bc30704e116287e18094e30382e0
2016-02-25 15:47:16 -08:00
Ben Kwa
355d731ece Merge changes from topic 'dragon-drop' into nyc-dev
* changes:
  Clean up after a drop event.
  Enable dragon drop for touch.
2016-02-25 18:32:48 +00:00
Ben Kwa
1b685e5363 Clean up after a drop event.
- Clear the drop target highlight.
- Exit selection mode.

BUG=27296889

Change-Id: I869bd01cb49555b28b19164638b4c0af48ca8583
2016-02-25 07:44:58 -08:00
Ben Kwa
e3dfebf846 Enable dragon drop for touch.
- Start a drag when the user long-presses on an already-selected item.
- Start a drag when the user mouse-drags on an already-selected item.
- Add highlighting of drop targets.

BUG=20556237

Change-Id: I450fd6768eeb08906304227385476942d641fd11
2016-02-25 07:35:30 -08:00
Aga Wronska
5099cca93d Merge "Launch the activity with the test root opened for tests to reduce some flakiness and save time used on opening test root over and over again." into nyc-dev 2016-02-25 02:06:33 +00:00
Aga Wronska
b9eeee1543 Launch the activity with the test root opened for tests
to reduce some flakiness and save time used on opening test root over
and over again.

Bug: 27271765
Change-Id: I6fa191ed8e0c7e8e071e4dd17c62aab5db1e23a5
2016-02-24 16:34:43 -08:00
Ben Kwa
c2dd99a6da Merge "Type-to-focus improvements." into nyc-dev 2016-02-24 21:55:44 +00:00
Ben Kwa
435653451c Merge "Fix a crash when browsing empty roots." into nyc-dev 2016-02-24 21:52:49 +00:00
Ben Kwa
22937c9fc7 Type-to-focus improvements.
- Fix handling of tab and backspace keys while in type-to-search mode.
- Fix search term highlighting on directory items in grid view.
- Switch to a time-based search model.  Typing starts a search.  The
  current search expires if no keys are pressed for 500 ms.
- Make type-to-focus case-insensitive.

BUG=27336167
BUG=27324974

Change-Id: I92633222c9a04af24729501c48885eabebf00696
2016-02-24 13:49:48 -08:00
Steve McKay
12f4509f9f Merge "Don't restore stack when picking copy destination." into nyc-dev 2016-02-24 21:32:39 +00: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
da48a9aa07 Only ellipsize at end of strings.
Bug: 27339484, 27338617
Change-Id: I5e908c862cf9d6a2ba0c7552434914f18fbab716
2016-02-24 12:59:32 -08:00
Ben Kwa
9b3524d839 Fix a crash when browsing empty roots.
BUG=27292682

Change-Id: I383fd359a959e86fca3f6716575027aa3b4723cf
2016-02-24 10:11:10 -08:00
Steve McKay
dbdca5b299 Merge "Fix error formatting for copy/move/delete failures." into nyc-dev 2016-02-24 16:24:29 +00:00
Tomasz Mikolajewski
d49095d1e4 Fix error formatting for copy/move/delete failures.
This caused major failures in the job operations, including
failing tests.

Change-Id: I697f1481df39a156f7ebfde08b31af6b23380f17
2016-02-24 19:23:54 +09:00
Tomasz Mikolajewski
1bf6ed9fb8 Merge "Wire removeDocument() to Jobs." into nyc-dev 2016-02-24 08:42:16 +00:00
Tomasz Mikolajewski
db87543d82 Wire removeDocument() to Jobs.
Bug: 27303034
Change-Id: I6388e2b70b523670210cd8285800b4c187c8f8b8
2016-02-24 12:32:57 +09:00
Aga Wronska
f4b808345d Merge "Add logic for selecting filename in RenameDocumentFragment - different selection for directory. Prevent test from creating directories in Documents folder." into nyc-dev 2016-02-23 19:04:05 +00:00
Aga Wronska
568b3b366c Add logic for selecting filename in RenameDocumentFragment - different selection for directory.
Prevent test from creating directories in Documents folder.

Change-Id: Ib656f8d69cba27b201b5fe67bcb11fa1dec04953
2016-02-23 10:57:09 -08:00
Aga Wronska
c7bf3f7cb8 Merge "Fix RenameDocumentFragment crash on rotation" into nyc-dev 2016-02-23 18:00:12 +00:00
Aga Wronska
7113872024 Fix RenameDocumentFragment crash on rotation
Bug: 26972374
Change-Id: I820661bc5363fe8ccc3ea39b3e27510907ddf2ef
2016-02-23 09:43:32 -08:00
Tomasz Mikolajewski
0d47cd2912 Merge "Cleanup error handling in jobs." into nyc-dev 2016-02-23 06:00:11 +00:00
Steve McKay
27d20a3024 Don't enable move to for non deletable selections.
Bug: 27135562
Change-Id: Id09b4c9d4f9836a4e5b2f66b8cbad63be9bb62b3
2016-02-22 21:08:37 -08:00
Tomasz Mikolajewski
0fa97e85e4 Cleanup error handling in jobs.
Change-Id: Icf6a7aad1b84dc92285064810776239e93494e38
2016-02-23 10:36:19 +09:00
Steve McKay
2fbb40eebd Add CREATOR class to Selection.
Bug: 27236334
Change-Id: I5f50cd63b850785194fec2db3eb68e40aa7af34f
2016-02-22 12:29:37 -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
Felipe Leme
c657f3d0ba Merge "Improved OpenExternalDirectoryActivity so it returns right away when an app already has the requested permission." into nyc-dev 2016-02-22 18:55:22 +00:00
Aga Wronska
f0febdcf90 Merge "Directory fragment refactoring. First attempt to to refactor fragments handling, state and app lifecycle." into nyc-dev 2016-02-22 18:28:42 +00: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
Geoff Mendal
fdce862c95 Import translations. DO NOT MERGE
Change-Id: I5f452609d36a3b910e3fadab6f31913371da0f19
Auto-generated-cl: translation import
2016-02-22 07:11:59 -08:00
Steve McKay
fdfd5b60fc Merge "Undo generalization isDownloads > supportsChildren." into nyc-dev 2016-02-19 19:17:59 +00:00
Steve McKay
04003d8936 Merge "Escape title of Operationdialog." into nyc-dev 2016-02-19 02:36:23 +00:00
Ben Kwa
1374412d89 Merge "Renumber UMA constants." into nyc-dev 2016-02-19 00:52:25 +00:00
Ben Kwa
a87e9f94d0 Renumber UMA constants.
Clearcut does not like negative or zero values for its histograms.

Also, consolidate all metrics constants in the Metrics.java file. In
cases where values are being obtained from elsewhere (e.g. State.action
constants), map those constants to constants defined in Metrics.java.
This will reduce occurrences of constants changes accidentally screwing
up metrics data.

BUG=26737132

Change-Id: Ia9fb88a49c3102afc2464d20653e2ee21cfc591f
2016-02-18 16:48:45 -08:00
Ben Kwa
7b300ff369 Merge "Implement type-to-focus in the DirectoryFragment." into nyc-dev 2016-02-19 00:39:27 +00:00
Steve McKay
a3471af5f9 Escape title of Operationdialog.
Security review feedback.

Bug: 27121721
Change-Id: Ibafa07aea7b2f77ca476e4f62bd5e4e556ba49c7
2016-02-18 16:09:48 -08:00
Steve McKay
008e948c3e Undo generalization isDownloads > supportsChildren.
Move root comparison logic into RootInfo.
Move shared string comparison code to Shared.

Change-Id: I3267b496a165ad3cae773783db0e79df2eb118e8
2016-02-18 15:59:52 -08:00
Steve McKay
7295bcbe42 Merge "UX cleanups." into nyc-dev 2016-02-18 23:08:27 +00: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
e2af078488 UX cleanups.
Visually separate directory background from sidebar.
Lower shadows so the "real" effect isn't so prominent.

Hitchhikders:
Consolidate bool values in config.xml files (were in dimens.xml).
Add missing supportsRecents & supportsSearch methods
    to RootInfo.
Rename RecentLoader to RecentsLoader so it doesn't defy
    searching for "Recents" string.
Move Downloads below the divider.

Change-Id: I06c76e26ec6df6541860a1448865c67ed953ed43
2016-02-18 22:21:03 +00:00
Ben Kwa
a4acc90b0a Implement type-to-focus in the DirectoryFragment.
Add a helper to the FocusManager, to handle alphanumeric keystrokes.
- Build a search index mapping document titles to adapter positions, and
  keep it up-to-date.
- Intercept alphanumeric keystrokes and build up a search string from
  them.
- Use the search string and index to set focus in the directory listing.
- Highlight code is written, but not activated in the UI for now, to
  minimize surface area for potential breakages.  Revisit enabling
  highlights for O.

BUG=24988911

Change-Id: I148ff5583c655338d12bc06d6484a9ed7aa528ad
2016-02-18 12:04:35 -08:00
Steve McKay
b8397607ee Fix CTS failure.
Loosen the reigns on setPickTarget to accommodate no sub command mode.

Change-Id: Ia11c4194970c93fe86e98dfd0d23ed4fa1cea765
2016-02-18 11:59:26 -08:00
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