diff options
author | bait_dispatcher_monitor_system <bait_dispatcher_monitor_system@localhost> | 2015-02-19 23:39:07 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-02-19 23:39:07 -0800 |
commit | ab4ae99bc50f03ab41b86eba7b4b4ee680d14dc5 (patch) | |
tree | e95b804038d6a9058680cab2c7970faf09e25faf /src/com/android | |
parent | ec2987bc28d0840e889bd1ba74245abd5b2d100b (diff) | |
parent | 4c0d475c7d3be21487a34491a0072918dbbac230 (diff) | |
download | android_packages_apps_Snap-ab4ae99bc50f03ab41b86eba7b4b4ee680d14dc5.tar.gz android_packages_apps_Snap-ab4ae99bc50f03ab41b86eba7b4b4ee680d14dc5.tar.bz2 android_packages_apps_Snap-ab4ae99bc50f03ab41b86eba7b4b4ee680d14dc5.zip |
Merge "SnapdragonCamera: Fix play the video directly when goto gallery"
Diffstat (limited to 'src/com/android')
-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"); + } + } } /** |