Boundary destroy handle 00/108100/2
authorkj7.sung <kj7.sung@samsung.com>
Tue, 3 Jan 2017 04:23:39 +0000 (13:23 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Mon, 16 Jan 2017 08:37:37 +0000 (17:37 +0900)
- fix boundary destroy
- change default satellite interval

Change-Id: Ibc0e692d95f83b03a2696c26d5e7ca01d2cd2668
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
Tizen.Location/Tizen.Location/GpsSatellite.cs
Tizen.Location/Tizen.Location/LocationBoundary.cs

index 6f833d5..21a91cd 100755 (executable)
@@ -25,7 +25,7 @@ namespace Tizen.Location
     /// </summary>
     public class GpsSatellite
     {
-        private int _interval = 120;
+        private int _interval = 1;
         private Locator _locator;
         private EventHandler<SatelliteStatusChangedEventArgs> _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);
index 6d0a615..32f89fd 100755 (executable)
@@ -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))
             {