Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump leakcanary-android from 2.5 to 2.6 #192

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 28, 2020

⚠️ Dependabot is rebasing this PR ⚠️

If you make any changes to it yourself then they will take precedence over the rebase.


Bumps leakcanary-android from 2.5 to 2.6.

Release notes

Sourced from leakcanary-android's releases.

v2.6

See Change Log

Changelog

Sourced from leakcanary-android's changelog.

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

Please thank @chao2zhang, @ChaosLeung, @LitterSun, @mickverm, @opatry, @Thomas-Vos, @tricknology, @rahul-a, @samoylenkodmitry, @sing0055, @ubiratansoares for their contributions, bug reports and feature requests 🙏 🙏 🙏.

This Christmas Release includes several external contributions and a bunch of cool new features! 🎁🎁

Detecting root views retained after View.onDetachedFromWindow()

On Android, every displayed view hierarchy is attached to a window, whether it be the view hierarchy of an activity, a dialog, a toast or a chat head. After a view hierarchy is detached from its window, it should be garbage collected.

LeakCanary already detects leaks of activity view hierarchies because retained detached views reference their activity context and LeakCanary detects activities retained after Activity.onDestroy(). In this new release, LeakCanary will now detect the leak of a dialog view hierarchy as soon as that dialog is dismissed, or any other view that is passed to WindowManager.removeView().

Detecting services retained after Service.onDestroy()

After an Android service is destroyed, it should be garbage collected. Unfortunately, the Android SDK does not provide any generic API to observe the service lifecycle. We worked around that using reflection on greylist APIs (details in #2014). Let's hope this motivates the Android team to build the APIs developers need.

Configuring retained object detection

With the detection of 2 new types of retained objects, we're also adding APIs to configure which watchers should be installed as well as adding filtering capabilities.

First, disable the automatic install:

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <bool name="leak_canary_watcher_auto_install">false</bool>
</resources>

Then you can install LeakCanary manually. LeakCanary 2.6 comes with 4 watchers installed by default: ActivityWatcher, FragmentAndViewModelWatcher, RootViewWatcher, ServiceWatcher. Here's an example to get all the default watchers except ServiceWatcher:

class DebugExampleApplication : ExampleApplication() {
override fun onCreate() {
super.onCreate()
val watchersToInstall = AppWatcher.appDefaultWatchers(application)

</tr></table>

... (truncated)

Commits
  • 357100d Update docs
  • 89d81ce Prepare 2.6 release
  • ff9ace5 Merge pull request #2038 from square/py/fix_service_watcher_crash
  • cfcbe94 Fix crash for methods with no arguments and rethrow exceptions
  • af08bf1 Merge pull request #2036 from square/py/debug_screen_off
  • 6539c16 Trigger LeakCanary on screen off
  • cea1708 Merge pull request #2037 from square/py/root_view_min_api
  • 1bcdb5f RootViewWatcher is a no op pre API 19
  • a4401aa Merge pull request #2035 from square/py/library_leaks
  • 8fdc60a Update library leaks
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [leakcanary-android](https://github.com/square/leakcanary) from 2.5 to 2.6.
- [Release notes](https://github.com/square/leakcanary/releases)
- [Changelog](https://github.com/square/leakcanary/blob/main/docs/changelog.md)
- [Commits](square/leakcanary@v2.5...v2.6)

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 28, 2020
@dependabot dependabot bot requested a review from rm3l December 28, 2020 04:00
@rm3l rm3l merged commit 2dc67e1 into master Jan 5, 2021
@dependabot dependabot bot deleted the dependabot/gradle/com.squareup.leakcanary-leakcanary-android-2.6 branch January 5, 2021 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant