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)
Pull event handling logic out of MultiSelectManager into UserInputHandler.
Pull out a couple common test support classes.
Change-Id: I8958fec9cda05f52192a07a682c318e049871a8d
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
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
* 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
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)
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
* Rename class ClipDetails.
* Add FileOperation class and merge it with JobFactory.
Bug: 28194201
Change-Id: I46639b21c9e424644289a1bf34b85234a9becd2b
(cherry picked from commit 7f17819f1320d12f1f35a8f5327e0c7e63dfed54)
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
* 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)
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)
* Save selection to disk, delete old selections on app startup.
* Do clipper work in background for copy/cut.
* Pull DragShadowBuilder out of DirFragment.
* Reorganize selection handling to avoid creation of large lists of objects.
* Eliminate getAll from selection, make it iterable, remove unused method.
* Avoid creating DocumentInfo instances for full selection when initiating drag and drop.
Next step will be to pass selection tokens to FileOperationService.
Change-Id: Ia3e30a88ebf328e5b045d06b0df15dbd26a01a42
(cherry picked from commit 69b63de63ddae8d1a3ad8fa49a0beb1ff6f921e1)
It looks like if we pass timeout_msec 300000 main thread is then
blocked. If we ever post a runnable to it synchronously in test, we'll
get a deadlock.
Change-Id: I7bd4ce2aaa1ffad72b83a343ff3331179896bd78
Previously it was checked if the volume was visible to user, but
transient volumes (such as USB drives) are not marked as such.
Fixes: 29174953
Change-Id: I5dbcc42c5b31c6856e01f73815d73482822785d9
There are scenarios - like when an SD Card is adopted as internal
storage - where the getBestVolumeDescription() returns null, in which
case we should use the StorageVolume description instead (or a default
value if such description is also null)>
Change-Id: Ia11c3f4069dfbe252c568210ee60b5d8c384d863
Fixes: 29198046
We are now also returning fragmentTuner at the activity level, so that
directoryFragment does not have to do a .pick() logic depending on the
activity type. Rather, the logic lies within the activity itself.
Bug: 24416336
Change-Id: Idb200864f6c9468b9193781f6ac505b557ffbce9
(cherry picked from commit bc330a4bf53c3a766292097d1815b9abd469a945)
Also add some main thread assertions.
Change-Id: Id6314d6e92d530ce57a01902b5570381fa20044d
(cherry picked from commit 1a1b9148a2094b4365ff5e65372b1a1eb0282a0a)