2165 Commits

Author SHA1 Message Date
Steve McKay
8422041009 Delete orig DocumentsUI.
Bug: 29224737
Change-Id: I6d6327918adba699d2ed3652bc2dbea27f872284
2016-07-29 09:14:56 -07:00
TreeHugger Robot
3dd05bf68f Merge "Potential fix for flaky tests." 2016-07-25 20:17:04 +00:00
TreeHugger Robot
eadd9ca5ac Merge "Evict thumbnail caches and delay dismissing spinner on refresh finish." 2016-07-25 19:23:56 +00:00
Garfield, Tan
996aa3ba1a Evict thumbnail caches and delay dismissing spinner on refresh finish.
Bug: 28334455
Change-Id: I338f83744d7f8b2fe9a9265dcab7ed4ec81edbfb
(cherry picked from commit dce173d1a011c07205b4b90da79d24d08e4cf90a)
2016-07-25 17:50:12 +00:00
Ben Lin
4acc4bd8ac Potential fix for flaky tests.
1) Fixing orientation of test devices to their natural orientation
(Phone is usually portrait, and most big tablets are landscape). We
unfreeze the orientation at tearDown because if we don't, the device
will be permanently locked to that orientation.
2) Adding closerDrawer() to FileManagementUiTest and RootsUiTest.

Bug: 30190207
Change-Id: Iec90ee8d46fef1acbf5b04fe718810edbf99da0c
(cherry picked from commit 73a59e9a02f09e61037e4fb8275d283f3861fe90)
2016-07-25 17:42:49 +00:00
Bill Yi
12ec51e9f4 Import translations. DO NOT MERGE
Change-Id: I212efab9ebc999348aaba685512794498ba08eba
Auto-generated-cl: translation import
2016-07-25 02:06:51 -07:00
Ben Lin
3d9a06774c Allow drag-n-drop to auto-scroll when near top/bottom of dirlist.
Couple of things this CL did:
1. Refactored ViewScroller to a separate file, renamed to
"ViewAutoScroller"
2. New interfaces called UIDelegate and CalculationDelegate such that
classes can provide necessary information for smooth scrolling
3. DirectoryDragListener implementation of #2's interface in order to
have auto scrolling when user's cursor is near top/bottom of screen

Currently since the status bar, action bar, and menu bar don't have a
drag listener, we don't get a callback on them, and thus we lose the
ability to get positions/scroll if user flings too quickly to those
areas. There might be some way to circumvent this since hovering over
these areas get a DRAG_EXIT event, but that should be 1) a separate
discussion and 2) a separate CL in my opinion.

Bug: 28696867
Change-Id: I61eba93aa60efd1638b3c0cd79db3f0d083b5e6d
(cherry picked from commit ad3a323585e43d06f632d85759beaf670f541997)
2016-07-22 17:00:42 +00:00
TreeHugger Robot
88f952f4e0 Merge "Attempt at fixing broken tests and regressing performance." 2016-07-22 02:04:58 +00:00
Ben Lin
8c3e68d316 Attempt at fixing broken tests and regressing performance.
1. testDeleteDocument_Cancel seems to pass far more often than
testDeleteDocument, which always errors out due to not able to find the
menu item. This is to combine the tests so we don't lose coverage, but
also have less noise in APCT until we figure out what's going on.

2. We have regression currently on our jank tests. Per Guang's
suggestion, we are going to try freezing device orientation to see if it
helps.

Bug: 30190207
Change-Id: Ibdfdb75471b3220faaa9e8abef03df489ff185c3
2016-07-22 00:44:00 +00:00
Garfield, Tan
1427fb74a3 Handle partial clip files by showing a failure notification.
Bug: 30221384
Change-Id: Ib32b6b5ca5b8f7be887b8f35b80daeeb33770cbe
2016-07-21 23:47:20 +00:00
TreeHugger Robot
e94a30b9be Merge "Change the color of loading spinner to the color of selected roots." 2016-07-21 23:03:15 +00:00
Garfield, Tan
7f6d4467cf Change the color of loading spinner to the color of selected roots.
Bug: 28334455
Change-Id: Id80cbfa557eb5e3914c216da2570ae105ec77c20
2016-07-20 23:03:35 +00:00
Steve McKay
048ea2f4ce Remove unused "isTouchEvent" methods.
Update BandController to use InputEvent not contrete MotionInputEvent.

Change-Id: I47a7558d8dcebfa6c44dc9a62741487422bf0ff7
2016-07-20 22:52:13 +00:00
Steve McKay
1b9a1548a8 Merge \\"Make the app name \\"Files\\" instead of Documents.\\" into nyc-mr1-dev am: 6aa504077d
am: f26d22ddc7

Change-Id: Ic8ba41cfcb588c1c52b4702c69dd054d9f5f4675
2016-07-20 00:37:40 +00:00
Steve McKay
f26d22ddc7 Merge \"Make the app name \"Files\" instead of Documents.\" into nyc-mr1-dev
am: 6aa504077d

Change-Id: Ifd6e962abbcc2fb71bb1cc3239a96d8d9e027dba
2016-07-20 00:32:14 +00:00
Garfield, Tan
f132b58959 Enable pull to refresh.
Bug: 28334455
Change-Id: Ie98fbd0abfa4640e00e49d4726e47230276f96c3
2016-07-19 21:46:21 +00:00
Bill Yi
3edda82c5a Import translations. DO NOT MERGE
Change-Id: I16701ceb77a258a903a0d6515b1f2bcf3c55b595
Auto-generated-cl: translation import
2016-07-18 20:51:26 -07:00
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
41cbaf2922 Make the app name "Files" instead of Documents.
This reduces the number of user visible names employed by the app by 1/3!

Bug: 29880363
Change-Id: I52bc8ea1b4437d96c32c4afba3a454ae74d06115
2016-07-15 15:45:11 -07: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