934 Commits

Author SHA1 Message Date
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
Steve McKay
ecfbd3edcf Merge "Move State to a separate file." 2015-09-25 04:59:31 +00:00
Steve McKay
2fbe728069 Merge "Show empty roots except for content pickers." 2015-09-24 23:18:26 +00:00
Steve McKay
0200e34637 Show empty roots except for content pickers.
Bug: 24140864

Change-Id: I9fae80a1e3d413e97ee099bee9c59f81f713cf27
2015-09-24 16:16:43 -07:00
Ben Kwa
32a5776039 Merge "Fix a crash when deleting documents." 2015-09-24 23:13:42 +00:00
Ben Kwa
8923911c69 Fix a crash when deleting documents.
Deleting (and moving) documents invalidates previous selections, as
items change position.  Exit selection mode *before* actually deleting
anything, otherwise we end up trying to unselect potentially deleted
documents.

BUG=24338150

Change-Id: I79fb0c156142b78987be68560c78306f2678c521
2015-09-24 16:01:13 -07:00
Ben Kwa
437c507085 Merge "DocumentsUI: Add an error screen to DirectoryFragment." 2015-09-24 22:28:08 +00:00
Ben Kwa
91bec536ac DocumentsUI: Add an error screen to DirectoryFragment.
- Reorganize the directory fragment.
- Repurpose the "empty" view to hold a message and a button.
- Message is set to the "No items" message if a directory is empty.
- Message is set to the error message if a query error occurs.
- Don't close DocumentsUI when a query error occurs.

Change-Id: I4e1e96f23040606b410ac746252dcb0ab9286f04
2015-09-24 15:06:14 -07:00
Steve McKay
7a3b88cf56 Move State to a separate file.
Update remaining local DEBUG definitions to use Shared.DEBUG.

Change-Id: I3ed4d4b184836da161adff14bd3d9ca01b435847
2015-09-23 17:22:28 -07:00
Steve McKay
83df8c072d Merge BROWSE and BROWSE_ALL actions.
Open Files app when exploring from settings.
Force visibility of file size in this mode.
Don't hide empty media providers.

Bug: 24136618, 24140864
Change-Id: I6f238586725f9b6255812e3082bb8d8655219a7d
2015-09-23 12:25:13 -07:00
Steve McKay
72ae6e0444 Eliminate bad type parameterization.
Change-Id: Id886098926f3c62583f34cfbcc04953bb2f4e8c3
2015-09-23 08:42:39 -07:00
Baligh Uddin
c5c9bdb08d Import translations. DO NOT MERGE
Change-Id: I7c5c75590f30ee06cd8171bffb04da5073c394dc
Auto-generated-cl: translation import
2015-09-23 01:31:31 -07:00
Steve McKay
c643386e28 Update RecentsCreateView to use RecyclerView.
Move common DirectoryContainerView handling to BaseActivity.

Change-Id: I2c34b23b7050b68999f16e6d7f651c94ea8e47b6
2015-09-22 15:58:15 -07:00
Ben Kwa
91caed80b1 Restore more missing DirectoryFragment functionality.
- Add a material-style horizontal progress bar to DocumentsUI.  This
  replaces the old loading footer.
- Restore the view-switching code that displayed a dedicated "empty"
  view when displaying an empty directory.
- Fix tests.

Change-Id: Ifecb867f6edecbdeb37b8607d87d9797879a589d
2015-09-22 13:24:51 -07:00
Ben Kwa
631509a60f Merge "Replace error/info footers with a message bar." 2015-09-18 20:54:56 +00:00
Ben Kwa
3b19e31e18 Replace error/info footers with a message bar.
- Remove footers from DirectoryFragment.
- Add a new MessageBar fragment that can display error/info messages.

BUG=22638983

Change-Id: I2075ae8e4dca8954a09c1fc57ed62bb6d3bff7a9
2015-09-18 13:53:41 -07:00
Baligh Uddin
ebca452900 Import translations. DO NOT MERGE
Change-Id: Ibf24678007e2bdc2e06c8c1b1f3372cb3d6ccd18
Auto-generated-cl: translation import
2015-09-18 13:51:14 -07:00
Vladislav Kaznacheev
ede5f5480e Handle content URI permissions on drop
Change-Id: I846071f01ecd1eff8e3a54a1806e68e1a4b335d2
2015-09-16 17:35:10 -07:00
Ben Kwa
e0fa3b4693 Merge "Adjust theming for Files mode." 2015-09-15 17:57:46 +00:00
Ben Kwa
7cc80013f3 Adjust theming for Files mode.
- Bring files mode in line with MD spec platform colors.
- Normalize selection highlight color in grid and table mode.
- Fix status bar and accent colors in portrait mode.

BUG=23797347
BUG=24012021

Change-Id: I3427939b39f3f39f5e04bd4d854166dd6b3881b1
2015-09-15 10:55:22 -07:00
Ben Kwa
5e65d1a991 Merge "Clean up unit tests." 2015-09-12 00:19:44 +00:00
Ben Kwa
ce9a87928b Clean up unit tests.
- Rework unit tests to eliminate some null checks from production code.
- Fix some flakiness in the tests resulting from a coupling between
  DirectoryFragment.Model and the application View.

Change-Id: I6b23774a5b4897f33d8641e677bda9e66d86cb96
2015-09-11 15:15:45 -07:00
Ben Kwa
874062e395 Merge "Refactor DocsUI to break out a new ManageRootActivity." 2015-09-11 21:04:00 +00:00
Ben Kwa
0f7078f004 Refactor DocsUI to break out a new ManageRootActivity.
- Split all ACTION_MANAGE-related functionality off from
  DocumentsActivity, into a new activity.
- Create new full-screen layouts for said activity.
- Fix some styling issues in {Documents,Files}Activity.

Change-Id: I0384715ad3c7d70a3a3daf510f1a09e8c5732348
2015-09-11 13:58:41 -07:00
Ben Kwa
8b4d28a3b7 Merge "Fix a crash during file deletion." 2015-09-09 21:10:29 +00:00
Ben Kwa
1f051b18eb Fix a crash during file deletion.
Fix an off-by-one error when checking deletion candidates, that was
causing item positions to be incorrectly bumped following a successful
deletion.

BUG=23823860

Change-Id: Id261ad49271fb0c1a5ff1cba88fea1451412d7f3
2015-09-09 13:49:07 -07:00
Steve McKay
b99837361c Merge "Don't start band select on empty grid." 2015-09-09 19:12:20 +00:00
Steve McKay
c3ef0d6410 Don't start band select on empty grid.
Masks an issue in band controller resulting in index out of bounds exceptions.
Eliminate the need to cast helper when constructing BandController.
Improve naming of Band related classes for clarity of purpose.
Normalize some "helper" class method names.
Rename BandSelectModelTest to match existing convention for tests on inner classes.

Bug: 23905473
Change-Id: Iaf7604fb729cf563a04dc92d78b24e2fe4812abe
2015-09-09 12:11:11 -07:00
Ben Kwa
18fce3cd3c Add unit tests for DirectoryFragment.Model.
Refactor DirectoryFragment.Model to be a static class.
Introduce some unit tests.

BUG=23754695

Change-Id: Iaa064292ab26b23ac7247e49c05ba91033d84a18
2015-09-08 09:58:35 -07:00
Geoff Mendal
16774c9816 Import translations. DO NOT MERGE
Change-Id: I88e15a674412aeb7de73e20d2af49bd5e95c747b
Auto-generated-cl: translation import
2015-09-07 06:47:51 -07:00
Steve McKay
ac1e9d62be Merge "Don't start BandselectManager in single-select mode." 2015-09-04 22:28:31 +00:00
Ben Kwa
545407f6c0 Merge "Factor and consolidate style and color names." 2015-09-04 22:01:45 +00:00
Steve McKay
a698d636c5 Don't start BandselectManager in single-select mode.
Change-Id: I3adfe578107cf88b153ad8d8b483462c29a24e28
2015-09-04 14:52:02 -07:00
Steve McKay
49f34019b6 Merge "Fix erroneous band selection start." 2015-09-04 19:05:16 +00:00
Steve McKay
635b094997 Fix erroneous band selection start.
Fix band selection to not start when crossing off of a grid item into empty space.
This CL also introduces a MotionEvent wrapper class, since MotionEvent
can't be used in tests.
Note that this CL works around several issues with b/23793622.

Bug: 23727363
Change-Id: I010a82db3363d99f2d804db2653a3a25d8cac940
2015-09-04 12:03:37 -07:00
Vladislav Kaznacheev
87fc05b85d Merge "Fix drag and drop in Files app." 2015-09-04 18:20:44 +00:00
Ben Kwa
92b547b813 Factor and consolidate style and color names.
Change-Id: I02d344a4e5528d58e57255a31fbf127402e8ea31
2015-09-04 11:06:49 -07:00
Vladislav Kaznacheev
b5999ef48a Fix drag and drop in Files app.
It got broken after the migration to Recycler view.
This patch might be not the perfect fix, but it returns
drag and drop into a working condition.

Testing requires recompile with DEBUG_ENABLE_DND=true

Bug: 22725110
Change-Id: I82cf01af68c6284878af8e46e290d117a0e505c1
2015-09-04 09:17:37 -07:00
Steve McKay
6c86b19fdc Consume event on singleTapUp.
Fixes issue with last-selected-item tap resulting in view/quickview.

Bug: 23615434
Change-Id: I94af6f6c17dd199930f9eeccbccb78648c0cb608
2015-09-02 16:06:05 -07:00