diff options
author | zhuw <zhuw@codeaurora.org> | 2018-09-20 14:00:43 +0800 |
---|---|---|
committer | zhuw <zhuw@codeaurora.org> | 2018-09-20 14:00:43 +0800 |
commit | 583470352c91cc50bb8109d32325c8d55e6bee90 (patch) | |
tree | 43f7487dc6e27f64f3e1ff302b150f1e03bacc24 /src/com/android/gallery3d/app | |
parent | bb4cc19c7f1c7fd83d0db47c2b2e4ad84187d2ad (diff) | |
download | android_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-x | src/com/android/gallery3d/app/PhotoPage.java | 4 |
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)); } |