You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(lifecycle): Use single lifecycle observer (#4567)
* perf(connectivity): Cache network capabilities and status to reduce IPC calls
* changelog
* Changelog
* revert
* fix(breadcrumbs): Deduplicate battery breadcrumbs
* ref
* Changelog
* Fix test
* perf(connectivity): Have only one NetworkCallback active at a time
* Changelog
* perf(integrations): Use single lifecycle observer
* Add tests
* Changelog
* Fix tests
* Improve callback handling and test visibility (#4593)
* Null-check lifecycleObserver
---------
Co-authored-by: Markus Hintersteiner <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
### Improvements
6
6
7
7
- Session Replay: Use main thread looper to schedule replay capture ([#4542](https://github.com/getsentry/sentry-java/pull/4542))
8
+
- Use single `LifecycleObserver` and multi-cast it to the integrations interested in lifecycle states ([#4567](https://github.com/getsentry/sentry-java/pull/4567))
Copy file name to clipboardExpand all lines: sentry-android-core/api/sentry-android-core.api
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -166,11 +166,17 @@ public final class io/sentry/android/core/AppLifecycleIntegration : io/sentry/In
166
166
public fun register (Lio/sentry/IScopes;Lio/sentry/SentryOptions;)V
167
167
}
168
168
169
-
public final class io/sentry/android/core/AppState {
169
+
public final class io/sentry/android/core/AppState : java/io/Closeable {
170
+
public fun close ()V
170
171
public static fun getInstance ()Lio/sentry/android/core/AppState;
171
172
public fun isInBackground ()Ljava/lang/Boolean;
172
173
}
173
174
175
+
public abstract interface class io/sentry/android/core/AppState$AppStateListener {
176
+
public abstract fun onBackground ()V
177
+
public abstract fun onForeground ()V
178
+
}
179
+
174
180
public final class io/sentry/android/core/BuildConfig {
175
181
public static final field BUILD_TYPE Ljava/lang/String;
176
182
public static final field DEBUG Z
@@ -422,11 +428,13 @@ public class io/sentry/android/core/SpanFrameMetricsCollector : io/sentry/IPerfo
422
428
public fun onSpanStarted (Lio/sentry/ISpan;)V
423
429
}
424
430
425
-
public final class io/sentry/android/core/SystemEventsBreadcrumbsIntegration : io/sentry/Integration, java/io/Closeable {
431
+
public final class io/sentry/android/core/SystemEventsBreadcrumbsIntegration : io/sentry/Integration, io/sentry/android/core/AppState$AppStateListener, java/io/Closeable {
426
432
public fun <init> (Landroid/content/Context;)V
427
433
public fun <init> (Landroid/content/Context;Ljava/util/List;)V
428
434
public fun close ()V
429
435
public static fun getDefaultActions ()Ljava/util/List;
436
+
public fun onBackground ()V
437
+
public fun onForeground ()V
430
438
public fun register (Lio/sentry/IScopes;Lio/sentry/SentryOptions;)V
0 commit comments