From 5eefffdfb0b93f7a1b3d4c167c25d8a2a4a68d08 Mon Sep 17 00:00:00 2001 From: Erin Dahlgren Date: Thu, 7 Nov 2013 11:35:10 -0800 Subject: Show chooser on EDIT intents that have no activity for action. Bug: 11571947 Change-Id: I40ef0f9ae6b4567557064d91b9c3942cd524a60b --- src/com/android/camera/CameraActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); + } } /** -- cgit v1.2.3