Fix SVACE issues.
authorcskim <charles0.kim@samsung.com>
Tue, 21 Mar 2017 08:58:02 +0000 (17:58 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:48 +0000 (18:34 +0900)
Change-Id: I8ef513021ab5fb12a38d7b2d23309a98e46800b4

LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs
LibTVRefCommonTizen/Ports/PackageManagerPort.cs
TVApps/TVApps/ViewModels/AppsHolder.cs
TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk
TVHome/TVHome/Views/MainPage.xaml.cs

index 68f9fbc3670995971ee9ef97fde46e688e34f6ba..9e129d351090ada2daf3b1c563936c92145a3407 100644 (file)
@@ -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<IEnumerable<ApplicationInfo>> task = ApplicationManager.GetInstalledApplicationsAsync();
                 string[] result;
 
-                if (task == null)
-                {
-                    DebuggingPort.D("GetInstalledApplication failed");
-                    return null;
-                }
-
                 IEnumerable<ApplicationInfo> 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);
                 }
index b21db6fa96e8d2368c6084b1d861b07e4c48eb14..7ee5260082a730ef6a060733a5be9ffb8276e4ac 100644 (file)
@@ -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);
index 464d4fd5fb2fb4dc96d61c6f54be36e5621c3e43..492c3d97583f06de3f4eb854c834ac3b66150f7d 100644 (file)
@@ -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);
             }
         }
index 4b4c8dcc9953bf12bc0a129cda6739e3faf462ae..8ac7994c00645f055bc2c3c342b1d5e64510a539 100644 (file)
Binary files a/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk and b/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk differ
index 0f75161cd269a24b1a0663f15a59cafec5e87751..c825638cd89bf6258a575fcec03dae08005d1bb8 100755 (executable)
@@ -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;
             }
         }