summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera
diff options
context:
space:
mode:
authorErin Dahlgren <edahlgren@google.com>2013-11-07 11:35:10 -0800
committerErin Dahlgren <edahlgren@google.com>2013-11-07 11:35:10 -0800
commit05a04924312fbcda2161da01e0749eb80c2663d1 (patch)
treebc09b5a69b614439e3baa8e000250e3216f710c0 /src/com/android/camera
parent7e6e947f0e530c14b32785bdb3094ea473000a12 (diff)
downloadandroid_packages_apps_Snap-05a04924312fbcda2161da01e0749eb80c2663d1.tar.gz
android_packages_apps_Snap-05a04924312fbcda2161da01e0749eb80c2663d1.tar.bz2
android_packages_apps_Snap-05a04924312fbcda2161da01e0749eb80c2663d1.zip
Show chooser on EDIT intents that have no activity for action.
Bug: 11571947 Change-Id: I40ef0f9ae6b4567557064d91b9c3942cd524a60b
Diffstat (limited to 'src/com/android/camera')
-rw-r--r--src/com/android/camera/CameraActivity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index e1d2a924f..11e7610d0 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -1394,7 +1394,12 @@ public class CameraActivity extends Activity
Intent intent = new Intent(Intent.ACTION_EDIT)
.setDataAndType(data.getContentUri(), data.getMimeType())
.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
- startActivityForResult(intent, REQ_CODE_DONT_SWITCH_TO_PREVIEW);
+ try {
+ startActivityForResult(intent, REQ_CODE_DONT_SWITCH_TO_PREVIEW);
+ } catch (ActivityNotFoundException e) {
+ startActivityForResult(Intent.createChooser(intent, null),
+ REQ_CODE_DONT_SWITCH_TO_PREVIEW);
+ }
}
/**