summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-10-01 16:18:28 -0700
committerztenghui <ztenghui@google.com>2013-10-01 16:18:28 -0700
commit367ec61c1c252ca034f870edbdb62305b11a1ba1 (patch)
tree1b3709d4761295792e83b1243b21dad6bab3b6e1
parent671e1e2aaa7f973c55475c2133bef50aa19be27a (diff)
downloadVideoEditor-367ec61c1c252ca034f870edbdb62305b11a1ba1.tar.gz
Replace the ACTION_GET_CONTENT with ACTION_PICK
bug:10932287 Change-Id: I1f49054ce7773a0b0fbcb53affa9c4fc5404b31f
-rwxr-xr-xsrc/com/android/videoeditor/VideoEditorActivity.java26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/com/android/videoeditor/VideoEditorActivity.java b/src/com/android/videoeditor/VideoEditorActivity.java
index ca0b770..01729c9 100755
--- a/src/com/android/videoeditor/VideoEditorActivity.java
+++ b/src/com/android/videoeditor/VideoEditorActivity.java
@@ -257,10 +257,8 @@ public class VideoEditorActivity extends VideoEditorBaseActivity
@Override
public void onAddMediaItem(String afterMediaItemId) {
mInsertMediaItemAfterMediaItemId = afterMediaItemId;
-
- final Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
- intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
- intent.setType("video/*");
+ final Intent intent = new Intent(Intent.ACTION_PICK);
+ intent.setData(MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, REQUEST_CODE_IMPORT_VIDEO);
}
@@ -298,8 +296,8 @@ public class VideoEditorActivity extends VideoEditorBaseActivity
mAudioTrackLayout.setListener(new AudioTrackLinearLayout.AudioTracksLayoutListener() {
@Override
public void onAddAudioTrack() {
- final Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
- intent.setType("audio/*");
+ final Intent intent = new Intent(Intent.ACTION_PICK);
+ intent.setData(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, REQUEST_CODE_IMPORT_MUSIC);
}
});
@@ -576,27 +574,23 @@ public class VideoEditorActivity extends VideoEditorBaseActivity
case R.id.menu_item_import_video: {
mInsertMediaItemAfterMediaItemId = mProject.getLastMediaItemId();
-
- final Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
- intent.setType("video/*");
- intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
+ final Intent intent = new Intent(Intent.ACTION_PICK);
+ intent.setData(MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, REQUEST_CODE_IMPORT_VIDEO);
return true;
}
case R.id.menu_item_import_image: {
mInsertMediaItemAfterMediaItemId = mProject.getLastMediaItemId();
-
- final Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
- intent.setType("image/*");
- intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
+ final Intent intent = new Intent(Intent.ACTION_PICK);
+ intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, REQUEST_CODE_IMPORT_IMAGE);
return true;
}
case R.id.menu_item_import_audio: {
- final Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
- intent.setType("audio/*");
+ final Intent intent = new Intent(Intent.ACTION_PICK);
+ intent.setData(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, REQUEST_CODE_IMPORT_MUSIC);
return true;
}