Support video attachments through GalleryMediaChooser
GalleryMediaChooser supports video types and more image types also. And video thumbnails are overlaid with the play button image to distinguish between images and videos. Note: 1. EXTRA_ALLOW_MULTIPLE is not specified for ACTION_GET_CONTENT. 2. Files, methods and variables' name are still including "image". 3. Content descriptions are not updated. Test: Manual Change-Id: I961928f150e4ae8ee80a1fba2f20c37fb5426669 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
@@ -30,8 +30,8 @@ import com.android.messaging.util.ImageUtils;
|
||||
import com.android.messaging.util.SafeAsyncTask;
|
||||
|
||||
/**
|
||||
* Wraps around the functionalities to allow the user to pick images from the document
|
||||
* picker. Instances of this class must be tied to a Fragment which is able to delegate activity
|
||||
* Wraps around the functionalities to allow the user to pick an image/video from the document
|
||||
* picker. Instances of this class must be tied to a Fragment which is able to delegate activity
|
||||
* result callbacks.
|
||||
*/
|
||||
public class DocumentImagePicker {
|
||||
@@ -79,8 +79,8 @@ public class DocumentImagePicker {
|
||||
* Must be called from the fragment/activity's onActivityResult().
|
||||
*/
|
||||
public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
|
||||
if (requestCode == UIIntents.REQUEST_PICK_IMAGE_FROM_DOCUMENT_PICKER &&
|
||||
resultCode == Activity.RESULT_OK) {
|
||||
if (requestCode == UIIntents.REQUEST_PICK_MEDIA_FROM_DOCUMENT_PICKER
|
||||
&& resultCode == Activity.RESULT_OK) {
|
||||
// Sometimes called after media item has been picked from the document picker.
|
||||
String url = data.getStringExtra(EXTRA_PHOTO_URL);
|
||||
if (url == null) {
|
||||
|
||||
Reference in New Issue
Block a user