Skip to content

Commit

Permalink
fix(skia): Add default implementation for AnalyticsInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Sep 12, 2020
1 parent 9782346 commit a21ed13
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Windows.System.Profile
#endif
public partial class AnalyticsInfo
{
#if false || false || NET461 || false || __SKIA__ || __NETSTD_REFERENCE__ || false
#if false || false || NET461 || false || false || __NETSTD_REFERENCE__ || false
[global::Uno.NotImplemented("NET461", "__SKIA__", "__NETSTD_REFERENCE__")]
public static string DeviceForm
{
Expand All @@ -17,7 +17,7 @@ public static string DeviceForm
}
}
#endif
#if false || false || NET461 || false || __SKIA__ || __NETSTD_REFERENCE__ || false
#if false || false || NET461 || false || false || __NETSTD_REFERENCE__ || false
[global::Uno.NotImplemented("NET461", "__SKIA__", "__NETSTD_REFERENCE__")]
public static global::Windows.System.Profile.AnalyticsVersionInfo VersionInfo
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.System.Profile
{
#if false || false || NET461 || false || __SKIA__ || __NETSTD_REFERENCE__ || false
#if false || false || NET461 || false || false || __NETSTD_REFERENCE__ || false
[global::Uno.NotImplemented]
#endif
public partial class AnalyticsVersionInfo
{
#if false || false || NET461 || false || __SKIA__ || __NETSTD_REFERENCE__ || false
#if false || false || NET461 || false || false || __NETSTD_REFERENCE__ || false
[global::Uno.NotImplemented("NET461", "__SKIA__", "__NETSTD_REFERENCE__")]
public string DeviceFamily
{
Expand All @@ -17,7 +17,7 @@ public string DeviceFamily
}
}
#endif
#if false || false || NET461 || false || __SKIA__ || __NETSTD_REFERENCE__ || false
#if false || false || NET461 || false || false || __NETSTD_REFERENCE__ || false
[global::Uno.NotImplemented("NET461", "__SKIA__", "__NETSTD_REFERENCE__")]
public string DeviceFamilyVersion
{
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.UWP/System/Profile/AnalyticsInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Windows.System.Profile
{
public static partial class AnalyticsInfo
{
#if __ANDROID__ || __IOS__ || __WASM__ || __MACOS__
#if __ANDROID__ || __IOS__ || __WASM__ || __MACOS__ || __SKIA__
public static string DeviceForm => GetDeviceForm().ToString();

public static AnalyticsVersionInfo VersionInfo { get; } = new AnalyticsVersionInfo();
Expand Down
10 changes: 10 additions & 0 deletions src/Uno.UWP/System/Profile/AnalyticsInfo.skia.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#if __SKIA__

namespace Windows.System.Profile
{
public static partial class AnalyticsInfo
{
private static UnoDeviceForm GetDeviceForm() => UnoDeviceForm.Unknown;
}
}
#endif
18 changes: 18 additions & 0 deletions src/Uno.UWP/System/Profile/AnalyticsVersionInfo.skia.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace Windows.System.Profile
{
public partial class AnalyticsVersionInfo
{
internal AnalyticsVersionInfo()
{
}

public string DeviceFamily => Environment.OSVersion.Platform.ToString();

public string DeviceFamilyVersion => Environment.OSVersion.VersionString;
}
}

0 comments on commit a21ed13

Please sign in to comment.