Commit Graph

29 Commits

Author SHA1 Message Date
Alan Kinzie
b0ee9dd905 CB-8253 Fix potential unreleased resources
There was a place (~line 701) in CameraLauncher.java where there was the
potential for input and output streams to never be closed if an exception
occurs at the wrong time.   There were some other places where an
InputStream was used anonymously, and so would never be closed.

This change introduces try/finally blocks to ensure that the streams will
always end up closed.

Change-Id: I479bceddcd631bfec45c3f5ee7e88ddb04c59073

Signed-off-by: Joe Bowser <bowserj@apache.org>

(Closes #90)
2015-05-06 10:17:43 -07:00
Joe Bowser
c2e0db2b86 CB-8909: Remove unused import from File 2015-04-24 14:24:47 -07:00
Joe Bowser
9fe5b430aa CB-8782: Fixed the flow so that we save the cropped image and use it, not the original non-cropped. Crop only supports G+ Photos Crop, other crops may not work, depending on the OEM 2015-04-01 11:04:06 -07:00
Joe Bowser
23dbb8889a CB-8740: Removing FileHelper call that was failing on Samsung Galaxy S3, now that we have a real path, we only need to update the MediaStore, not pull from it in this case 2015-04-01 11:04:06 -07:00
Joe Bowser
ac4af88f55 CB-8740: Partial fix for Save Image to Gallery error found in MobileSpec 2015-04-01 11:04:06 -07:00
Brian Bolton
8b8db828f6 Pass uri to crop instead of pulling the low resolution image out of the intent return (close #43) 2014-10-07 15:47:04 -04:00
yoshifp
03fade661e Add orientation support for PNG to Android (closes #45) 2014-10-07 15:44:27 -04:00
Andrew Grieve
e4ab155fd0 CB-7071 android: Fix callback firing before CROP intent is sent when allowEdit=true 2014-07-03 13:21:52 -04:00
Dominik Pesch
543c4198d8 CB-6875 android: Handle exception when SDCard is not mounted
close #29
2014-06-27 13:55:18 -04:00
Manu Garcia Urreta
5b8324e984 Prevent NPE on processResiultFromGallery when intent comes null
close #22
2014-06-27 13:33:03 -04:00
Andrew Grieve
d899d7a4b8 CB-6546 android: Fix a couple bugs with allowEdit pull request
- Don't set width/height when they are not specified
- photolibrary returns null from getData when image is cropped
2014-04-29 00:51:09 -04:00
Andrew Grieve
c7d88e8b34 CB-6546 android: Add support for allowEdit Camera option
GitHub: Close #12
2014-04-29 00:49:29 -04:00
Andrew Grieve
f3a704b59d CB-1826 Android: Guard against content provider not supplying orientation 2014-02-24 14:30:28 -05:00
Clément Vollet
4ae4414856 CB-1826 Catch OOM on gallery image resize 2014-02-13 13:26:48 -05:00
Clément Vollet
61ba9cca4b Refactor onActivityResult 2014-02-13 13:24:41 -05:00
Kevin Woram
6f4fef8479 CB-5599 Android: Catch and ignore OutOfMemoryError in getRotatedBitmap()
getRotatedBitmap() can run out of memory if the image is very large:

http://simonmacdonald.blogspot.ca/2012/07/change-to-camera-code-in-phonegap-190.html

If this happens, simply do not rotate the image and return it unmodified.  If you do not catch the OutOfMemoryError, the Android app crashes.
2013-12-06 14:50:59 -05:00
Andrew Grieve
bc32c501da [CB-4765] Move ExifHelper.java into Camera Plugin 2013-09-09 16:15:16 -04:00
Andrew Grieve
df028dd257 [CB-4764] Remove reference to DirectoryManager from CameraLauncher 2013-09-09 16:10:16 -04:00
Andrew Grieve
44517ea93f [CB-4763] Use a copy of FileHelper.java within camera-plugin. 2013-09-09 15:10:40 -04:00
Joe Bowser
f33e00083a CB-4633: We really should close cursors. It's just the right thing to do. 2013-09-04 11:34:13 -07:00
Joe Bowser
118ca18d5a No longer causes a stack trace, but it doesn't cause the error to be called. 2013-09-04 11:34:13 -07:00
Andrew Grieve
382e9421e7 [CB-4656] Don't add line-breaks to base64-encoded images. 2013-08-29 14:09:33 -04:00
Andrew Grieve
6846cb04e3 [CB-4417] Move cordova-plugin-camera to its own Java package. 2013-08-14 14:37:25 -07:00
Max Woghiren
648a53647d [CB-1605] Warning cleanup! Removed unused import. 2013-07-11 17:48:12 -04:00
Andrew Grieve
1b27bf0035 [CB-4038] - Remove o.a.c.api namespace 2013-07-10 09:31:32 -04:00
Steven Gill
509991b50f updated CamaeraLauncher.java 2013-06-13 14:43:56 -07:00
Joe Bowser
5455bbeb37 Updating CameraLauncher based on changes in master, read pre-3.0 commit history for author info 2013-05-13 11:42:53 -07:00
Joe Bowser
aaef443dc6 Updating Plugin from curent source 2013-04-17 14:22:56 -07:00
Joe Bowser
a0bff7b154 Initial Commit 2013-04-01 15:35:43 -07:00