Skip to content

Commit

Permalink
fix(leak) remove onViewLoadLeak when activity is only stop
Browse files Browse the repository at this point in the history
  • Loading branch information
YYChen01988 committed Mar 19, 2024
1 parent 8f8e346 commit 7cf4e89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## TBD

### Bug fixes

* Remove leak mark when the Activity is on stopped since Auto-instrumented spans should only be considered “leaked” when the Activity is destroyed.
[#210](https://github.com/bugsnag/bugsnag-android-performance/pull/210)

## 1.2.2 (2024-02-22)

### Bug fixes
Expand Down
1 change: 0 additions & 1 deletion bugsnag-android-performance/detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<ID>MagicNumber:SpanKind.kt$SpanKind.CLIENT$3</ID>
<ID>MagicNumber:SpanKind.kt$SpanKind.CONSUMER$5</ID>
<ID>MagicNumber:SpanKind.kt$SpanKind.PRODUCER$4</ID>
<ID>NewLineAtEndOfFile:AutoInstrumentationCache.kt$com.bugsnag.android.performance.AutoInstrumentationCache.kt</ID>
<ID>ReturnCount:RetryDeliveryTask.kt$RetryDeliveryTask$override fun execute(): Boolean</ID>
<ID>SwallowedException:BugsnagClock.kt$BugsnagClock$ex: Exception</ID>
<ID>SwallowedException:Connectivity.kt$ConnectivityApi24$e: Exception</ID>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,7 @@ internal abstract class AbstractActivityLifecycleInstrumentation(
onViewLoadLeak(activity)
}

override fun onActivityStopped(activity: Activity) {
onViewLoadLeak(activity)
}

override fun onActivityStopped(activity: Activity)= Unit
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) = Unit
override fun onActivityStarted(activity: Activity) = Unit
override fun onActivityResumed(activity: Activity) = Unit
Expand Down

0 comments on commit 7cf4e89

Please sign in to comment.