diff options
author | bait_dispatcher_monitor_system <bait_dispatcher_monitor_system@localhost> | 2015-02-19 22:48:15 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-02-19 22:48:15 -0800 |
commit | 542cf402a8958f8bab78dfd2b21991b290bd14b5 (patch) | |
tree | 643bc06aabb601d01a736d44e404742ee8e79784 /src | |
parent | 026479b81cb5955d3f6ac415b29a85b7418a63df (diff) | |
parent | 729ec2972cb37463d8a1b98133904ce0e0996668 (diff) | |
download | android_packages_apps_Snap-542cf402a8958f8bab78dfd2b21991b290bd14b5.tar.gz android_packages_apps_Snap-542cf402a8958f8bab78dfd2b21991b290bd14b5.tar.bz2 android_packages_apps_Snap-542cf402a8958f8bab78dfd2b21991b290bd14b5.zip |
Merge "SnapdragonCamera: Fix play the video directly when goto gallery"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index dd4a9897a..cdaedbb8a 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -563,8 +563,20 @@ public class CameraActivity extends Activity return; } } - Intent intent = new Intent(Intent.ACTION_VIEW, uri); - startActivity(intent); + try { + Intent intent = IntentHelper.getGalleryIntent(this); + intent.setAction(Intent.ACTION_VIEW); + intent.setData(uri); + startActivity(intent); + } catch (ActivityNotFoundException ex) { + try { + Log.w(TAG, "Gallery not found"); + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + } catch (ActivityNotFoundException e) { + Log.w(TAG, "No Activity could be found to open image or video"); + } + } } /** |