-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from MindscapeHQ/ro/cs-55/telerik-controls-fix
[CS-55]: Fix issue with Android crashing when too many messages are sent
- Loading branch information
Showing
11 changed files
with
109 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Raygun4Maui/Raygun4Net.RaygunLogger/RaygunLoggerConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System.Globalization; | ||
|
||
namespace Raygun4Maui; | ||
|
||
internal class RaygunMauiEnvironmentMessageBuilder | ||
{ | ||
private static readonly object EnvironmentLock = new(); | ||
|
||
public string OSVersion { get; init; } = DeviceInfo.Current.VersionString; | ||
public string Architecture { get; init; } = NativeDeviceInfo.Architecture(); | ||
|
||
private string DeviceManufacturer = DeviceInfo.Current.Manufacturer; | ||
private string Platform = NativeDeviceInfo.Platform(); | ||
private string Model = DeviceInfo.Current.Model; | ||
|
||
private int ProcessorCount = Environment.ProcessorCount; | ||
|
||
|
||
private ulong TotalPhysicalMemory = NativeDeviceInfo.TotalPhysicalMemory(); | ||
|
||
internal RaygunMauiEnvironmentMessage BuildEnvironmentMessage() | ||
{ | ||
// We create a lock so that during async tasks we do not access device information at the same time | ||
// this has caused issues in Android | ||
lock (EnvironmentLock) | ||
{ | ||
DateTime now = DateTime.Now; | ||
|
||
return new RaygunMauiEnvironmentMessage | ||
{ | ||
UtcOffset = TimeZoneInfo.Local.GetUtcOffset(DateTime.Now).TotalHours, | ||
Locale = CultureInfo.CurrentCulture.DisplayName, | ||
OSVersion = OSVersion, | ||
Architecture = Architecture, | ||
WindowBoundsWidth = DeviceDisplay.MainDisplayInfo.Width, | ||
WindowBoundsHeight = DeviceDisplay.MainDisplayInfo.Height, | ||
DeviceManufacturer = DeviceInfo.Current.Manufacturer, | ||
Platform = Platform, | ||
Model = Model, | ||
ProcessorCount = ProcessorCount, | ||
ResolutionScale = DeviceDisplay.MainDisplayInfo.Density, | ||
TotalPhysicalMemory = TotalPhysicalMemory, | ||
AvailablePhysicalMemory = NativeDeviceInfo.AvailablePhysicalMemory(), | ||
CurrentOrientation = DeviceDisplay.MainDisplayInfo.Orientation.ToString(), | ||
}; | ||
} | ||
} | ||
|
||
public static RaygunMauiEnvironmentMessageBuilder Init() | ||
{ | ||
return new RaygunMauiEnvironmentMessageBuilder(); | ||
} | ||
} |