From fc707db01834bd665e10b238fcc7eb015b84bbac Mon Sep 17 00:00:00 2001 From: Haesu Gwon Date: Wed, 22 Mar 2017 21:51:01 +0900 Subject: [PATCH] [Camera] Bug fix and remove useless code 1. Remove useless GetLastResult func. 2. SetAutoFocusArea(Point pos) can't throw exception to its caller. Change-Id: I0929de4d030c884e4b1107d7d1d3d1f0b9646369 Signed-off-by: Haesu Gwon --- src/Tizen.Multimedia/Camera/CameraFeatures.cs | 6 +----- src/Tizen.Multimedia/Camera/CameraSettings.cs | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Tizen.Multimedia/Camera/CameraFeatures.cs b/src/Tizen.Multimedia/Camera/CameraFeatures.cs index 50e3a34..a09d91f 100755 --- a/src/Tizen.Multimedia/Camera/CameraFeatures.cs +++ b/src/Tizen.Multimedia/Camera/CameraFeatures.cs @@ -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) diff --git a/src/Tizen.Multimedia/Camera/CameraSettings.cs b/src/Tizen.Multimedia/Camera/CameraSettings.cs index 8916fd1..16d3d6e 100755 --- a/src/Tizen.Multimedia/Camera/CameraSettings.cs +++ b/src/Tizen.Multimedia/Camera/CameraSettings.cs @@ -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."); } /// -- 2.7.4