From: cskim Date: Sat, 29 Apr 2017 07:38:45 +0000 (+0900) Subject: Add app installed time for app shortcut. X-Git-Tag: submit/tizen/20170808.015446~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f84a8e3b1a34dc1c55a3200013d6b0bcbbc2c935;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Add app installed time for app shortcut. Fix code formatting and compilcation warnings Change-Id: I8656a2e5e48b2f1891825b1ae309dfcb272ee1a7 --- diff --git a/LibTVRefCommonPortable/Models/AppShortcutController.cs b/LibTVRefCommonPortable/Models/AppShortcutController.cs index e3b71a0..953f0bb 100755 --- a/LibTVRefCommonPortable/Models/AppShortcutController.cs +++ b/LibTVRefCommonPortable/Models/AppShortcutController.cs @@ -66,11 +66,16 @@ namespace LibTVRefCommonPortable.Models } }; + long longDate; + if (long.TryParse(item.Value[3], out longDate) == false) + { + longDate = long.MinValue; + } + var appShortcutInfo = new AppShortcutInfo() { IsRemovable = ApplicationManagerUtils.GetAppInfoRemovable(item.Key), - // TODO : Fill these correctly by using Tizen Device APIs - Installed = DateUtils.GetRandomDate(), + Installed = new DateTime(longDate), }; appShortcutInfo.StateDescriptions.Add("default", defaultStateDescription); diff --git a/LibTVRefCommonPortable/Utils/IPlatformNotification.cs b/LibTVRefCommonPortable/Utils/IPlatformNotification.cs index 2198c3f..648ef7c 100755 --- a/LibTVRefCommonPortable/Utils/IPlatformNotification.cs +++ b/LibTVRefCommonPortable/Utils/IPlatformNotification.cs @@ -58,7 +58,7 @@ namespace LibTVRefCommonPortable.Utils /// /// A method will be called when the Nativation remote control key is pressed. /// - /// A pressed remote control key name + /// A pressed remote control key name void OnNavigationKeyPressed(string keyName); } } diff --git a/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs b/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs index 9d99edf..98a4cd0 100755 --- a/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs +++ b/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs @@ -191,11 +191,12 @@ namespace LibTVRefCommonTizen.Ports continue; } - result = new string[3]; + result = new string[4]; result[0] = appInfo.Label; result[1] = appInfo.ApplicationId; result[2] = (System.IO.File.Exists(appInfo.IconPath)) ? appInfo.IconPath : DefaultAppIcon; + result[3] = "" + pkgInfo.InstalledTime; resultList.Add(appInfo.ApplicationId, result); } diff --git a/TVApps/TVApps/Views/FooterPinStatus.xaml.cs b/TVApps/TVApps/Views/FooterPinStatus.xaml.cs index 893fcc8..42e456c 100755 --- a/TVApps/TVApps/Views/FooterPinStatus.xaml.cs +++ b/TVApps/TVApps/Views/FooterPinStatus.xaml.cs @@ -54,6 +54,7 @@ namespace TVApps.Views CreateDoneButton(); //CreateFooterAdditionalText(); } + /* private void CreateFooterAdditionalText() { @@ -98,6 +99,7 @@ namespace TVApps.Views { return DoneButton; } + /* private void FooterPinStatusPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { diff --git a/TVApps/TVApps/Views/MainPage.xaml.cs b/TVApps/TVApps/Views/MainPage.xaml.cs index a3e8e74..9aa3110 100755 --- a/TVApps/TVApps/Views/MainPage.xaml.cs +++ b/TVApps/TVApps/Views/MainPage.xaml.cs @@ -249,9 +249,9 @@ namespace TVApps.Views Button button; Button nextButton; - for (int i = 1; i < upperCount-1; i++) + for (int i = 1; i < upperCount - 1; i++) { - prevButton = upperList[i-1].FindByName