Commit Graph

2147 Commits

Author SHA1 Message Date
Steve McKay
ae267cedce Merge \\"Include an app icon.\\" into nyc-mr1-dev am: 3d8c9981b5
am: a8387db55e

Change-Id: Ibe38576f5bada20131d05e550d93f6b6be54179f
2016-07-16 00:12:53 +00:00
Steve McKay
a8387db55e Merge \"Include an app icon.\" into nyc-mr1-dev
am: 3d8c9981b5

Change-Id: I14f2d90fc7c0f21ab0fe6b993c1ef6d8ed665831
2016-07-16 00:06:10 +00:00
Ben Lin
ea70d8d0d0 Merge "Fix a crash happening on a context menu." 2016-07-15 22:56:44 +00:00
Steve McKay
f00c161a22 Include an app icon.
Bug: 29880363
Change-Id: Ia8d9414ce536fb35acec1357d0f69d3ee158d853
2016-07-15 15:37:14 -07:00
Steve McKay
1d389a543e Remove vestigial config setting.
Change-Id: I8cd1558ae76833d4f0e511f05fc6e66d9ff44a7e
2016-07-15 19:22:58 +00:00
Ben Lin
2e7234ce1d Fix a crash happening on a context menu.
When an activity gets a callback for onContextItemSelected, it first
gets dibs on handling it, and then it propagates the call to -every-
fragment it is tied to. This poses a problem since RootsFragment and
DirectoryFragment don't necessarily handle each other's menu items well,
which can cause NPEs. This is some temporary fix for it.

Bug: 30092676
Change-Id: I3f268c9c9580504b78581ad92a24c9a99c4a0daf
(cherry picked from commit 3e1699f3a3f3d0378d758e3b0d430165867eb89e)
2016-07-15 18:17:57 +00:00
Steve McKay
07886170d5 Addition UserInputHandler test coverage.
Pull event handling logic out of MultiSelectManager into UserInputHandler.
Pull out a couple common test support classes.

Change-Id: I8958fec9cda05f52192a07a682c318e049871a8d
2016-07-15 01:28:04 +00:00
Garfield, Tan
3c65bdc82d Fix a race and some comments in ClipStorage.
Change-Id: I6cc2108c677ce6611f5ebef70a88b625491a2e05
2016-07-14 21:04:13 +00:00
TreeHugger Robot
538845d57e Merge "Import translations. DO NOT MERGE" 2016-07-14 20:31:31 +00:00
Bill Yi
e2a49bc4b0 Import translations. DO NOT MERGE
Change-Id: Ia80fd622c18e938df5f3668912fcd89b99f02195
Auto-generated-cl: translation import
2016-07-14 04:36:38 -07:00
Garfield, Tan
00736b3b11 Allow root item accepts drag and drop.
Bug: 28315281
Change-Id: Ie37536258f04c1b0d3ff5a315f4a5fa33e0ba182
2016-07-14 01:38:57 +00:00
Ben Lin
9be9891369 Follow up changes from ag/1190582.
Change-Id: I40121fc3d36e430c402da2835027283eb4b11071
(cherry picked from commit ce83f978d5bff5505a1d5f9bec894fe5f1091a4d)
2016-07-13 22:07:07 +00:00
Ben Lin
0dc1e702c2 Merge \\"Trapping backspace at EditText level to prevent popping Docs.\\" into nyc-mr1-dev am: 2df618f4cd
am: 64f4868803

Change-Id: I622f74b03dd3e201f3000b926571352a55ae10e9
2016-07-13 02:15:34 +00:00
Ben Lin
64f4868803 Merge \"Trapping backspace at EditText level to prevent popping Docs.\" into nyc-mr1-dev
am: 2df618f4cd

Change-Id: I2f8a3c1d0c0c6a017e212288458429627f7c7544
2016-07-13 02:08:54 +00:00
Ben Lin
d9ba201f59 Trapping backspace at EditText level to prevent popping Docs.
When the EditText is empty, pressing backspace on soft/hardware keyboard
will call on the EditText's OnKeyListener. Since we don't handle
backspace, it will then bubble up to Activity-level, which will then pop
the document stack due to the feature of using backspace as navigation.
This will trap the call correctly if the EditText is empty.

Bug: 30066261
Change-Id: I231507b9469bfa52478872491f1d2713a1ac58ba
2016-07-12 23:42:56 +00:00
Garfield, Tan
415cd8b846 Pull clipping related classes to a separate package.
Change-Id: I125d1c34e475f9465e82014cb869f88c9c7cebc4
2016-07-12 20:26:16 +00:00
TreeHugger Robot
d4e6beb1f1 Merge "Import translations. DO NOT MERGE" 2016-07-12 16:17:29 +00:00
Bill Yi
73a15ce500 Import translations. DO NOT MERGE
Change-Id: Ia6aec36d0912bd62b30147f19b916e4b08fa64f2
Auto-generated-cl: translation import
2016-07-11 20:42:49 -07:00
Steve McKay
74c287706b Consolidate user input handling in single class.
But separate mouse and touch handling into independent (internal) handlers.
Ensure we don't do band select on right click + drag.

Bug: 29575607, 29548676
Change-Id: I247e3ba002751f2cda010125e0e7b4bdd745ac23
2016-07-12 03:24:06 +00:00
Garfield, Tan
908f9889da [multi-part] Eliminate 1k selection limit
* Implement ring buffer to cope the challenge of deleting file clips
* Fix a bug to allow concurrent read on the same clip file

Change-Id: I53450d94ee881966d5631f0dc6edcb0fdd8ff9d5
2016-07-12 01:12:39 +00:00
Ben Lin
960c3ae956 Fixed DocumentsMenuManagerTest#testRootContextMenu.
These items were suppose to be invisible for DocumentsActivity ... I
forgot to assert them that way.

Bug: 30071769
Change-Id: I842f5bfb2492d31e0837c6ea6cc78d9867bb0a1b
(cherry picked from commit c986d4cedce43c31c5c4f30cb24f402e1c66fead)
2016-07-11 22:44:06 +00:00
Garfield, Tan
71ac8a003e Add free space precondition check for copy job.
Bug: 24948755
Change-Id: I210395bdf339d630604e90e867ffddbbd3cf4bea
(cherry picked from commit 2a530ab3be585b366d562ea24940dcdd239af6d0)
2016-07-08 19:17:48 +00:00
Ben Lin
d7d1487ec8 Docsui-level work for implementing Eject on Roots list.
1. Added Eject Icon for Roots that support eject
2. Added Context Menu for RootsFragment (Settings and Eject)

Bug: 29584653
Change-Id: I97f582de05763e3f0327bc0d2dc6d4e2222e047c
(cherry picked from commit d96661f8b0f613b40f2bdfc178bbe06022b5f76c)
2016-07-08 00:03:57 +00:00
Daniel Nishi
57e845b51b Merge "resolve merge conflicts of 7145cac to master" 2016-07-06 22:45:37 +00:00
Daniel Nishi
3fd8c801ba resolve merge conflicts of 7145cac to master
Change-Id: Idd0a8de30697687309953fd37b568207d2fc0be8
2016-07-06 14:04:36 -07:00
Ben Lin
d7bfa22c93 Set the first item's left padding to 0 in Horizontal Breadcrumb.
Bug: 29945773
Change-Id: I0493f463b9e82224372e2f21b1fc9062dfd005fb
(cherry picked from commit 77afda11780172e67f88c58467bf085c86119c24)
2016-07-06 20:32:55 +00:00
Daniel Nishi
7145cace64 Merge \"Move the MIME type icon detection into the platform.\" into nyc-mr1-dev
am: 9459f93c97

Change-Id: I151a72b8ee1c16ef94da70e85378dd44b4ac077c
2016-07-06 20:02:45 +00:00
Daniel Nishi
9459f93c97 Merge "Move the MIME type icon detection into the platform." into nyc-mr1-dev 2016-07-06 19:54:27 +00:00
Daniel Nishi
c29d2b0492 Move the MIME type icon detection into the platform.
This allows the MIME type icons to be used in other system apps.
In this instance, the StorageManager app needs to show file icons
for a given file. By moving the icon mapping into a static library,
we can avoid duplicating the mapping and resources.

Bug: 29826961
Change-Id: Ic2dc7970cc5a5ca430e33425eb9f1ecbd733fe9a
2016-07-06 10:57:06 -07:00
Andrew Sapperstein
6b77f8126f resolve merge conflicts of bc2ba56 to master
Change-Id: Ie7c1ba0704e392efc6122a8addb6c082680a7c2e
2016-07-03 15:36:00 -04:00
Andrew Sapperstein
bc2ba56507 Merge \"Update DocumentsUI to use theme colors.\" into nyc-mr1-dev
am: 2573d83fa9

Change-Id: I746721af370141c6adf60e95eaef478f8d77ba3e
2016-07-03 15:34:09 +00:00
Andrew Sapperstein
0e59a22fcc Update DocumentsUI to use theme colors.
Properly assigns the app's colors for primary, primaryDark, accent, etc
to the colors used by the framework.

Moves a couple colors that are alternate shades of the accent color
into the framework for ease of overlaying.

Deletes a few unused colors as well.

Finally, fixes a bug where colorControlActivated was not being
properly set due to the theme depending upon AppCompat. To
workaround this undefined behavior, we explicitly set
colorControlActivated to colorAccent which is what the framework
sets it to.

Change-Id: Ie0cba19b1b83a21f65692102df91bf4daf27dc44
Fixes: 29581883
2016-07-01 17:59:07 -07:00
Steve McKay
2499e8deb2 Move GestureListener to own file.
And:
- make MotionInputEvent AutoCloseable (and update obtainers accordingly).
- remove unused constructor args and overloading from MultiSelectManager.

Change-Id: I335a95c3d05ab10bdcbfebab8dc69f0b2f681e3a
2016-07-01 02:19:42 +00:00
Steve McKay
73e2a7d2c4 Merge \"Merge \\"Allow quick view package to be set via setprop.\\" into nyc-mr1-dev am: 24cea93b4a\" into nyc-mr1-dev-plus-aosp
am: 35c77908f0

Change-Id: Ib4b46c435e38caf362f91c9674766621146ac770
2016-06-30 23:51:16 +00:00
Steve McKay
265173d85c Merge \"Allow quick view package to be set via setprop.\" into nyc-mr1-dev
am: 24cea93b4a

Change-Id: I6b95a25e1b038d8b3ffcbce1019688be3a3980db
2016-06-30 23:44:23 +00:00
TreeHugger Robot
24cea93b4a Merge "Allow quick view package to be set via setprop." into nyc-mr1-dev 2016-06-30 23:22:33 +00:00
TreeHugger Robot
4682205151 Merge "[multi-part] Eliminate 1k selection limit" 2016-06-30 06:08:48 +00:00
Steve McKay
38212a4974 Fix Angler search tests.
Use a matcher compatible with all devices.
Move constant matchers into respective Bot files.
Suppress testCreateDir test which is failing *ALOT*.

Change-Id: I67d41d54bc36648ed4d7384a046ee4c9c20d753b
2016-06-30 04:23:11 +00:00
Garfield, Tan
05df8ec38d [multi-part] Eliminate 1k selection limit
* Rename class ClipDetails.
* Add FileOperation class and merge it with JobFactory.

Bug: 28194201
Change-Id: I46639b21c9e424644289a1bf34b85234a9becd2b
(cherry picked from commit 7f17819f1320d12f1f35a8f5327e0c7e63dfed54)
2016-06-30 01:33:14 +00:00
Steve McKay
c4011fceaa Allow quick view package to be set via setprop.
This allows testers to turn it on via adb.

Bug: 29875957
Change-Id: If4563a1799a7c1a1adead9ecfdb4c6ef0c07f82b
2016-06-29 14:00:54 -07:00
Bill Yi
04f363ae01 Import translations. DO NOT MERGE
Change-Id: Ic3e7f43083a8b512a01c252a8bbcd0cb004a9611
Auto-generated-cl: translation import
2016-06-29 11:51:46 -07:00
Steve McKay
63e37fb506 Load layout specific breadcrumb view.
Because two diffrn't view types can't share an resource id....
else we get ClassCastExceptions bubbling out of Spinner when
tryihng to restore from RecyclerView state.

Also:
Move Bots to own file and make BaseBot inner to that.
Extract searchbot from UiBot.
Fix broken search icon logic in phone layout.
Separate somewhat complicated breadcrumb bot functioanlity in a separate bot.
Simplify Search test.
Check for drawer vs. fixed layout instead of "tablet" mode...which didn't
    work when rotating tablets.
Update a dialog entry to use Espresso.
Update breadcrumb stuff to use Espresso.
Move *default state* checking to a different test so we can
    enjoy the default location support from ActivityTest.

Change-Id: I0a60ba93a1cbbb990ec3b36d4f9fd5dc8b86ff00
2016-06-29 00:39:45 +00:00
TreeHugger Robot
8262b4601b Merge "Enable drag & drop -> Springload for breadcrumb." 2016-06-27 18:13:10 +00:00
Ben Lin
ce92c5b8f7 Enable drag & drop -> Springload for breadcrumb.
Bug: 29519481
Change-Id: I54d98c48c08153c22b2f01c7728187927c4fe1a2
(cherry picked from commit 81d903bc083807c6048ac9ce1d1d3ca18b6643a3)
2016-06-27 16:41:16 +00:00
Bill Yi
5ff6b66b7b Import translations. DO NOT MERGE
Change-Id: I2e16ea6b671a016c06c99d44a68816fc3f8c47e6
Auto-generated-cl: translation import
2016-06-27 00:45:42 -07:00
Garfield, Tan
f46958bebd [multi-part] Eliminate 1k selection limit
* Remove clearing clip files at app launch.
* Remove clip files when they won't be used.
* Stop adding clip items to jumbo clip data.
* Repurpose ClipDetails to hold operation type, srcParent and file list.
* Use ClipDetails for copyTo/moveTo/delete menu actions.
* Make FileOperationService consume ClipDetails.
* Add set up state to jobs; show set up notification in set up phase.
* Make copy job cancelable at set up phase.

Bug: 28194201
Change-Id: I2018ff9bc51515c1f6a029f0ede3f4c7d2beee43
(cherry picked from commit 664881e4b1fdc3416648f000287f52168978364f)
2016-06-24 23:56:55 +00:00
TreeHugger Robot
b0c7111a58 Merge "Fix broken Ryu default dir test." 2016-06-23 23:23:32 +00:00
Steve McKay
3ee1ee926d Fix broken Ryu default dir test.
Also, move Matchers to their own file for moar sharing.

Change-Id: Ia621d0efb633159de4c5c700076e2e778583f8bf
2016-06-23 21:44:59 +00:00
Steve McKay
10419c2882 Move event handling code out of DirectoryFragment
Bug:29575607
Change-Id: Ieae3bcee030973bf83551a74f722236a24832730
2016-06-23 20:29:24 +00:00
Ben Lin
693ba32b71 Fix context menu for empty directory/root view.
Since it's not always true that there is a doc/directory given the (x,
y) of the right click, I've changed the signature of right click to take
in a MotionEvent object as a parameter, and make a MotionInputEvent
inside the function as a check whether it's on a file/doc or on
empty/blank pane.

Bug: 29538570
Change-Id: I7ee960c9f556752bf314ab8cc2d94fda28194c0a
(cherry picked from commit 332192dee8cb99bd2e6ef638e78d5b62ab7ecfe6)
2016-06-21 23:44:14 +00:00