Commit Graph

865 Commits

Author SHA1 Message Date
Garfield Tan
cc6a8b5190 DO NOT MERGE: Not to crash DocumentsUI if moving cursor fails.
am: d91dd17f36

Change-Id: Ia7400ff8e4ecfd903a6ff7f5158786d3fd8c1bff
2016-10-14 00:05:32 +00:00
Ben Lin
f3b7acecc7 Removing a mimeIcon specific for album folders from MediaProvider.
am: 6d33357882

Change-Id: I07ec7d315c510a5c3bb289a7fa2f6bb8100ebee8
2016-10-13 23:51:33 +00:00
Garfield Tan
d91dd17f36 DO NOT MERGE: Not to crash DocumentsUI if moving cursor fails.
Bug: 31945164
Bug: 30348114
Change-Id: I3ac675c83379dc269ca8e0ff1678dc3979df5252
2016-10-12 12:31:15 -07:00
Ben Lin
6d33357882 Removing a mimeIcon specific for album folders from MediaProvider.
Bug: 32019092
Change-Id: I3e088194023c86adbff4ada3cfd2bb2ba7ee220a
2016-10-11 11:58:55 -07:00
Ben Lin
5e1e779098 DO NOT MERGE ANYWHERE
Remove onBeforePop() logic so back no longer opens/closes drawer.

Bug: 30814333
Change-Id: I4f6fc2a353286f69b88e5340145f7f9b3a97e819
2016-09-19 17:10:20 -07:00
Steve McKay
b40d2cd0b3 DO NOT MERGE: Accurately emulate historic Downloads ACTION_VIEW behavior.
am: 3f5885918b

Change-Id: Ibe8c67367649ecc5a229b86592257b976ba2411d
2016-09-08 17:31:12 +00:00
Steve McKay
3f5885918b DO NOT MERGE: Accurately emulate historic Downloads ACTION_VIEW behavior.
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
2016-09-07 20:28:51 +00:00
Steve McKay
89eb830a73 DO NOT MERGE: Don't create DocumentInfo instances in background.
am: b818058f4e

Change-Id: Ib43fd7c9cba300821a908f7036415b8b1635bb4a
2016-08-24 19:55:22 +00:00
TreeHugger Robot
850912db88 Merge "DO NOT MERGE: Don't create DocumentInfo instances in background." into nyc-mr1-dev 2016-08-24 19:49:36 +00:00
Steve McKay
b818058f4e DO NOT MERGE: Don't create DocumentInfo instances in background.
Cursor access is not threadsafe resulting in operations on incorrect files.

Bug: 30082168
Change-Id: Ib36d5b7acdee9463b6ebd2553172e5ecb4d70857
2016-08-24 01:34:45 +00:00
Steve McKay
6c06272a12 DO NOT MERGE: Treat unknown tooltype as touch.
am: 0c28f3bda3

Change-Id: Idbee59d7450b63735291f5218784c87f762ed19b
2016-08-23 14:38:27 +00:00
TreeHugger Robot
8499c13740 Merge "DO NOT MERGE: Treat unknown tooltype as touch." into nyc-mr1-dev 2016-08-22 20:15:26 +00:00
TreeHugger Robot
1ae521df6a Merge "DO NOT MERGE ANYWHERE" into nyc-mr1-dev 2016-08-20 03:25:36 +00:00
Shunta Sato
4024460305 DO NOT MERGE: Don't delete source file when a move opration is canceled
am: 682d370390

Change-Id: I22b980489abe69675fe05d166576dfdbd1bd5c64
2016-08-20 00:25:03 +00:00
TreeHugger Robot
d4f39096dd Merge "DO NOT MERGE: Don't delete source file when a move opration is canceled" into nyc-mr1-dev 2016-08-20 00:19:47 +00:00
TreeHugger Robot
8c0b46c420 Merge "DO NOT MERGE ANYWHERE - Clear preferences when package is removed." into nyc-mr1-dev 2016-08-19 22:41:11 +00:00
Felipe Leme
a11d02477e DO NOT MERGE ANYWHERE
(cherrpy pick of commit cc8fcf2efd66afdaa900b4d27e1eb784e8d40752).

Don't open drawer when back is pressed after being launched externally.

Change-Id: I3e8afd68c33b519dd5d6b27e3fa94653c2537612
Fixes: 30743235
2016-08-17 13:54:02 -07:00
Felipe Leme
20488d97cd DO NOT MERGE ANYWHERE - Clear preferences when package is removed.
(cherry pick of commits 2154caf2f80fa87df84813b8e344f85094a454fd and
da1fc0a9c23697cc255efdccc47862bd1277da3f).

Change-Id: I5a019d771da6ff52ea36ee683a44405f6ea24853
Fixes: 30900628
Fixes: 28722556
2016-08-17 13:51:01 -07:00
Shunta Sato
682d370390 DO NOT MERGE: Don't delete source file when a move opration is canceled
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
2016-08-04 14:43:34 -07:00
Steve McKay
0c28f3bda3 DO NOT MERGE: Treat unknown tooltype as touch.
DNM because code has changed in master.

Bug: 30182625
Change-Id: I0f226abd9eb6899d8a3ecd1c24bb1b261b3d3677
2016-08-03 17:34:46 +00:00
Ben Lin
d06893eb10 DO NOT MERGE: Enable switch access api to activate/open files in DocsUI.
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
2016-08-02 16:53:42 -07:00
Garfield, Tan
ebb8450cd0 DO NOT MERGE: Change the order of 2 statements to remove race.
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
2016-07-25 10:12:22 -07: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
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
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
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
Steve McKay
dd27444fa8 Make advanced storage option sticky...
...when used from one of the picker modes.

Bug: 29454465
Change-Id: I5f7db04a51023b59121289afd300a13ea071146d
2016-06-20 11:57:19 -07:00
Steve McKay
56d950c5e6 Include cause when reporting errors.
Bug: 29191892
Change-Id: I5f904da3a8564ec68ca634c28e3eda7f496a5c1c
2016-06-16 10:41:50 -07:00
Felipe Leme
24cc2cea74 Fixed check for visible volume.
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
2016-06-10 12:10:16 -07:00
Felipe Leme
60f8f72cd4 Fixed check for volume name.
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
2016-06-10 11:07:35 -07:00
Ben Lin
de862e1cc8 Merge "Adding docsui prefix to access metric tags." into nyc-dev 2016-06-06 18:04:12 +00:00
Steve McKay
3c6d499858 Don't assert on uris with stack.
This is legal arrangement when viewing Archives.
Bug: 28923366

Change-Id: I75a26edc8dac865f536a7c5bcdef1ba00b0883f0
(cherry picked from commit a379fad3b9)
2016-05-31 20:32:55 +00:00
Ben Lin
1a3b676441 Adding docsui prefix to access metric tags.
Bug: 28934495
Change-Id: I44291b887e8aa9f4412ee1e7e1826ea68ffb40b9
2016-05-26 16:19:21 -07:00
Garfield, Tan
01958b11ef Fix an assertion to avoid crash on deletions in Recent root.
Bug: 28917333
Change-Id: I758c01898a6bb45cbf4975a1e7223efddd17a448
2016-05-26 16:06:04 -07:00
Steve McKay
78951ad998 Fix RTL issue in delete dialog.
Bug:28772371
Change-Id: Ia5d3e074ac40b73f21cc83f507735d0918799966
2016-05-19 11:21:41 -07:00
TreeHugger Robot
fec0d188c1 Merge "Don't show new-window item in Downloads per Gabe." into nyc-dev 2016-05-13 17:26:46 +00:00
Ben Lin
f2413b79c6 Merge "Removed duplicate call to Metric log, and using private logging method." into nyc-dev 2016-05-11 17:36:26 +00:00
Steve McKay
f570c771f2 Don't show new-window item in Downloads per Gabe.
Also, fix regression...don't show "internal storage" option in Downloads.
All other modes, fix inconsistencies in presentation of
internal-storage/new-windows commands by eliminating launch mode inference.
Update VolumeInfo and MTP provider to send correct launch mode extra.

Bug: 28691735,28695347
Change-Id: Ic480925f4c8f1beee4da104a2259c1ce5f28a6a1
2016-05-10 16:25:58 -07:00
TreeHugger Robot
522a437786 Merge "Don't persist selection after restore." into nyc-dev 2016-05-06 22:11:14 +00:00
Ben Lin
ae00a14ae3 Removed duplicate call to Metric log, and using private logging method.
Bug: 28554140
Change-Id: I071c50ef5b51de65e71b85453cf83acae5ad6af7
2016-05-06 12:32:15 -07:00
Steve McKay
99544dd0f4 Don't persist selection after restore.
Bug: 28469988
Change-Id: I1fec774d8ebdec13b33262d7fe8e17fccd84b657
2016-05-06 12:27:49 -07:00
Steve McKay
5acf1ac2ab Fix regression, show internal storage option...
...for non "Downloads" scenarios like "Copy to".
Bug: 28552420

Change-Id: If317e3f575a40cac69628c1b6eecfc6be1dfcbce
2016-05-05 14:38:55 -07:00
TreeHugger Robot
94e3b80d5b Merge "Finish selection mode after copyto and share..." into nyc-dev 2016-05-04 20:58:39 +00:00
Steve McKay
3fff306827 Merge "Disable share when dirs selected." into nyc-dev 2016-05-04 16:46:30 +00:00
Steve McKay
080efafe1f Finish selection mode after copyto and share...
actions are picked by user.
Bug: 27601508

Change-Id: I32cbc8e8eb4abba4161309327d5ce730610193ad
2016-05-03 17:48:22 -07:00
Steve McKay
9efd34e00c Disable share when dirs selected.
Pass a SelectionDetails object instead of a pile of booleans into updateActionMenu.
Normalized "is feature X enabled" naming.
Normalized menu fiddling in FilesTuner.

Bug: 28467604
Change-Id: Ic88fab78adf02f794ef0c0550443a3c075e7bab6
2016-05-03 15:57:27 -07:00
Vladislav Kaznacheev
067d6fadd9 Collect mime type data correctly for all URIs added to ClipData
Bug: 28452937
Change-Id: I883ae2d22e09000137fa484ef66d5070855cd0ed
2016-05-03 15:53:45 -07:00
Ben Lin
2360aa33db Merge "Safe check so we don't move cursor beyond possible pos scope." into nyc-dev 2016-04-27 20:33:52 +00:00
TreeHugger Robot
e597323939 Merge "Terminate DocumentsUI opened for the specific root." into nyc-dev 2016-04-27 01:18:44 +00:00
Tomasz Mikolajewski
b56bc29657 Merge "Exclude virtual files from ACTION_SEND." into nyc-dev 2016-04-27 01:11:04 +00:00