diff options
author | Garfield Tan <xutan@google.com> | 2017-03-01 11:04:35 -0800 |
---|---|---|
committer | Garfield Tan <xutan@google.com> | 2017-03-01 12:09:56 -0800 |
commit | 2d01be108d6c9ca07302dd45674ce45b40ed8160 (patch) | |
tree | 462c7578640605dd5740f9a0318aa0b3d230d5ba /src/com/android/settings/deviceinfo/PrivateVolumeSettings.java | |
parent | 1f1be36aee40f7e12eb34ec32ee08f9bda344177 (diff) | |
download | packages_apps_Settings-2d01be108d6c9ca07302dd45674ce45b40ed8160.tar.gz packages_apps_Settings-2d01be108d6c9ca07302dd45674ce45b40ed8160.tar.bz2 packages_apps_Settings-2d01be108d6c9ca07302dd45674ce45b40ed8160.zip |
Remove DocumentsContract.ACTION_BROWSE.
Test: Code builds and tests pass.
Bug: 35760993
Change-Id: I7e540b71a7be60d250ffec899eb5c08941dc24a8
Diffstat (limited to 'src/com/android/settings/deviceinfo/PrivateVolumeSettings.java')
-rw-r--r-- | src/com/android/settings/deviceinfo/PrivateVolumeSettings.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java index eb07a7fd4a..076ec05b89 100644 --- a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java +++ b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java @@ -483,20 +483,26 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment { } break; case R.string.storage_detail_images: { - intent = new Intent(DocumentsContract.ACTION_BROWSE); - intent.setData(DocumentsContract.buildRootUri(AUTHORITY_MEDIA, "images_root")); + intent = new Intent(Intent.ACTION_VIEW); + intent.setDataAndType( + DocumentsContract.buildRootUri(AUTHORITY_MEDIA, "images_root"), + DocumentsContract.Root.MIME_TYPE_ITEM); intent.addCategory(Intent.CATEGORY_DEFAULT); } break; case R.string.storage_detail_videos: { - intent = new Intent(DocumentsContract.ACTION_BROWSE); - intent.setData(DocumentsContract.buildRootUri(AUTHORITY_MEDIA, "videos_root")); + intent = new Intent(Intent.ACTION_VIEW); + intent.setDataAndType( + DocumentsContract.buildRootUri(AUTHORITY_MEDIA, "videos_root"), + DocumentsContract.Root.MIME_TYPE_ITEM); intent.addCategory(Intent.CATEGORY_DEFAULT); } break; case R.string.storage_detail_audio: { - intent = new Intent(DocumentsContract.ACTION_BROWSE); - intent.setData(DocumentsContract.buildRootUri(AUTHORITY_MEDIA, "audio_root")); + intent = new Intent(DocumentsContract.Root.MIME_TYPE_ITEM); + intent.setDataAndType( + DocumentsContract.buildRootUri(AUTHORITY_MEDIA, "audio_root"), + DocumentsContract.Root.MIME_TYPE_ITEM); intent.addCategory(Intent.CATEGORY_DEFAULT); } break; |