From 2a0b01652a1854ea79c8fb252c6c5a1dd015ae57 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Mon, 26 Aug 2024 13:46:29 +1200 Subject: [PATCH 1/2] Removed SentrySdk.Init overloads accepting AndroidContext context --- src/Sentry/Platforms/Android/SentrySdk.cs | 28 ----------------------- 1 file changed, 28 deletions(-) diff --git a/src/Sentry/Platforms/Android/SentrySdk.cs b/src/Sentry/Platforms/Android/SentrySdk.cs index f018ffdcd1..a346f581b3 100644 --- a/src/Sentry/Platforms/Android/SentrySdk.cs +++ b/src/Sentry/Platforms/Android/SentrySdk.cs @@ -20,34 +20,6 @@ public static partial class SentrySdk { private static AndroidContext AppContext { get; set; } = Application.Context; - /// - /// Initializes the SDK for Android, with an optional configuration options callback. - /// - /// The Android application context. - /// The configuration options callback. - /// An object that should be disposed when the application terminates. - [Obsolete("It is no longer required to provide the application context when calling Init. " + - "This method may be removed in a future major release.")] - public static IDisposable Init(AndroidContext context, Action? configureOptions) - { - AppContext = context; - return Init(configureOptions); - } - - /// - /// Initializes the SDK for Android, using a configuration options instance. - /// - /// The Android application context. - /// The configuration options instance. - /// An object that should be disposed when the application terminates. - [Obsolete("It is no longer required to provide the application context when calling Init. " + - "This method may be removed in a future major release.")] - public static IDisposable Init(AndroidContext context, SentryOptions options) - { - AppContext = context; - return Init(options); - } - private static void InitSentryAndroidSdk(SentryOptions options) { // Set default release and distribution From 40dd2bf6c5a5c020ec6eedfe1aedf5890eb43a93 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Mon, 26 Aug 2024 13:57:48 +1200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03c7e7e99f..1ba1115ac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### API Changes +- You should no longer pass `AndroidContext` as an argument to `SentrySdk.Init` ([#3562](https://github.com/getsentry/sentry-dotnet/pull/3562)) + ## 4.10.2 ### Various fixes & improvements