[MediaContent] Fixed the MediaInfo.ThumbnailPath property to return null instead... 91/148191/1
authorcoderhyme <jhyo.kim@samsung.com>
Thu, 7 Sep 2017 05:22:38 +0000 (14:22 +0900)
committercoderhyme <jhyo.kim@samsung.com>
Thu, 7 Sep 2017 05:22:38 +0000 (14:22 +0900)
Change-Id: I8fb26b638937b1377bce0ef5a19dc79c8c07a4a0
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/InteropHelper.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfo.cs

index 1d9d933..e40b1f5 100644 (file)
@@ -23,7 +23,7 @@ namespace Tizen.Content.MediaContent
     {
         internal delegate MediaContentError GetStringFunc<T>(T handle, out IntPtr value);
 
-        internal static string GetString<T>(T handle, GetStringFunc<T> func)
+        internal static string GetString<T>(T handle, GetStringFunc<T> func, bool nullable = false)
         {
             IntPtr val = IntPtr.Zero;
             try
@@ -32,7 +32,7 @@ namespace Tizen.Content.MediaContent
 
                 if (val == IntPtr.Zero)
                 {
-                    return string.Empty;
+                    return nullable ? null : string.Empty;
                 }
 
                 return Marshal.PtrToStringAnsi(val);
index 0072d38..8705d6b 100644 (file)
@@ -43,7 +43,7 @@ namespace Tizen.Content.MediaContent
             DateModified = InteropHelper.GetDateTime(handle, Interop.MediaInfo.GetModifiedTime);
             Timeline = InteropHelper.GetDateTime(handle, Interop.MediaInfo.GetTimeline);
 
-            ThumbnailPath = InteropHelper.GetString(handle, Interop.MediaInfo.GetThumbnailPath);
+            ThumbnailPath = InteropHelper.GetString(handle, Interop.MediaInfo.GetThumbnailPath, true);
             Description = InteropHelper.GetString(handle, Interop.MediaInfo.GetDescription);
 
             Longitude = InteropHelper.GetValue<double>(handle, Interop.MediaInfo.GetLongitude);