summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CameraActivity.java
diff options
context:
space:
mode:
authorbait_dispatcher_monitor_system <bait_dispatcher_monitor_system@localhost>2015-02-19 22:48:15 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-02-19 22:48:15 -0800
commit542cf402a8958f8bab78dfd2b21991b290bd14b5 (patch)
tree643bc06aabb601d01a736d44e404742ee8e79784 /src/com/android/camera/CameraActivity.java
parent026479b81cb5955d3f6ac415b29a85b7418a63df (diff)
parent729ec2972cb37463d8a1b98133904ce0e0996668 (diff)
downloadandroid_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/com/android/camera/CameraActivity.java')
-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");
+ }
+ }
}
/**