Skip to content

Commit 94df25f

Browse files
Removed SentrySdk.Init overloads accepting AndroidContext context (#3562)
1 parent de216fa commit 94df25f

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
### API Changes
4+
- You should no longer pass `AndroidContext` as an argument to `SentrySdk.Init` ([#3562](https://github.com/getsentry/sentry-dotnet/pull/3562))
5+
36
## 4.10.2
47

58
### Various fixes & improvements

src/Sentry/Platforms/Android/SentrySdk.cs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,6 @@ public static partial class SentrySdk
2020
{
2121
private static AndroidContext AppContext { get; set; } = Application.Context;
2222

23-
/// <summary>
24-
/// Initializes the SDK for Android, with an optional configuration options callback.
25-
/// </summary>
26-
/// <param name="context">The Android application context.</param>
27-
/// <param name="configureOptions">The configuration options callback.</param>
28-
/// <returns>An object that should be disposed when the application terminates.</returns>
29-
[Obsolete("It is no longer required to provide the application context when calling Init. " +
30-
"This method may be removed in a future major release.")]
31-
public static IDisposable Init(AndroidContext context, Action<SentryOptions>? configureOptions)
32-
{
33-
AppContext = context;
34-
return Init(configureOptions);
35-
}
36-
37-
/// <summary>
38-
/// Initializes the SDK for Android, using a configuration options instance.
39-
/// </summary>
40-
/// <param name="context">The Android application context.</param>
41-
/// <param name="options">The configuration options instance.</param>
42-
/// <returns>An object that should be disposed when the application terminates.</returns>
43-
[Obsolete("It is no longer required to provide the application context when calling Init. " +
44-
"This method may be removed in a future major release.")]
45-
public static IDisposable Init(AndroidContext context, SentryOptions options)
46-
{
47-
AppContext = context;
48-
return Init(options);
49-
}
50-
5123
private static void InitSentryAndroidSdk(SentryOptions options)
5224
{
5325
// Set default release and distribution

0 commit comments

Comments
 (0)