From: cskim Date: Tue, 21 Mar 2017 08:58:02 +0000 (+0900) Subject: Fix SVACE issues. X-Git-Tag: submit/tizen/20170808.015446~178 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b137ff3a8973f34de5ef1c9bc6aea62286e6158;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Fix SVACE issues. Change-Id: I8ef513021ab5fb12a38d7b2d23309a98e46800b4 --- diff --git a/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs b/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs index 68f9fbc..9e129d3 100644 --- a/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs +++ b/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs @@ -49,10 +49,15 @@ namespace LibTVRefCommonTizen.Ports foreach (ApplicationInfo appInfo in applicationList) { - result = new string[3]; + if (appInfo.Label == null || + appInfo.ApplicationId == null) + { + continue; + } - result[0] = (appInfo.Label != null) ? appInfo.Label : null; - result[1] = (appInfo.ApplicationId != null) ? appInfo.ApplicationId : null; + result = new string[3]; + result[0] = appInfo.Label; + result[1] = appInfo.ApplicationId; result[2] = (System.IO.File.Exists(appInfo.IconPath)) ? appInfo.IconPath : DefaultAppIcon; resultList.Add(appInfo.ApplicationId, result); } @@ -96,17 +101,13 @@ namespace LibTVRefCommonTizen.Ports Task> task = ApplicationManager.GetInstalledApplicationsAsync(); string[] result; - if (task == null) - { - DebuggingPort.D("GetInstalledApplication failed"); - return null; - } - IEnumerable installedList = await task; foreach (var appInfo in installedList) { - if (appInfo.IsNoDisplay) + if (appInfo.Label == null || + appInfo.ApplicationId == null || + appInfo.IsNoDisplay) { continue; } @@ -124,8 +125,8 @@ namespace LibTVRefCommonTizen.Ports result = new string[3]; - result[0] = (appInfo.Label != null) ? appInfo.Label : null; - result[1] = (appInfo.ApplicationId != null) ? appInfo.ApplicationId : null; + result[0] = appInfo.Label; + result[1] = appInfo.ApplicationId; result[2] = (System.IO.File.Exists(appInfo.IconPath)) ? appInfo.IconPath : DefaultAppIcon; resultList.Add(appInfo.ApplicationId, result); } diff --git a/LibTVRefCommonTizen/Ports/PackageManagerPort.cs b/LibTVRefCommonTizen/Ports/PackageManagerPort.cs index b21db6f..7ee5260 100644 --- a/LibTVRefCommonTizen/Ports/PackageManagerPort.cs +++ b/LibTVRefCommonTizen/Ports/PackageManagerPort.cs @@ -79,10 +79,15 @@ namespace LibTVRefCommonTizen.Ports foreach (var item in packages) { - result = new string[3]; + if (item.Label == null || + item.Id == null) + { + continue; + } - result[0] = (item.Label != null) ? item.Label : null; - result[1] = (item.Id != null) ? item.Id : null; + result = new string[3]; + result[0] = item.Label; + result[1] = item.Id; result[2] = (System.IO.File.Exists(item.IconPath)) ? item.IconPath : "AppIcon.png"; pkgList.Add(item.Label, result); diff --git a/TVApps/TVApps/ViewModels/AppsHolder.cs b/TVApps/TVApps/ViewModels/AppsHolder.cs index 464d4fd..492c3d9 100644 --- a/TVApps/TVApps/ViewModels/AppsHolder.cs +++ b/TVApps/TVApps/ViewModels/AppsHolder.cs @@ -138,15 +138,15 @@ namespace TVApps.ViewModels if (PinnedApps.ContainsKey(key)) { DebuggingUtils.Dbg("UnPin!"); - InstalledApps.FirstOrDefault(a => a.AppID == key).SetChecked(false); - InstalledApps.FirstOrDefault(a => a.AppID == key).SetPinned(false); + InstalledApps.FirstOrDefault(a => a.AppID == key)?.SetChecked(false); + InstalledApps.FirstOrDefault(a => a.AppID == key)?.SetPinned(false); PinnedApps.Remove(key); } else { DebuggingUtils.Dbg("Pin!"); - InstalledApps.FirstOrDefault(a => a.AppID == key).SetChecked(true); - InstalledApps.FirstOrDefault(a => a.AppID == key).SetPinned(true); + InstalledApps.FirstOrDefault(a => a.AppID == key)?.SetChecked(true); + InstalledApps.FirstOrDefault(a => a.AppID == key)?.SetPinned(true); PinnedApps.Add(key, key); } } diff --git a/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk b/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk index 4b4c8dc..8ac7994 100644 Binary files a/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk and b/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk differ diff --git a/TVHome/TVHome/Views/MainPage.xaml.cs b/TVHome/TVHome/Views/MainPage.xaml.cs index 0f75161..c825638 100755 --- a/TVHome/TVHome/Views/MainPage.xaml.cs +++ b/TVHome/TVHome/Views/MainPage.xaml.cs @@ -121,8 +121,6 @@ namespace TVHome.Views { switch (status) { - case HomeStatus.Default: - break; case HomeStatus.MainPanelFocused: PageMainPanel.ShowPanel(); SelectMenu(SelectedMenuName); @@ -130,10 +128,6 @@ namespace TVHome.Views case HomeStatus.SubPanelFocused: PageMainPanel.SelectPanel(); break; - case HomeStatus.Move: - break; - case HomeStatus.UnPin: - break; } }