[Multimedia.Radio] Fix Dispose related crash issue and spec update.
authorVivek Ellur <vivek.ellur@samsung.com>
Thu, 16 Mar 2017 12:31:22 +0000 (18:01 +0530)
committergilbok.lee <gilbok.lee@samsung.com>
Tue, 4 Apr 2017 05:38:21 +0000 (14:38 +0900)
1. Fix crash issue in dispose method of radio module.
2. Update spec for default values of Volume and IsMuted property.

Change-Id: Ic009e8fde234e46098073e1c4612702f3a4e19f0
Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>
packaging/csapi-multimedia.spec
src/Tizen.Multimedia/Interop/Interop.Radio.cs
src/Tizen.Multimedia/Radio/Radio.cs

index 022257c..77e9e87 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       csapi-multimedia
 Summary:    Tizen Multimedia API for C#
-Version:    1.0.50
+Version:    1.0.51
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0
index cbb80f8..d8242ef 100644 (file)
@@ -147,8 +147,6 @@ namespace Tizen.Multimedia
 
             internal override ErrorCode DisposeNativeHandle()
             {
-                ScanCompleteCb = null;
-                InteruptedCb = null;
                 return Destroy(handle);
             }
 
@@ -254,4 +252,4 @@ namespace Tizen.Multimedia
             }
         }
     }
-}
\ No newline at end of file
+}
index c61cce6..f2e1ed0 100755 (executable)
@@ -104,7 +104,7 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// Indicates if radio is muted
+        /// Indicates if radio is muted. By default radio is not muted.
         /// </summary>
         public bool IsMuted
         {
@@ -133,7 +133,8 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// Current radio volume level, in [0.0 ~ 1.0](1.0 = 100%) range
+        /// Current radio volume level, in [0.0 ~ 1.0](1.0 = 100%) range.
+        /// Default value for volume is 1.0.
         /// </summary>
         /// <exception cref="ArgumentOutOfRangeException">This is thrown if value passed to setter in not in valid range</exception>
         public float Volume
@@ -309,30 +310,14 @@ namespace Tizen.Multimedia
             }
         }
 
-        #region IDisposable Support
         private bool _disposedValue = false;
 
-        protected virtual void Dispose(bool disposing)
-        {
-            if (!_disposedValue)
-            {
-                _handle.Dispose();
-                _disposedValue = true;
-            }
-        }
-
-        ~Radio()
-        {
-            Dispose(false);
-        }
-
         public void Dispose()
         {
-            Dispose(true);
-            GC.SuppressFinalize(this);
+            _handle.ScanCompleteCb = null;
+            _handle.InteruptedCb = null;
+            _handle.Dispose();
+            _disposedValue = true;
         }
-        #endregion
-
-
     }
-}
\ No newline at end of file
+}