In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.
(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)
Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
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