Add write permision to VIEW intent (don't regress bahavior).
Add (already known) mimetype when creating intent.
Test: Download a CSV file to Downloads *root*.
Install Sheets from play store.
Navigate to Settings > Storage > Explore > (device name) > Download
Tap CSV file.
It should open.
NOTE: This is a (manual) cherrypick from master. Manual part necessary
as DocumentsUI has moved to a new repo in master.
a4e765f16e
Bug: 31245151
Change-Id: Ic64c655d33182e559f9645c1e173b2fe4b601d6c
(cherrpy pick of commit cc8fcf2efd66afdaa900b4d27e1eb784e8d40752).
Don't open drawer when back is pressed after being launched externally.
Change-Id: I3e8afd68c33b519dd5d6b27e3fa94653c2537612
Fixes: 30743235
DNM becuase Code has moved in master.
Symptom:
A source file is deleted even if a move operation is cancled
Root cause:
MoveJob doesn't check whether a move operation is canceled or not
after copying file
Solution:
Add cancel condition check before deleting a source file
Bug: 30240042
Author: Shiotani Kouji <kouji.x.shiotani@sonymobile.com>
Change-Id: Ie68e5d96304a125c07d46a2fd5e4c9d84903d1e7
Switch Access uses OnClickListener() on individual views to check
whether a view is "clickable" or not. If it is clickable, using
prev/next keys will highlight to these clickable views. Since DocsUI
used to simply trap touch events and did not have any OnClickListeners
on its list/grid child views, switch access was not able to pick up
these views as clickable views. Simply adding an OnClickListener() fixes
this particular bug, but then a regular touch using finger/mouse would
trigger both onClick() and OnSingleTapUp(MotionEvent), which causes
double-firing and lead to unexpected behavior.
This fix overrides two accessibility-related methods in the
recyclerView's layoutManager, which the recyclerView delegates to.
Switch Access should now be routed to the correct behavior (which opens the
file/doc).
Bug: 30077035
Change-Id: I380d7529fa041f7b4905170f43f28a4235dc118d
When we finish action mode we access to the cursor of model in main
thread to remove selection. When we transfer documents we have a
GetDocumentsTask that access the cursor in background. This creates a
race condition that contaminates the final copy result.
Temporary solution is to finish action mode first and then transfer
documents so that when GetDocumentsTask is running action mode is
already finished.
Permanent solution is provided as part of ag/1138398 which removes
GetDocumentsTask.
Bug: 30082168
Change-Id: I5bffe2093a58c856044026913d038f80a3fd7d55
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
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
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
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
The runner replaces deprecated InstrumentationTestRunner, provides
equivalent functionality, and in addition support JUnit4, sharding
and per test method timeout.
Change-Id: I1c76996d347d3f0f378997f5e7b871279c2b032f
This is legal arrangement when viewing Archives.
Bug: 28923366
Change-Id: I75a26edc8dac865f536a7c5bcdef1ba00b0883f0
(cherry picked from commit a379fad3b9b9e708e9211f7c026ddd13572fc16e)
am: 7a91029bff
* commit '7a91029bff3d31e56f12ae1c070ba78043e49e0a':
Fix an assertion to avoid crash on deletions in Recent root.
Change-Id: Ibae8befa4b424b3da4bd43edb74afc28c5e30f96