From: kj7.sung Date: Tue, 3 Jan 2017 04:23:39 +0000 (+0900) Subject: Boundary destroy handle X-Git-Tag: submit/trunk/20170823.075128~103^2~16^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52c9c66799199880b6af52f7176a9c9dd648f6ca;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Boundary destroy handle - fix boundary destroy - change default satellite interval Change-Id: Ibc0e692d95f83b03a2696c26d5e7ca01d2cd2668 Signed-off-by: kj7.sung --- diff --git a/src/Tizen.Location/Tizen.Location/GpsSatellite.cs b/src/Tizen.Location/Tizen.Location/GpsSatellite.cs index 6f833d5..21a91cd 100755 --- a/src/Tizen.Location/Tizen.Location/GpsSatellite.cs +++ b/src/Tizen.Location/Tizen.Location/GpsSatellite.cs @@ -25,7 +25,7 @@ namespace Tizen.Location /// public class GpsSatellite { - private int _interval = 120; + private int _interval = 1; private Locator _locator; private EventHandler _satelliteStatusChanged; private IntPtr _handle = IntPtr.Zero; @@ -224,7 +224,7 @@ namespace Tizen.Location } remove { - Log.Info(Globals.LogTag, "SatelliteStatusUpdated remoove called"); + Log.Info(Globals.LogTag, "SatelliteStatusUpdated Remove called"); _satelliteStatusChanged -= value; if (_satelliteStatusChanged == null) { @@ -239,6 +239,7 @@ namespace Tizen.Location Log.Info(Globals.LogTag, "SetSatelliteStatusChangeCallback"); GCHandle handle = GCHandle.Alloc(this); int ret = Interop.GpsSatellite.SetSatelliteStatusChangedCallback(_handle, SatelliteStatusChangedCallback, _interval, GCHandle.ToIntPtr(handle)); + /* int ret = Interop.GpsSatellite.SetSatelliteStatusChangedCallback(_handle, SatelliteStatusChangedCallback, _interval, IntPtr.Zero); */ if (((LocationError)ret != LocationError.None)) { Log.Error(Globals.LogTag, "Error in setting satellite status changed callback," + (LocationError)ret); diff --git a/src/Tizen.Location/Tizen.Location/LocationBoundary.cs b/src/Tizen.Location/Tizen.Location/LocationBoundary.cs index 6d0a615..32f89fd 100755 --- a/src/Tizen.Location/Tizen.Location/LocationBoundary.cs +++ b/src/Tizen.Location/Tizen.Location/LocationBoundary.cs @@ -76,13 +76,15 @@ namespace Tizen.Location if (_disposed) return; - DestroyHandle(); + if (disposing) + DestroyHandle(); + _disposed = true; } private void DestroyHandle() { - Log.Info(Globals.LogTag, "DestroyHandle"); + Log.Info(Globals.LogTag, "DestroyBoundaryHandle"); int ret = Interop.LocationBoundary.DestroyBoundary(handle); if (((LocationError)ret != LocationError.None)) {