Commit Graph

181 Commits

Author SHA1 Message Date
Garfield, Tan
d9ddb3ba5b Suppress auto-closing drawer and add ripple effect on spring load roots.
Bug: 28865182
Change-Id: Ief7967e33b9a0d7e94a667172121d8007f78115b
(cherry picked from commit 17182ca46f7a8f3ae03bb8f5a16116246a5fbd91)
2016-06-06 19:01:51 +00:00
Garfield Tan
cd9780abff Merge "Prioritize delete jobs by adding them to a separate thread pool." into nyc-andromeda-dev
Conflicts:
	packages/DocumentsUI/src/com/android/documentsui/services/FileOperationService.java

Change-Id: I1eb4f265891542f8db59349ce158b192f1b14315
2016-06-02 10:17:59 -07:00
Steve McKay
716912e719 Move BandController out of MultiSelectManager.
Improved dependency injection (elimination of propagating dependencies).
This change cleans up MultiSelectManager ahead of other improvements.
Also, cancel band select in response to touch events....else weird things happen.

Change-Id: I261d928ff7eb5d8a50791d5dd9d7202b324efc54
2016-05-26 16:26:39 -07:00
Ben Lin
ddc35c5f3c Fixing some tests for Phone form-factor.
Bug: 27533946
Change-Id: I70e15dee2ae7c14c1768d56ee04f87d05dd0f926
(cherry picked from commit 316c39b94c129652e7569fc7e4cd47af3cfb80d3)
2016-05-25 18:39:46 +00:00
Garfield, Tan
1ec6f295d1 Load up-to-date thumbnail if the cached one is out of date.
Bug: 28557412
Change-Id: Ib3ef9962249305be22b7a1e49e26350f3596e430
(cherry picked from commit aacb9219a791d2e4415cbbcacc12caed424dff83)
2016-05-24 19:55:33 +00:00
Garfield, Tan
ad02945b8b Convert ItemDragListenerTest to JUnit4, and add it to APCT.
Change-Id: I45fd0c64154710e39dd8c0f43362f74eda11e3fc
(cherry picked from commit 5413e81c8e9ca94da2c792403ae8c072535d95b2)
2016-05-19 00:21:00 +00:00
Ben Lin
da75c243d5 Initial effort toward fixing Suppress tests by integration of Espresso.
Bug: 27533946
Change-Id: I0286ff6d4c53b464180e3100b7219e766ca09de3
(cherry picked from commit 80c050b656030e070f27708bc4da5f5c7fc6cac6)
2016-05-16 20:45:40 +00:00
Ben Lin
ba92ba5cc3 Merge "Add support for search in DownloadManager." 2016-05-10 23:32:03 +00:00
Ben Lin
ce763d8bac Add support for search in DownloadManager.
Bug: 26524617
Change-Id: I41c0f92381bec8ad06db73b25ec67466f368b55c
2016-05-10 21:45:25 +00:00
Garfield, Tan
1d975315b9 Add capability to spring load a root or directory.
Bug: 28242270
Change-Id: I5cbdb7734af8d78015a82fd7b38b1266576c9914
(cherry picked from commit b5e2714d63dc5e74cef69f590b41a161eeca7b80)
2016-05-10 20:39:49 +00:00
Ben Lin
b1404b774d Enable Ctrl+X cut operations, along with some code refactor.
Bug: 27451823
Change-Id: I062dcbd065434c22a3ffeb33d4cac2b4f9da104b
(cherry picked from commit 5b696f91aa0f12f29be5205647bdc398e2831af8)
2016-04-21 00:12:07 +00:00
Tomasz Mikolajewski
4759c9f03f Cancel band selection on directory change.
This is a workaround for N. Ideally we should keep the band selection,
as directory may change very often, eg. during loading, or downloading
a file (every second).

Bug: 27224277
Change-Id: I40cfb12c4f7928c4e0d6e675e91ba30ab3a6ab52
2016-04-19 17:51:05 +09:00
Steve McKay
55625a675f Deal gracefully with empty srcs.
Bug: 28184194, 28173827
Change-Id: I6794b147a7e3d3aba73600a87d565bfffe4a4b93
2016-04-14 10:34:08 -07:00
Tomasz Mikolajewski
5e02d303c0 Do not allow to select non-selectable items via mouse.
Bug: 28101625
Change-Id: I9f6cd4e259f7860bbc6c74c4d24c43e2c3ba1047
2016-04-13 06:36:22 +00:00
Steve McKay
53f109b39e Massage code to better support Files overlay.
Also, allow "productivity_mode" config to be enabled via intent extra
    as a developement aide.

Bug: 28006206
Change-Id: I7be8d96a0e924f9ce8023347e051d28d69a0eec9
2016-04-06 10:25:02 -07:00
Aga Wronska
69e852d759 Fix search view tests on handheld devices
Change-Id: If7107e23e93989f040abf7f909b4134b0035b8e4
2016-03-31 13:31:24 -07:00
Aga Wronska
774cc932fc Add menu option to show/hide internal storage.
This reverts commit 7c4395804e.

Bug: 27683276
Change-Id: Id1a310b57ab7fa3c8c14b464786473f211eaf41f
2016-03-30 18:23:10 -07:00
Tomasz Mikolajewski
21fece7a32 Merge "Add basic jank tests for DocumentsUI." into nyc-dev 2016-03-29 00:45:32 +00:00
Tomasz Mikolajewski
8ee8ebfa63 Add basic jank tests for DocumentsUI.
This CL adds two jank tests:
* For opening a root (directory) with many files.
* For flinging through a directory with many files.

Bug: 27383277
Change-Id: Ie67efe6d5495ff3a8ed63135ed7ec2d4e6262bd2
2016-03-28 19:27:05 +09:00
Tomasz Mikolajewski
378f409034 Merge "Fix testModelIdIsUnique test in DocumentsUI." into nyc-dev 2016-03-24 00:40:07 +00:00
Tomasz Mikolajewski
d283221426 Fix testModelIdIsUnique test in DocumentsUI.
The logic changed, so the test had to be updated. Basically we support
multiple authorities only for cursors wrapped with MergeCursor.

Bug: 27742039
Change-Id: If07e1bf52279072e408a90efbe838a1d76adfcfd
2016-03-23 16:41:48 +09:00
Tomasz Mikolajewski
007151a90d Reduce memory allocations and improve sorting in DocumentsUI by 8.42%.
Reland after a revert. No changes.

Bug: 27286016
Change-Id: I0988062106faf4086c44d9b344649ef2cb86d3e7
2016-03-18 02:15:10 +00:00
Aga Wronska
b4129d785c Add config flag to hide home directory ("Documents") from the roots list.
Make home root hidden by default.

Change-Id: Ia9f97f3cad7ab102d65e01d6e0dd9bc39ab72f21
Fixed: 27683725
2016-03-17 11:57:29 -07:00
Aga Wronska
f3244e870e Revert "Precompute cursor indexes in DocumentsUI and improve perf by 2.7%."
It ia causing tests failures and exception at the app start.

This reverts commit d35a974b76.

Change-Id: I2577f723a7e25d4dcc12050791c65a900ac41f7d
2016-03-16 13:49:58 -07:00
Ben Kwa
415c0627b3 Merge "Fix band selection problems." into nyc-dev 2016-03-16 20:06:14 +00:00
Ben Kwa
c29fd8d149 Fix band selection problems.
BUG=27364174
BUG=27645942

Change-Id: Ib14680db708f1ddf1f5dc9dff8b93b655fa3f123
2016-03-16 11:02:48 -07:00
Tomasz Mikolajewski
49ca224623 Reduce memory allocations and improve sorting in DocumentsUI by 8.42%.
Bug: 27286016
Change-Id: Icc84aaaedd396d82f4ca7de63a682deebe1e1b93
2016-03-16 09:59:55 +00:00
Aga Wronska
7e166888ac Suppress tests failing because or permission inconsistency
Bug: 27653930
Change-Id: I92581b8d048af1a207ca8cf56dea40f17f38f42d
2016-03-14 15:10:56 -07:00
Steve McKay
3e63e7de23 Run all downloads through trampoline.
This guarantees the retry/delete support in the downloads
    trampoline can do its thing.
Allow APKs not in downloads to go directly to pakcage
    manager via VIEW intent.
Add test coverage for retry dialog.

Bug: 27539337

Change-Id: I75c5db8915e24a7648c7990136d39ed86d407637
2016-03-11 16:42:51 -08:00
Steve McKay
4064f60831 Merge "Delete downloads activity." into nyc-dev 2016-03-11 00:04:00 +00:00
Steve McKay
2c4c90d246 Merge "Fallback to byte-by-byte copy/move if optimized fails." into nyc-dev 2016-03-10 23:18:51 +00:00
Steve McKay
6ce903d7b7 Delete downloads activity.
Delete "MANAGE_ROOT" activity.
Add intent filter for "BROWSE_DOWNLOADS".
Open by default on Downloads directory.

Bug: 27563427
Change-Id: I1f85dc17a0bc94b439a272847e4ab3bb347ead23
2016-03-10 11:34:03 -08:00
Tomasz Mikolajewski
1008a11233 Fallback to byte-by-byte copy/move if optimized fails.
Sometimes providers may refuse to do a provider-side copy/move
even though the documents had the SUPPORTS_COPY/MOVE flags set.

This is because optimized copy/move may be only supported within
the same root.

Since there is no easy way to check if documents are on the same
roots from DocumentsUI, as well as whether the provider can actually
copy/move efficiently between different roots, we should tolerate the
failure and do a fallback to byte-by-byte operation.

Bug: 27436368
Change-Id: Ia1a0fbdba26c06b2151afc25d8513c01d60d31db
2016-03-10 16:48:29 +09:00
Tomasz Mikolajewski
9ab36aa86e Merge "Improve sorting performance by 2.5 times." into nyc-dev 2016-03-10 00:28:24 +00:00
Steve McKay
f346796b88 Suppress Rename tests that fail consistently...
on APCT.

Change-Id: I81e464855e16573e536828813b592f7ebc5b464f
2016-03-08 13:14:37 -08:00
Steve McKay
cc90976612 Merge "Suppress tests that are consistently failing..." into nyc-dev 2016-03-08 01:38:52 +00:00
Tomasz Mikolajewski
c05d98f64e Improve sorting performance by 2.5 times.
This CL replaces List<String> with String[], which prevents from
calling get() and set() multiple times within a loop, in favor of
System.arraycopy().

Scanning a directory with 10K files went down from 1200ms to 450ms.

Bug: 27286016
Change-Id: Id533480934f739905a845cb0e13fe862e361b3db
2016-03-08 09:26:55 +09:00
Steve McKay
18d3e853cc Suppress tests that are consistently failing...
on APCT.

Change-Id: I3a3a718b8211a5188130aa698322934bf62d81d1
2016-03-07 15:36:14 -08:00
Guang Zhu
c5a511ad0c fix DocumentsUI tests makefile
For instrumentation test apks, it should not statically include
Java libraries that are already present in the app module being
instrumented. They only need to be on classpath during compile
time.

Bug: 26689464
Change-Id: I68d4be95e30ae70bbab23d016a87eb085c10cc50
2016-03-06 00:47:59 +00:00
Steve McKay
8db100e4a3 Merge "Don't show title in delete confirmation." into nyc-dev 2016-03-02 19:56:21 +00:00
Steve McKay
b4672ef6df Merge "Always show intern storage." into nyc-dev 2016-03-02 18:49:28 +00:00
Steve McKay
7c4395804e Always show intern storage.
Only show debug root when devel mode is enabled.
Remove all traces of "advanced".

Bug: 27297398

Change-Id: Ie7e8be282531bd245351d56ababa8ca625c10fd2
2016-03-02 10:47:59 -08:00
Tomasz Mikolajewski
cf057efaff Fix broken tests due to uninitialized roots.
Change-Id: I014657cab86ffa17290ab8990f0adaa6f6451e15
2016-03-02 14:40:43 +09:00
Tomasz Mikolajewski
1a06789959 Merge "Add scaffolds for performance tests of DocumentsUI" into nyc-dev 2016-03-02 05:35:04 +00:00
Tomasz Mikolajewski
ae6d6b494c Add scaffolds for performance tests of DocumentsUI
Bug: 27370274
Change-Id: I14dea1b85cd84c8bb3c0eee27b2954108bfa4f8b
2016-03-02 13:01:11 +09:00
Steve McKay
ea9ec291ed Fix roots filtering for move operations.
Add test coverage for the Downloads case.
This was a regression to my recent cleanup of RootInfo.
Fixed logic to not exclude basically *everything* when a
    directory is in the set of files to be copied.

Bug: 27303346
Change-Id: I4d5608e0d8d95448b027b20107a11a7a5e46d45e
2016-03-02 01:32:30 +00:00
Steve McKay
c8d4e22a72 Don't show title in delete confirmation.
Also, remove "unhide" from Adapter, since it is unused.
Had to add a custom layout because Alert didn't do a
    good job. LOTS of work for a yes/no!

Bug: 27205772
Change-Id: Ic20d73b54fd142287e07402877ac339300b4bbb7
2016-03-01 12:46:29 -08:00
Tomasz Mikolajewski
88d5592ff2 Merge "Remove revealLauncher and revealApp from tests." into nyc-dev 2016-03-01 01:38:52 +00: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