Clearing CrashesDelegate on RuntimeInitializeLoadType.SubsystemRegistration, implemented code review feedback.
This commit is contained in:
Родитель
d416242e89
Коммит
613dec8a44
|
@ -28,8 +28,9 @@ namespace Microsoft.AppCenter.Unity
|
|||
set { AppCenterInternal.SetLogLevel((int)value); }
|
||||
}
|
||||
|
||||
#if UNITY_2019_3_OR_NEWER && UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Destroys static references
|
||||
/// Clean up static references that may be around due to Domain Reload being disabled
|
||||
/// </summary>
|
||||
public static void Cleanup()
|
||||
{
|
||||
|
@ -37,6 +38,7 @@ namespace Microsoft.AppCenter.Unity
|
|||
_logUrlTask = null;
|
||||
_storageSizeTask = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
public static AppCenterTask SetEnabledAsync(bool enabled)
|
||||
{
|
||||
|
|
|
@ -3,22 +3,37 @@
|
|||
|
||||
#if (!UNITY_IOS && !UNITY_ANDROID && !UNITY_WSA_10_0) || UNITY_EDITOR
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Crashes.Internal
|
||||
{
|
||||
class CrashesDelegate
|
||||
{
|
||||
#pragma warning disable 0067
|
||||
#pragma warning disable 0067, 0414
|
||||
public static event Crashes.SendingErrorReportHandler SendingErrorReport;
|
||||
|
||||
public static event Crashes.SentErrorReportHandler SentErrorReport;
|
||||
|
||||
public static event Crashes.FailedToSendErrorReportHandler FailedToSendErrorReport;
|
||||
#pragma warning restore 0067
|
||||
#pragma warning restore 0067, 0414
|
||||
|
||||
#pragma warning disable 0649
|
||||
internal static Crashes.GetErrorAttachmentsHandler GetErrorAttachmentsHandler;
|
||||
#pragma warning restore 0649
|
||||
|
||||
#if UNITY_2019_3_OR_NEWER && UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Clean up static references that may be around due to Domain Reload being disabled
|
||||
/// </summary>
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void Cleanup()
|
||||
{
|
||||
SendingErrorReport = null;
|
||||
SentErrorReport = null;
|
||||
FailedToSendErrorReport = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
public static void SetDelegate()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
### App Center
|
||||
|
||||
#### Unity Editor
|
||||
* **[Improvement]** Better support for Unity projects with "Reload Domain" disabled.
|
||||
|
||||
#### Android
|
||||
|
||||
* **[Breaking change]** Bumping the minimum Android SDK version to 21 API level (Android 5.0), because old Android versions do not support root certificate authority used by App Center and would not get CA certificates updates anymore.
|
||||
|
|
Загрузка…
Ссылка в новой задаче