From bbdb9c4bf9fa7d4aec3c634520f6352155b28fb5 Mon Sep 17 00:00:00 2001 From: TheScarastic Date: Thu, 27 Jul 2023 08:04:17 +0000 Subject: [PATCH] Revert "Gallery2: Set content URI as data in share intents" This reverts commit a9983149b633924fdf212c9b18271783e28c8e70. --- src/com/android/gallery3d/app/PhotoPage.java | 2 +- src/com/android/gallery3d/ui/ActionModeHandler.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index df72f7837..79a193941 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -685,7 +685,7 @@ public abstract class PhotoPage extends ActivityState implements if (mModel != null && mModel.getMediaItem(0) != null) { Uri uri = mActivity.getDataManager().getContentUri(mModel.getMediaItem(0).getPath()); mActivity.isTopMenuShow = true; - mShareIntent.setDataAndType(uri, MenuExecutor.getMimeType(mModel + mShareIntent.setType(MenuExecutor.getMimeType(mModel .getMediaItem(0).getMediaType())); mShareIntent.putExtra(Intent.EXTRA_STREAM, uri); String shareTitle = mActivity.getResources(). diff --git a/src/com/android/gallery3d/ui/ActionModeHandler.java b/src/com/android/gallery3d/ui/ActionModeHandler.java index 605de39e8..b46a39307 100644 --- a/src/com/android/gallery3d/ui/ActionModeHandler.java +++ b/src/com/android/gallery3d/ui/ActionModeHandler.java @@ -386,7 +386,7 @@ public class ActionModeHandler implements Callback, PopupList.OnPopupItemClickLi intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris); } else { intent.setAction(Intent.ACTION_SEND); - intent.setDataAndType(uris.get(0), GalleryUtils.MIME_TYPE_PANORAMA360); + intent.setType(GalleryUtils.MIME_TYPE_PANORAMA360); intent.putExtra(Intent.EXTRA_STREAM, uris.get(0)); } intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); @@ -425,7 +425,7 @@ public class ActionModeHandler implements Callback, PopupList.OnPopupItemClickLi intent.setAction(Intent.ACTION_SEND_MULTIPLE).setType(mimeType); intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris); } else { - intent.setAction(Intent.ACTION_SEND).setDataAndType(uris.get(0), mimeType); + intent.setAction(Intent.ACTION_SEND).setType(mimeType); intent.putExtra(Intent.EXTRA_STREAM, uris.get(0)); } intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); -- GitLab