diff options
author | Erin Dahlgren <edahlgren@google.com> | 2013-11-07 11:35:10 -0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2013-11-07 17:04:38 -0800 |
commit | 5eefffdfb0b93f7a1b3d4c167c25d8a2a4a68d08 (patch) | |
tree | 7baae17d065eeda8ca3627de781037eff325d2fb | |
parent | 01341ec00c03577c6d8a1652463e1a6aaef16270 (diff) | |
download | android_packages_apps_Camera2-5eefffdfb0b93f7a1b3d4c167c25d8a2a4a68d08.tar.gz android_packages_apps_Camera2-5eefffdfb0b93f7a1b3d4c167c25d8a2a4a68d08.tar.bz2 android_packages_apps_Camera2-5eefffdfb0b93f7a1b3d4c167c25d8a2a4a68d08.zip |
Show chooser on EDIT intents that have no activity for action.
Bug: 11571947
Change-Id: I40ef0f9ae6b4567557064d91b9c3942cd524a60b
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 7 |
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); + } } /** |