-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add LENOVO and INFINIX to list of exclusions for Resources.mContext leaks. #2573
Closed
ericmaxwell2003
wants to merge
10
commits into
main
from
emaxwell/add-manufacturer-resourcesImpl_mAppContext-exclusions
Closed
Add LENOVO and INFINIX to list of exclusions for Resources.mContext leaks. #2573
ericmaxwell2003
wants to merge
10
commits into
main
from
emaxwell/add-manufacturer-resourcesImpl_mAppContext-exclusions
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cherry picking 4f81e76 onto the LeakCanary 2 branch
[LC2] Fix crash from LifecycleRegistry kotlin conversion
Catch up leaks
* release_2.12: Prepare 2.12 release
ericmaxwell2003
force-pushed
the
emaxwell/add-manufacturer-resourcesImpl_mAppContext-exclusions
branch
from
October 6, 2023 17:28
c45385a
to
f5e61f9
Compare
pyricau
reviewed
Oct 6, 2023
@@ -1074,7 +1074,8 @@ enum class AndroidReferenceMatchers { | |||
+ " instance that has a context that is the activity." | |||
+ " Observed here: https://github.com/square/leakcanary/issues/1#issue-74450184" | |||
) { | |||
manufacturer == SAMSUNG && sdkInt == 19 | |||
(manufacturer == SAMSUNG && sdkInt == 19) || | |||
((manufacturer == LENOVO || manufacturer == INFINIX) && sdkInt in 31..33) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right place, the leaktrace looks like this:
├─ android.content.res.ResourcesImpl class
│ Leaking: NO (a class is never leaking)
│ ↓ static ResourcesImpl.mAppContext
│ ~~~~~~~~~~~
├─ android.app.ContextImpl instance
So you want staticFieldLeak("android.content.res.ResourcesImpl", "mAppContext")
which I think is defined elsewhere in this file.
ericmaxwell2003
force-pushed
the
emaxwell/add-manufacturer-resourcesImpl_mAppContext-exclusions
branch
from
October 6, 2023 19:33
f5e61f9
to
9f8f4f9
Compare
ericmaxwell2003
force-pushed
the
emaxwell/add-manufacturer-resourcesImpl_mAppContext-exclusions
branch
from
October 8, 2023 20:10
d7110f1
to
f38e86a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ResourcesImpl.mAppContext manufacturer leak exclusions for LENOVO and INFINIX observed on Android 12 and 13.
I didn't know how best to test this. @pyricau, how have you unit tested these exclusions in the past?