summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyerim Kim <rimi.kim@samsung.com>2017-08-02 00:53:45 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-08-02 00:53:45 +0000
commite39761a8bb667f073cad3d327f0a1045b4b670e7 (patch)
tree2e6bdac2f8f60d4dd09b03fb963b66190b6caf0c
parent694b63401689c0cc785c030734bc51c55e17eb55 (diff)
parent075f4111c873274de5e8285c9d760c88691255e7 (diff)
downloadmediahub-e39761a8bb667f073cad3d327f0a1045b4b670e7.tar.gz
mediahub-e39761a8bb667f073cad3d327f0a1045b4b670e7.tar.bz2
mediahub-e39761a8bb667f073cad3d327f0a1045b4b670e7.zip
Merge "Modifies Svace issues" into tizen
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs8
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Models/ImageProvider.cs2
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Utils/NinePatchImageRenderer.cs7
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Views/ImageGroup.xaml.cs2
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Views/ImageItem.xaml.cs2
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Views/MusicGroup.xaml.cs2
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Views/VideoGroup.xaml.cs2
7 files changed, 14 insertions, 11 deletions
diff --git a/TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs b/TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs
index 264090d..e4d9e71 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Models/ContentProvider.cs
@@ -164,18 +164,18 @@ namespace TVMediaHub.Tizen.Models
break;
case SortOption.Album:
- if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInformation).Album)
+ if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInformation)?.Album)
{
newGroupFlag = true;
- newTitle = (mediaInformationEx.MediaContentInformation as AudioInformation).Album.ToString();
+ newTitle = (mediaInformationEx.MediaContentInformation as AudioInformation)?.Album.ToString();
}
break;
case SortOption.Artist:
- if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInformation).Artist)
+ if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInformation)?.Artist)
{
newGroupFlag = true;
- newTitle = (mediaInformationEx.MediaContentInformation as AudioInformation).Artist.ToString();
+ newTitle = (mediaInformationEx.MediaContentInformation as AudioInformation)?.Artist.ToString();
}
break;
diff --git a/TVMediaHub/TVMediaHub.Tizen/Models/ImageProvider.cs b/TVMediaHub/TVMediaHub.Tizen/Models/ImageProvider.cs
index ea3aa87..3651963 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Models/ImageProvider.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Models/ImageProvider.cs
@@ -53,7 +53,7 @@ namespace TVMediaHub.Tizen.Models
// Check 1 : The size of the image file must be less than 4MB.
var fileInfo = new FileInfo(mediaContent.MediaContentInformation.FilePath);
- if (fileInfo != null && fileInfo.Length > 8 * 1024 * 1024)
+ if (fileInfo?.Length > 8 * 1024 * 1024)
{
DbgPort.D(mediaContent.MediaContentInformation.DisplayName + ": This content is not available");
mediaContent.IsAvailable = false;
diff --git a/TVMediaHub/TVMediaHub.Tizen/Utils/NinePatchImageRenderer.cs b/TVMediaHub/TVMediaHub.Tizen/Utils/NinePatchImageRenderer.cs
index b494f0a..fa13d4d 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Utils/NinePatchImageRenderer.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Utils/NinePatchImageRenderer.cs
@@ -66,7 +66,10 @@ namespace TVMediaHub.Tizen.Utils
private void UpdateImageColor()
{
var img = Element as NinePatch;
- Control.Color = new ElmSharp.Color(Convert.ToInt32(img.ImageColor.R * 255), Convert.ToInt32(img.ImageColor.G * 255), Convert.ToInt32(img.ImageColor.B * 255), Convert.ToInt32(img.ImageColor.A * 255));
+ if (Control != null)
+ {
+ Control.Color = new ElmSharp.Color(Convert.ToInt32(img.ImageColor.R * 255), Convert.ToInt32(img.ImageColor.G * 255), Convert.ToInt32(img.ImageColor.B * 255), Convert.ToInt32(img.ImageColor.A * 255));
+ }
}
/// <summary>
@@ -75,7 +78,7 @@ namespace TVMediaHub.Tizen.Utils
void UpdateBorder()
{
var img = Element as NinePatch;
- Control.SetBorder(img.BorderLeft, img.BorderRight, img.BorderTop, img.BorderBottom);
+ Control?.SetBorder(img.BorderLeft, img.BorderRight, img.BorderTop, img.BorderBottom);
}
/// <summary>
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/ImageGroup.xaml.cs b/TVMediaHub/TVMediaHub.Tizen/Views/ImageGroup.xaml.cs
index 6d539eb..c09f90a 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Views/ImageGroup.xaml.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Views/ImageGroup.xaml.cs
@@ -167,7 +167,7 @@ namespace TVMediaHub.Tizen.Views
length: 167,
finished: (v2, IsCanceled2) =>
{
- if (!IsCanceled)
+ if (!IsCanceled2)
{
GroupTitle.TextColor = Color.FromRgba(0, 129, 198, 255);
}
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/ImageItem.xaml.cs b/TVMediaHub/TVMediaHub.Tizen/Views/ImageItem.xaml.cs
index 39cb993..f9633c3 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Views/ImageItem.xaml.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Views/ImageItem.xaml.cs
@@ -338,7 +338,7 @@ namespace TVMediaHub.Tizen.Views
var x = this.X;
var y = this.Y;
var parent = (VisualElement)this.Parent;
- while (parent != null && parent.Parent.GetType() == typeof(VisualElement))
+ while (parent != null && parent.Parent?.GetType() == typeof(VisualElement))
{
x += parent.X;
y += parent.Y;
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/MusicGroup.xaml.cs b/TVMediaHub/TVMediaHub.Tizen/Views/MusicGroup.xaml.cs
index d4b06a0..54e93d4 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Views/MusicGroup.xaml.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Views/MusicGroup.xaml.cs
@@ -332,7 +332,7 @@ namespace TVMediaHub.Tizen.Views
length: 167,
finished: (v2, IsCanceled2) =>
{
- if (!IsCanceled)
+ if (!IsCanceled2)
{
GroupTitle.TextColor = Color.FromRgba(0, 129, 198, 255);
}
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/VideoGroup.xaml.cs b/TVMediaHub/TVMediaHub.Tizen/Views/VideoGroup.xaml.cs
index 204d1e9..1e30a31 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Views/VideoGroup.xaml.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Views/VideoGroup.xaml.cs
@@ -190,7 +190,7 @@ namespace TVMediaHub.Tizen.Views
length: 167,
finished: (v2, IsCanceled2) =>
{
- if (!IsCanceled)
+ if (!IsCanceled2)
{
GroupTitle.TextColor = Color.FromRgba(0, 129, 198, 255);
}