-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: User ID fallback on mobile (#1710)
- Loading branch information
1 parent
ac7e53a
commit 2f75734
Showing
11 changed files
with
195 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
|
||
namespace Sentry.Unity.Android | ||
{ | ||
internal interface IJniExecutor : IDisposable | ||
{ | ||
public TResult? Run<TResult>(Func<TResult?> jniOperation); | ||
public void Run(Action jniOperation); | ||
} | ||
} |
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
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,21 @@ | ||
using System; | ||
|
||
namespace Sentry.Unity.Android.Tests | ||
{ | ||
public class TestJniExecutor : IJniExecutor | ||
{ | ||
public TResult? Run<TResult>(Func<TResult?> jniOperation) | ||
{ | ||
return default; | ||
} | ||
|
||
public void Run(Action jniOperation) | ||
{ | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
// TODO release managed resources here | ||
} | ||
} | ||
} |
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,39 @@ | ||
namespace Sentry.Unity.Android.Tests | ||
{ | ||
internal class TestSentryJava : ISentryJava | ||
{ | ||
public string? InstallationId { get; set; } | ||
public bool? IsCrashedLastRun { get; set; } | ||
|
||
public string? GetInstallationId(IJniExecutor jniExecutor) | ||
{ | ||
return InstallationId; | ||
} | ||
|
||
public bool? CrashedLastRun(IJniExecutor jniExecutor) | ||
{ | ||
return IsCrashedLastRun; | ||
} | ||
|
||
public void Close(IJniExecutor jniExecutor) { } | ||
|
||
public void WriteScope( | ||
IJniExecutor jniExecutor, | ||
int? GpuId, | ||
string? GpuName, | ||
string? GpuVendorName, | ||
int? GpuMemorySize, | ||
string? GpuNpotSupport, | ||
string? GpuVersion, | ||
string? GpuApiType, | ||
int? GpuMaxTextureSize, | ||
bool? GpuSupportsDrawCallInstancing, | ||
bool? GpuSupportsRayTracing, | ||
bool? GpuSupportsComputeShaders, | ||
bool? GpuSupportsGeometryShaders, | ||
string? GpuVendorId, | ||
bool? GpuMultiThreadedRendering, | ||
string? GpuGraphicsShaderLevel) | ||
{ } | ||
} | ||
} |