Fix bug difference of time_t size between 32bit and 64bit
authorinkyun.kil <inkyun.kil@samsung.com>
Wed, 5 Apr 2017 05:27:23 +0000 (14:27 +0900)
committerinkyun.kil <inkyun.kil@samsung.com>
Wed, 5 Apr 2017 05:27:23 +0000 (14:27 +0900)
- Refer to :
  The IntPtr type is designed to be an integer whose size is
  platform-specific. That is, an instance of this type is expected to be
  32-bits on 32-bit hardware and operating systems, and 64-bits on 64-bit
  hardware and operating systems.

Change-Id: Iec76f352e76d3af11c077eafe81894cc969e8382
Signed-off-by: inkyun.kil <inkyun.kil@samsung.com>
src/Tizen.Applications.Common/Interop/Interop.ApplicationManager.cs
src/Tizen.Applications.Common/Tizen.Applications/RecentApplicationInfo.cs

index e114c1b..2b52a32 100755 (executable)
@@ -313,7 +313,7 @@ internal static partial class Interop
             internal IntPtr pkgName;
             internal IntPtr appPath;
             internal IntPtr arg;
-            internal long launchTime;
+            internal IntPtr launchTime;
             internal IntPtr instanceId;
             internal IntPtr instanceName;
             internal IntPtr icon;
index 4be2822..613e7d6 100755 (executable)
@@ -64,7 +64,8 @@ namespace Tizen.Applications
             InstanceName = Marshal.PtrToStringAnsi(record.instanceName);
             Arg = Marshal.PtrToStringAnsi(record.arg);
             Uri = Marshal.PtrToStringAnsi(record.uri);
-            LaunchTime = new DateTime(1970, 1, 1).AddSeconds(record.launchTime);
+            long seconds = record.launchTime.ToInt64();
+            LaunchTime = new DateTime(1970, 1, 1).AddSeconds(seconds);
             Controller = new RecentApplicationControl(Marshal.PtrToStringAnsi(record.pkgName));
         }
     }