[Camera] Bug fix and remove useless code
authorHaesu Gwon <haesu.gwon@samsung.com>
Wed, 22 Mar 2017 12:51:01 +0000 (21:51 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Thu, 23 Mar 2017 01:59:58 +0000 (18:59 -0700)
1. Remove useless GetLastResult func.
2. SetAutoFocusArea(Point pos) can't throw exception to its caller.

Change-Id: I0929de4d030c884e4b1107d7d1d3d1f0b9646369
Signed-off-by: Haesu Gwon <haesu.gwon@samsung.com>
src/Tizen.Multimedia/Camera/CameraFeatures.cs
src/Tizen.Multimedia/Camera/CameraSettings.cs

index 50e3a34..a09d91f 100755 (executable)
@@ -70,11 +70,7 @@ namespace Tizen.Multimedia
 
         private bool IsFeatureSupported(IsSupportedDelegate func)
         {
-            bool ret = func(_camera.GetHandle());
-
-            CameraErrorFactory.ThrowIfError(ErrorFacts.GetLastResult(), "Failed to check feature is suported or not.");
-
-            return ret;
+            return func(_camera.GetHandle());
         }
 
         private bool CheckRangeValid(GetRangeDelegate func)
index 8916fd1..16d3d6e 100755 (executable)
@@ -82,7 +82,8 @@ namespace Tizen.Multimedia
 
         public void SetAutoFocusArea(Point pos)
         {
-            SetAutoFocusArea(pos.X, pos.Y);
+            CameraErrorFactory.ThrowIfError(Interop.CameraSettings.SetAutoFocusArea(_camera.GetHandle(), pos.X, pos.Y),
+                "Failed to set the autofocus area.");
         }
 
         /// <summary>