summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorbait_dispatcher_monitor_system <bait_dispatcher_monitor_system@localhost>2015-02-19 23:39:07 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-02-19 23:39:07 -0800
commitab4ae99bc50f03ab41b86eba7b4b4ee680d14dc5 (patch)
treee95b804038d6a9058680cab2c7970faf09e25faf /src/com/android
parentec2987bc28d0840e889bd1ba74245abd5b2d100b (diff)
parent4c0d475c7d3be21487a34491a0072918dbbac230 (diff)
downloadandroid_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.java16
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");
+ }
+ }
}
/**