Skip to content

Commit

Permalink
Prepare 2.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
pyricau committed Mar 26, 2021
1 parent bd3298d commit 9f85fbc
Show file tree
Hide file tree
Showing 21 changed files with 137 additions and 35 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[leakcanary-android-instrumentation](../../../../index.md) / [leakcanary](../../../index.md) / [InstrumentationLeakDetector](../../index.md) / [Result](../index.md) / [NoAnalysis](index.md) / [<init>](./-init-.md)

# <init>

`NoAnalysis(reason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[leakcanary-android-instrumentation](../../../../index.md) / [leakcanary](../../../index.md) / [InstrumentationLeakDetector](../../index.md) / [Result](../index.md) / [NoAnalysis](./index.md)

# NoAnalysis

`class NoAnalysis : `[`InstrumentationLeakDetector.Result`](../index.md)

### Constructors

| Name | Summary |
|---|---|
| [<init>](-init-.md) | `NoAnalysis(reason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` |

### Properties

| Name | Summary |
|---|---|
| [reason](reason.md) | `val reason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[leakcanary-android-instrumentation](../../../../index.md) / [leakcanary](../../../index.md) / [InstrumentationLeakDetector](../../index.md) / [Result](../index.md) / [NoAnalysis](index.md) / [reason](./reason.md)

# reason

`val reason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

`sealed class Result`

The result of calling [detectLeaks](../detect-leaks.md), which is either [NoAnalysis](-no-analysis.md) or [AnalysisPerformed](-analysis-performed/index.md).
The result of calling [detectLeaks](../detect-leaks.md), which is either [NoAnalysis](-no-analysis/index.md) or [AnalysisPerformed](-analysis-performed/index.md).

### Types

| Name | Summary |
|---|---|
| [AnalysisPerformed](-analysis-performed/index.md) | `class AnalysisPerformed : `[`InstrumentationLeakDetector.Result`](./index.md) |
| [NoAnalysis](-no-analysis.md) | `object NoAnalysis : `[`InstrumentationLeakDetector.Result`](./index.md) |
| [NoAnalysis](-no-analysis/index.md) | `class NoAnalysis : `[`InstrumentationLeakDetector.Result`](./index.md) |

### Inheritors

| Name | Summary |
|---|---|
| [AnalysisPerformed](-analysis-performed/index.md) | `class AnalysisPerformed : `[`InstrumentationLeakDetector.Result`](./index.md) |
| [NoAnalysis](-no-analysis.md) | `object NoAnalysis : `[`InstrumentationLeakDetector.Result`](./index.md) |
| [NoAnalysis](-no-analysis/index.md) | `class NoAnalysis : `[`InstrumentationLeakDetector.Result`](./index.md) |
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ no matter the number of objects retained.

| Name | Summary |
|---|---|
| [Result](-result/index.md) | `sealed class Result`<br>The result of calling [detectLeaks](detect-leaks.md), which is either [NoAnalysis](-result/-no-analysis.md) or [AnalysisPerformed](-result/-analysis-performed/index.md). |
| [Result](-result/index.md) | `sealed class Result`<br>The result of calling [detectLeaks](detect-leaks.md), which is either [NoAnalysis](-result/-no-analysis/index.md) or [AnalysisPerformed](-result/-analysis-performed/index.md). |

### Constructors

Expand Down
1 change: 1 addition & 0 deletions docs/api/shark-android/alltypes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
| [shark.AndroidObjectInspectors](../shark/-android-object-inspectors/index.md) | A set of default [ObjectInspector](#)s that knows about common AOSP and library classes. |
| [shark.AndroidReferenceMatchers](../shark/-android-reference-matchers/index.md) | [AndroidReferenceMatchers](../shark/-android-reference-matchers/index.md) values add [ReferenceMatcher](#) instances to a global list via their [add](#) method. A [ReferenceMatcher](#) is either a [IgnoredReferenceMatcher](#) or a [LibraryLeakReferenceMatcher](#). |
| [shark.AndroidResourceIdNames](../shark/-android-resource-id-names/index.md) | |
| [shark.AndroidServices](../shark/-android-services/index.md) | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[shark-android](../../../index.md) / [shark](../../index.md) / [AndroidObjectInspectors](../index.md) / [LOADED_APK](./index.md)

# LOADED_APK

`LOADED_APK`

### Functions

| Name | Summary |
|---|---|
| [inspect](inspect.md) | `fun inspect(reporter: ObjectReporter): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[shark-android](../../../index.md) / [shark](../../index.md) / [AndroidObjectInspectors](../index.md) / [LOADED_APK](index.md) / [inspect](./inspect.md)

# inspect

`fun inspect(reporter: ObjectReporter): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[shark-android](../../../index.md) / [shark](../../index.md) / [AndroidObjectInspectors](../index.md) / [SERVICE](./index.md)

# SERVICE

`SERVICE`

### Functions

| Name | Summary |
|---|---|
| [inspect](inspect.md) | `fun inspect(reporter: ObjectReporter): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[shark-android](../../../index.md) / [shark](../../index.md) / [AndroidObjectInspectors](../index.md) / [SERVICE](index.md) / [inspect](./inspect.md)

# inspect

`fun inspect(reporter: ObjectReporter): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ unless there's a bug and you temporarily want to remove an inspector.
| [VIEW](-v-i-e-w/index.md) | |
| [EDITOR](-e-d-i-t-o-r/index.md) | |
| [ACTIVITY](-a-c-t-i-v-i-t-y/index.md) | |
| [SERVICE](-s-e-r-v-i-c-e/index.md) | |
| [CONTEXT_FIELD](-c-o-n-t-e-x-t_-f-i-e-l-d/index.md) | |
| [CONTEXT_WRAPPER](-c-o-n-t-e-x-t_-w-r-a-p-p-e-r/index.md) | |
| [APPLICATION_PACKAGE_MANAGER](-a-p-p-l-i-c-a-t-i-o-n_-p-a-c-k-a-g-e_-m-a-n-a-g-e-r/index.md) | |
Expand All @@ -35,6 +36,7 @@ unless there's a bug and you temporarily want to remove an inspector.
| [SUPPORT_FRAGMENT](-s-u-p-p-o-r-t_-f-r-a-g-m-e-n-t/index.md) | |
| [ANDROIDX_FRAGMENT](-a-n-d-r-o-i-d-x_-f-r-a-g-m-e-n-t/index.md) | |
| [MESSAGE_QUEUE](-m-e-s-s-a-g-e_-q-u-e-u-e/index.md) | |
| [LOADED_APK](-l-o-a-d-e-d_-a-p-k/index.md) | |
| [MORTAR_PRESENTER](-m-o-r-t-a-r_-p-r-e-s-e-n-t-e-r/index.md) | |
| [MORTAR_SCOPE](-m-o-r-t-a-r_-s-c-o-p-e/index.md) | |
| [COORDINATOR](-c-o-o-r-d-i-n-a-t-o-r/index.md) | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[shark-android](../../index.md) / [shark](../index.md) / [AndroidServices](index.md) / [aliveAndroidServiceObjectIds](./alive-android-service-object-ids.md)

# aliveAndroidServiceObjectIds

`val HeapGraph.aliveAndroidServiceObjectIds: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>`
11 changes: 11 additions & 0 deletions docs/api/shark-android/shark/-android-services/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[shark-android](../../index.md) / [shark](../index.md) / [AndroidServices](./index.md)

# AndroidServices

`object AndroidServices`

### Properties

| Name | Summary |
|---|---|
| [aliveAndroidServiceObjectIds](alive-android-service-object-ids.md) | `val HeapGraph.aliveAndroidServiceObjectIds: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>` |
1 change: 1 addition & 0 deletions docs/api/shark-android/shark/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
| [AndroidObjectInspectors](-android-object-inspectors/index.md) | `enum class AndroidObjectInspectors : ObjectInspector`<br>A set of default [ObjectInspector](#)s that knows about common AOSP and library classes. |
| [AndroidReferenceMatchers](-android-reference-matchers/index.md) | `enum class AndroidReferenceMatchers`<br>[AndroidReferenceMatchers](-android-reference-matchers/index.md) values add [ReferenceMatcher](#) instances to a global list via their [add](#) method. A [ReferenceMatcher](#) is either a [IgnoredReferenceMatcher](#) or a [LibraryLeakReferenceMatcher](#). |
| [AndroidResourceIdNames](-android-resource-id-names/index.md) | `class AndroidResourceIdNames` |
| [AndroidServices](-android-services/index.md) | `object AndroidServices` |
6 changes: 0 additions & 6 deletions docs/api/shark/shark/-heap-analysis-success/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,3 @@ The result of a successful heap analysis performed by [HeapAnalyzer](../-heap-an
| Name | Summary |
|---|---|
| [toString](to-string.md) | `fun toString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |

### Companion Object Functions

| Name | Summary |
|---|---|
| [upgradeFrom20Deserialized](upgrade-from20-deserialized.md) | `fun upgradeFrom20Deserialized(fromV20: `[`HeapAnalysisSuccess`](./index.md)`): `[`HeapAnalysisSuccess`](./index.md)<br>If [fromV20](upgrade-from20-deserialized.md#shark.HeapAnalysisSuccess.Companion$upgradeFrom20Deserialized(shark.HeapAnalysisSuccess)/fromV20) was serialized in LeakCanary 2.0, you must deserialize it and call this method to create a usable [HeapAnalysisSuccess](./index.md) instance. |

This file was deleted.

49 changes: 47 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,53 @@

# Change Log

!!! info
To upgrade from LeakCanary *1.6*, follow the [upgrade guide](upgrading-to-leakcanary-2.0.md).
## Version 2.7 (2021-03-26)

Please thank
[@chao2zhang](https://github.com/chao2zhang),
[@ihrupin](https://github.com/ihrupin),
[@jzbrooks](https://github.com/jzbrooks),
[@msfjarvis](https://github.com/msfjarvis),
[@reneargento](https://github.com/reneargento),
[@Unpublished](https://github.com/Unpublished)
for their contributions, bug reports and feature requests 🙏 🙏 🙏.

### Finer grained root view watching

In version 2.6, LeakCanary added detection of root views retained after `View.onDetachedFromWindow()`. This helps find more leaks, but unfortunately some Android widgets keep a detached root view around to reattach it later (e.g. spinner). App developers also sometimes do the same with dialogs, keeping a single instance around and calling `show()` and `hide()` as needed. As a result, LeakCanary would report leaks that were actually not leaks.

In version 2.7, the default behavior changed: LeakCanary will continue to detect leaks of toasts, but will ignore root views created by a PopupWindow (which is what Android widgets use). It will also ignore root views created by a dialog by default, and you can turn this back on by setting the `leak_canary_watcher_watch_dismissed_dialogs` resource boolean to true:


```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="leak_canary_watcher_watch_dismissed_dialogs">true</bool>
</resources>
```

This is implemented using a new Square library: [Curtains](https://github.com/square/curtains).

### Targeting Android 12

We fixed two issues for apps that want target Android 12:

* [#2074](https://github.com/square/leakcanary/pull/2074) Activities that use intent filters must declare the `android:exported` attribute.
* [#2079](https://github.com/square/leakcanary/issues/2079) PendingIntent requires the `FLAG_IMMUTABLE` flag.

### Bug fixes and improvements 🐛🔨

* [#2075](https://github.com/square/leakcanary/issues/2075) Fixed crash when sharing heap dumps.
* [#2067](https://github.com/square/leakcanary/issues/2067) Fixed crash when opening leaks from older versions (before 2.6) of LeakCanary.
* [#2049](https://github.com/square/leakcanary/issues/2049) Fixed Plumber crash due to R8 shaking AndroidLeakFixes.
* [#2084](https://github.com/square/leakcanary/issues/2084) Fixed Shark crash when used from multiple threads.
* [#2054](https://github.com/square/leakcanary/issues/2054) 🙈🙉🙊 Blocked Monkeys from deleting leaks.
* [#2069](https://github.com/square/leakcanary/issues/2069) Added X button to the root leak activity (for custom devices with no back button)
* [#2091](https://github.com/square/leakcanary/issues/2091) Added receiver details if LoadedApk shows up in the leaktrace.
* [#2083](https://github.com/square/leakcanary/issues/2083) Added service status details (created or not) to leaktrace.
* [#2099](https://github.com/square/leakcanary/pull/2099) Retry button if analysis fails.
* [#2066](https://github.com/square/leakcanary/pull/2066) When heap analysis in UI tests is skipped and NoAnalysis is returned, NoAnalysis now includes a reason to help debug why it didn't run.
* [#2000](https://github.com/square/leakcanary/issues/2000) The LeakCanary CI now leverages GitHub actions instead of Travis.

## Version 2.6 - Christmas Release 🎄 (2020-12-24)

Expand Down
10 changes: 4 additions & 6 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,13 @@ git checkout -b release_{{ leak_canary.next_release }}

* Update `VERSION_NAME` in `gradle.properties` (remove `-SNAPSHOT`)
```gradle
VERSION_NAME={{ leak_canary.next_release }}
sed -i '' 's/VERSION_NAME={{ leak_canary.next_release }}-SNAPSHOT/VERSION_NAME={{ leak_canary.next_release }}/' gradle.properties
```

* Update the current version and next version in `mkdocs.yml`
```bash
extra:
leak_canary:
release: '{{ leak_canary.next_release }}'
next_release: 'REPLACE_WITH_NEXT_VERSION_NUMBER'
sed -i '' 's/{{ leak_canary.next_release }}/REPLACE_WITH_NEXT_VERSION_NUMBER/' mkdocs.yml
sed -i '' 's/{{ leak_canary.release }}/{{ leak_canary.next_release }}/' mkdocs.yml
```

* Generate the Dokka docs
Expand Down Expand Up @@ -172,7 +170,7 @@ git merge --no-ff release_{{ leak_canary.next_release }}
```
* Update `VERSION_NAME` in `gradle.properties` (increase version and add `-SNAPSHOT`)
```gradle
VERSION_NAME=REPLACE_WITH_NEXT_VERSION_NUMBER-SNAPSHOT
sed -i '' 's/VERSION_NAME={{ leak_canary.next_release }}/VERSION_NAME=REPLACE_WITH_NEXT_VERSION_NUMBER-SNAPSHOT/' gradle.properties
```

* Commit your changes
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.squareup.leakcanary
VERSION_NAME=2.7-SNAPSHOT
VERSION_NAME=2.7

POM_DESCRIPTION=LeakCanary

Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

extra:
leak_canary:
release: '2.6'
next_release: '2.7'
release: '2.7'
next_release: '2.8'
social:
- icon: fontawesome/brands/github-alt
link: https://square.github.io/
Expand Down

0 comments on commit 9f85fbc

Please sign in to comment.