OSDN Git Service

DO NOT MERGE: Accurately emulate historic Downloads ACTION_VIEW behavior.
authorSteve McKay <smckay@google.com>
Fri, 2 Sep 2016 23:38:41 +0000 (16:38 -0700)
committerSteve McKay <smckay@google.com>
Wed, 7 Sep 2016 20:28:51 +0000 (20:28 +0000)
commit3f5885918b60824d98386f9c31b7dd189b7f426c
tree009278b38a52635fcd82902a9f39cf34b451268b
parenta2153e6246138d303fe824d99aadf28886767743
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.
https://googleplex-android.googlesource.com/platform/frameworks/base/+/a4e765f16e3c0031343af55df65380df44672825

Bug: 31245151
Change-Id: Ic64c655d33182e559f9645c1e173b2fe4b601d6c
packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java
packages/DocumentsUI/src/com/android/documentsui/model/DocumentInfo.java