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

ignore Meizu RecommendActivity leaked in Android Instrumentation #596

Merged
merged 1 commit into from Feb 26, 2017

Conversation

truebit
Copy link
Contributor

@truebit truebit commented Sep 8, 2016

When running UI automation tests using Instrumentation on Meizu devices, some page would report a memory leak in

* GC ROOT static android.app.Instrumentation.mRecommendActivity
* references android.app.Instrumentation$RecommendActivity.mTarget
* leaks com.example.ExampleActivity instance

I digged and found RecommendActivity is a class in framework.jar in Meizu FlymeOS (smali source). I do not know what it does and when it would be invoked. Maybe it relates to permission alerts prompted by FlymeOS
But I found many people got this memory leak.(google result) I also reported an issue #590 . and found a similar issue earlier #506

@@ -442,6 +443,13 @@
excluded.instanceField("android.view.Choreographer$FrameDisplayEventReceiver",
"mMessageQueue").alwaysExclude();
}
},

INSTRUMENTATION_RECOMMEND_ACTIVITY(MEIZU.equals(MANUFACTURER)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this closer to the top, next to the other manufacturer ignored leaks? Also please hide a version range check (SDK_INT)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean a version check should be added also?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

@truebit
Copy link
Contributor Author

truebit commented Sep 19, 2016

Sorry, I force updated commit after rebase with lastest remote code. it seems this pr closed.

@truebit
Copy link
Contributor Author

truebit commented Sep 19, 2016

I have pushed new commits as you requested. Please check.
The travis check is failed due to leakcanary-sample code. not this PR change.

@@ -305,6 +306,14 @@

// ######## Manufacturer specific Excluded refs ########

INSTRUMENTATION_RECOMMEND_ACTIVITY(MEIZU.equals(MANUFACTURER) && SDK_INT >= LOLLIPOP) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be SDK_INT >= LOLLIPOP. Only target the versions you know for sure are impacted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I will change this

@pyricau
Copy link
Member

pyricau commented Sep 19, 2016

Thx! Can you squash all commits into one?

@truebit
Copy link
Contributor Author

truebit commented Sep 19, 2016

squash done. please check

@jrodbx jrodbx merged commit dc09d65 into square:master Feb 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants