summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app
diff options
context:
space:
mode:
authorzhuw <zhuw@codeaurora.org>2018-09-20 14:00:43 +0800
committerzhuw <zhuw@codeaurora.org>2018-09-20 14:00:43 +0800
commit583470352c91cc50bb8109d32325c8d55e6bee90 (patch)
tree43f7487dc6e27f64f3e1ff302b150f1e03bacc24 /src/com/android/gallery3d/app
parentbb4cc19c7f1c7fd83d0db47c2b2e4ad84187d2ad (diff)
downloadandroid_packages_apps_Gallery2-583470352c91cc50bb8109d32325c8d55e6bee90.tar.gz
android_packages_apps_Gallery2-583470352c91cc50bb8109d32325c8d55e6bee90.tar.bz2
android_packages_apps_Gallery2-583470352c91cc50bb8109d32325c8d55e6bee90.zip
fix force close during share
can't share uri started with file: Change-Id: If1be32ce2d6afee444cb926e0c5921325689e69e
Diffstat (limited to 'src/com/android/gallery3d/app')
-rwxr-xr-xsrc/com/android/gallery3d/app/PhotoPage.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 910500157..90e47ab82 100755
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -694,6 +694,10 @@ public abstract class PhotoPage extends ActivityState implements
mShareIntent.putExtra(Intent.EXTRA_STREAM, uri);
String shareTitle = mActivity.getResources().
getString(R.string.share_dialogue_title);
+ if (uri.toString().contains("file:")) {
+ Log.d(TAG, "can't share uri started with file://");
+ return;
+ }
mActivity.startActivity(Intent.createChooser(mShareIntent,
shareTitle));
}