-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
binder: Fix a ServiceConnection leak #8861
Conversation
@@ -67,6 +67,7 @@ public void setUp() { | |||
|
|||
shadowApplication = shadowOf(appContext); | |||
shadowApplication.setComponentNameAndServiceForBindService(serviceComponent, mockBinder); | |||
shadowApplication.setUnbindServiceCallsOnServiceDisconnected(false); |
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.
Do we need a test case for when this is true?
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.
No because "true" (the default) means preserve a certain legacy robolectric behavior that doesn't match what any version of Android has ever done. I can add a comment to explain.
How common was this issue? Should it be backported? There may be a 1.44.1 soon. |
It only happens when the connection would have failed anyway, say because the server app isn't installed or the client's manifest is misconfigured. So probably not super important to back port but I don't feel strongly either way. |
I see. Yeah, probably not too big of a deal. But I'll go ahead and backport it since I have a script that makes it easy and it is a legitimate leak. |
Closes #8726