1544 Commits

Author SHA1 Message Date
TreeHugger Robot
8a032b98fe Merge "DO NOT MERGE: Not to crash DocumentsUI if moving cursor fails." into nyc-mr1-dev 2016-10-14 00:02: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
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
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
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
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
Ben Lin
f4c5b344ae Merge "DO NOT MERGE: Enable switch access api to activate/open files in DocsUI." into nyc-mr1-dev 2016-08-19 20:19:40 +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
Bill Yi
c0f585cedd Import translations. DO NOT MERGE
Change-Id: I772ac3a0184965baf38661af7744143b2dde5c29
Auto-generated-cl: translation import
2016-08-01 23:52:36 -07:00
TreeHugger Robot
45ae57eab4 Merge "DO NOT MERGE: Change the order of 2 statements to remove race." into nyc-mr1-dev 2016-07-26 22:01:45 +00: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
Bill Yi
da6099ec45 Import translations. DO NOT MERGE
Change-Id: I21868a3ae2dabfa27bdd770a55d4d137bdf1811f
Auto-generated-cl: translation import
2016-07-25 04:20:49 -07:00
Bill Yi
7a81bcd670 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 30233028
Change-Id: If78d06c444ccd169c81a1ec4e5d8af86c846ced9
2016-07-21 09:07:41 -07:00
Bill Yi
d955437cec Import translations. DO NOT MERGE
Change-Id: I7726a9e6e3fadac9a4949254a346717adbdc6217
Auto-generated-cl: translation import
2016-07-20 14:35:51 -07: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
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
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
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
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
06b338fbf0 Merge \"Make advanced storage option sticky...\" into nyc-dev
am: 361ccf5eef

Change-Id: Ibc7ebfa9d5f68014592b4fb8793358be5436efce
2016-06-20 20:54:09 +00: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
ba7fc3b35f Merge \"Include cause when reporting errors.\" into nyc-dev
am: 60585e6c54

Change-Id: I014009e3c8e8b167b3d322886cadc20f2d9f6eaf
2016-06-16 19:18:45 +00:00
Steve McKay
56d950c5e6 Include cause when reporting errors.
Bug: 29191892
Change-Id: I5f904da3a8564ec68ca634c28e3eda7f496a5c1c
2016-06-16 10:41:50 -07:00
Felipe Leme
3ff43c5f0c Merge \"Fixed check for visible volume.\" into nyc-dev
am: be0bacda9b

Change-Id: I5b1aa0be01603cfaa09e3dfaa774182f6a62c188
2016-06-10 21:54:36 +00:00
Felipe Leme
e54c409a1f Merge \"Fixed check for volume name.\" into nyc-dev
am: cbfc6eed32

Change-Id: Ieba9951e1899abca040e1ca456f911dc76412037
2016-06-10 20:25:21 +00: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
Baligh Uddin
471718a57f Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 29169863
Change-Id: Icab456e7a193fc6099bbd6e7ff207d542e98830e
2016-06-07 17:16:36 -07:00
Guang Zhu
217e152229 Merge "migrate documents UI tests to use AndroidJUnitRunner" into nyc-dev
am: 56cf05291e

* commit '56cf05291e1ffb54025a47ccb046f44c2d05ef14':
  migrate documents UI tests to use AndroidJUnitRunner

Change-Id: If5e573f0fdb7d9ff8e70f4172fb0adf38c2b552a
2016-06-06 19:27:52 +00:00
Guang Zhu
56cf05291e Merge "migrate documents UI tests to use AndroidJUnitRunner" into nyc-dev 2016-06-06 19:22:32 +00:00
Ben Lin
8454626813 Merge "Adding docsui prefix to access metric tags." into nyc-dev
am: de862e1cc8

* commit 'de862e1cc82d96d22394201cb8867b643e4f2e93':
  Adding docsui prefix to access metric tags.

Change-Id: Id3dc690e4f753af51acb406565c643d2fdc01ec1
2016-06-06 18:08:07 +00:00
Ben Lin
de862e1cc8 Merge "Adding docsui prefix to access metric tags." into nyc-dev 2016-06-06 18:04:12 +00:00
Guang Zhu
1ebd8416ae migrate documents UI tests to use AndroidJUnitRunner
The runner replaces deprecated InstrumentationTestRunner, provides
equivalent functionality, and in addition support JUnit4, sharding
and per test method timeout.

Change-Id: I1c76996d347d3f0f378997f5e7b871279c2b032f
2016-06-06 11:24:31 -04:00
Bill Yi
3be3f6cc5e Import translations. DO NOT MERGE
Change-Id: I1af602c8252ce1006e26a8f965fe56e976fe3439
Auto-generated-cl: translation import
2016-06-03 04:11:55 -07:00
Bill Yi
566cac1be3 Import translations. DO NOT MERGE
Change-Id: I10d88a14b6477e7ba128653756a84c56ea5034c3
Auto-generated-cl: translation import
2016-06-03 04:02:53 -07:00
Steve McKay
5371f04cac Merge "Don\'t assert on uris with stack." into nyc-dev
am: 760b557158

* commit '760b5571582056e756d9fb1bc366247bc26a8e54':
  Don't assert on uris with stack.

Change-Id: I888984060b578ecff9dfefc70e6adacafe49e14c
2016-05-31 22:10:08 +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 a379fad3b9b9e708e9211f7c026ddd13572fc16e)
2016-05-31 20:32:55 +00:00
Garfield, Tan
f846d8518b Merge "Fix an assertion to avoid crash on deletions in Recent root." into nyc-dev
am: 7a91029bff

* commit '7a91029bff3d31e56f12ae1c070ba78043e49e0a':
  Fix an assertion to avoid crash on deletions in Recent root.

Change-Id: Ibae8befa4b424b3da4bd43edb74afc28c5e30f96
2016-05-27 03:31:40 +00:00