Updated Branches:
  refs/heads/master 380c4d91f -> 0a978a661

Fixes CB-1619 Shutter stays shut

Set pickerController to nil once the UIImageController has been closed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/0a978a66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/0a978a66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/0a978a66

Branch: refs/heads/master
Commit: 0a978a6617c58bfa98968e0c6bdcdb4f10f01902
Parents: 380c4d9
Author: Becky Gibson <becka...@apache.org>
Authored: Mon Oct 15 08:42:51 2012 -0400
Committer: Becky Gibson <becka...@apache.org>
Committed: Mon Oct 15 08:42:51 2012 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVCamera.m  |    2 ++
 CordovaLib/Classes/CDVCapture.m |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/0a978a66/CordovaLib/Classes/CDVCamera.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCamera.m b/CordovaLib/Classes/CDVCamera.m
index f93b994..cfbf415 100644
--- a/CordovaLib/Classes/CDVCamera.m
+++ b/CordovaLib/Classes/CDVCamera.m
@@ -302,6 +302,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
     }
 
     self.hasPendingOperation = NO;
+    self.pickerController = nil;
 }
 
 // older api calls newer didFinishPickingMediaWithInfo
@@ -327,6 +328,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
     [self.commandDelegate sendPluginResult:result 
callbackId:cameraPicker.callbackId];
 
     self.hasPendingOperation = NO;
+    self.pickerController = nil;
 }
 
 - (UIImage*)imageByScalingAndCroppingForSize:(UIImage*)anImage 
toSize:(CGSize)targetSize

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/0a978a66/CordovaLib/Classes/CDVCapture.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCapture.m b/CordovaLib/Classes/CDVCapture.m
index 43b14b2..993c81b 100644
--- a/CordovaLib/Classes/CDVCapture.m
+++ b/CordovaLib/Classes/CDVCapture.m
@@ -233,6 +233,7 @@
         NSLog(@"Capture.captureVideo: video mode not available.");
         CDVPluginResult* result = [CDVPluginResult 
resultWithStatus:CDVCommandStatus_ERROR 
messageToErrorObject:CAPTURE_NOT_SUPPORTED];
         [self.commandDelegate sendPluginResult:result callbackId:callbackId];
+        pickerController = nil;
     } else {
         pickerController.delegate = self;
         pickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
@@ -496,6 +497,7 @@
         result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 
messageToErrorObject:CAPTURE_INTERNAL_ERR];
     }
     [self.commandDelegate sendPluginResult:result callbackId:callbackId];
+    pickerController = nil;
 }
 
 - (void)imagePickerControllerDidCancel:(UIImagePickerController*)picker
@@ -511,6 +513,7 @@
 
     CDVPluginResult* result = [CDVPluginResult 
resultWithStatus:CDVCommandStatus_ERROR 
messageToErrorObject:CAPTURE_NO_MEDIA_FILES];
     [self.commandDelegate sendPluginResult:result callbackId:callbackId];
+    pickerController = nil;
 }
 
 @end

Reply via email to